public class UserDefinedTree extends AbstractTree implements IDecisionInteractive, org.openscience.cdk.qsar.IMolecularDescriptor, ambit2.core.data.IObject2Properties<UserDefinedTree>
IDecisionMethod interface. It stores categories in a
IDecisionCategories and the tree itself in a
DecisionNodesList. The tree is editable, i.e. rules can
be added , removed and modified.IDecisionInteractive.UserOptions| Modifier and Type | Field and Description |
|---|---|
protected boolean |
editable |
protected PropertyChangeListener |
listener |
protected IDecisionNodesFactory |
nodesFactory |
protected IDecisionInteractive.UserOptions |
options |
categories, changes, explanation, falseIfRuleNotImplemented, imageSize, logger, modified, name, priority, rules, treeRoot, webxmltag_CATEGORIES, xmltag_CATEGORY, xmltag_CATEGORYTHRESHOLD, xmltag_CLASS, xmltag_EXPLANATION, xmltag_ID, xmltag_METHOD, xmltag_METHODPARAMETER, xmltag_METHODS, xmltag_NAME, xmltag_RULE, xmltag_RULEEXAMPLE, xmltag_RULES, xmltag_TREEROOT| Constructor and Description |
|---|
UserDefinedTree() |
UserDefinedTree(IDecisionCategories classes,
IDecisionRuleList rules) |
UserDefinedTree(IDecisionCategories classes,
String[] customRules,
int[][] customTransitions,
IDecisionNodesFactory nodesFactory) |
UserDefinedTree(IDecisionNodesFactory nodesFactory) |
| Modifier and Type | Method and Description |
|---|---|
org.openscience.cdk.qsar.DescriptorValue |
calculate(org.openscience.cdk.interfaces.IAtomContainer mol) |
Object |
clone() |
void |
close() |
protected ambit2.core.data.ArrayResult |
createArrayResult(int length) |
IDecisionRule |
getBranch(IDecisionRule rule,
boolean answer) |
IDecisionRule |
getBranch(int ruleId,
boolean answer) |
IDecisionCategory |
getCategory(IDecisionRule rule,
boolean answer) |
IDecisionCategory |
getCategory(int ruleId,
boolean answer) |
String[] |
getDescriptorNames() |
org.openscience.cdk.qsar.result.IDescriptorResult |
getDescriptorResultType() |
long |
getID() |
boolean |
getInteractive() |
PropertyChangeListener |
getListener() |
IDecisionNodesFactory |
getNodesFactory() |
IDecisionInteractive.UserOptions |
getOptions() |
String[] |
getParameterNames() |
Object[] |
getParameters() |
Object |
getParameterType(String arg0) |
IDecisionRule |
getRule(int id) |
org.openscience.cdk.qsar.DescriptorSpecification |
getSpecification() |
IDecisionRuleList |
hasUnreachableRules() |
IDecisionCategories |
hasUnusedCategories() |
void |
initialise(org.openscience.cdk.interfaces.IChemObjectBuilder builder) |
protected IDecisionRuleList |
initRules()
public AbstractTree( IDecisionCategories classes, String[] customRules,
int[][] customTransitions) throws DecisionMethodException {
this(categories,customRules,customTransitions); } public AbstractTree(
String[] customRules, int[][] customTransitions) throws
DecisionMethodException { this(); setRules(customRules);
setTransitions(customTransitions); setChanged(); notifyObservers(); }
|
boolean |
isEditable() |
boolean |
isEnabled() |
void |
open() |
List<ambit2.base.data.Property> |
process(UserDefinedTree target) |
void |
removeListener() |
protected void |
setArrayValue(ambit2.core.data.ArrayResult result,
int index,
org.openscience.cdk.interfaces.IAtomContainer mol,
String propertyName) |
void |
setEditable(boolean value) |
void |
setEnabled(boolean value) |
void |
setInteractive(boolean value) |
void |
setListener(PropertyChangeListener listener) |
void |
setNodesFactory(IDecisionNodesFactory nodesFactory) |
void |
setOptions(IDecisionInteractive.UserOptions options) |
void |
setParameters(org.openscience.cdk.interfaces.IAtomContainer mol)
Can be used to display some options before applying the rules.
|
void |
setParameters(Object[] arg0) |
protected void |
setTransitions(int[][] customTransitions) |
String |
toString() |
protected boolean |
verifyRules(org.openscience.cdk.interfaces.IAtomContainer mol,
IDecisionResult result,
IDecisionRule topRule)
abstract method, to be implemented in the child class
|
protected void |
visitCategories(DecisionNode rule,
IDecisionCategories usedCategories) |
protected void |
visitRules(DecisionNode rule) |
addDecisionRule, addPropertyChangeListener, classify, clearChanged, createDecisionResult, equals, explainRules, fromXML, getCategories, getEditor, getExplanation, getImage, getImage, getImageSize, getLegend, getNumberOfClasses, getNumberOfRules, getPriority, getRule, getRules, getTitle, getTopRule, isFalseIfRuleNotImplemented, isModified, isWeb, optionsPanel, printResults, printToStream, removePropertyChangeListener, retrieveExplanation, setCategories, setChanged, setDecisionRule, setExplanation, setFalseIfRuleNotImplemented, setImageSize, setModified, setPriority, setRules, setRules, setTitle, setWeb, testRulesWithSelector, toShallowXML, toXML, update, verifyResidues, verifyRules, walkRules, walkRulesaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserversprotected boolean editable
protected IDecisionNodesFactory nodesFactory
protected IDecisionInteractive.UserOptions options
protected transient PropertyChangeListener listener
public UserDefinedTree(IDecisionNodesFactory nodesFactory)
public UserDefinedTree()
public UserDefinedTree(IDecisionCategories classes, IDecisionRuleList rules)
public UserDefinedTree(IDecisionCategories classes, String[] customRules, int[][] customTransitions, IDecisionNodesFactory nodesFactory) throws DecisionMethodException
classes - customRules - customTransitions - DecisionMethodExceptionpublic IDecisionInteractive.UserOptions getOptions()
getOptions in interface IDecisionInteractivepublic void setOptions(IDecisionInteractive.UserOptions options)
setOptions in interface IDecisionInteractivepublic PropertyChangeListener getListener()
getListener in interface IDecisionInteractivepublic void setListener(PropertyChangeListener listener)
setListener in interface IDecisionInteractiveprotected IDecisionRuleList initRules()
AbstractTreeinitRules in class AbstractTreeprotected void setTransitions(int[][] customTransitions)
setTransitions in class AbstractTreeprotected void visitRules(DecisionNode rule)
public IDecisionRuleList hasUnreachableRules()
hasUnreachableRules in interface IDecisionMethodprotected void visitCategories(DecisionNode rule, IDecisionCategories usedCategories)
public IDecisionCategories hasUnusedCategories()
hasUnusedCategories in interface IDecisionMethodprotected boolean verifyRules(org.openscience.cdk.interfaces.IAtomContainer mol,
IDecisionResult result,
IDecisionRule topRule)
throws DecisionMethodException
AbstractTreeverifyRules in class AbstractTreemol - - org.openscience.cdk.interfaces.AtomContainer to be
analyzedresult - - IDecisionResult the result from the decision tree
applicationtopRule - - the starting ruleDecisionMethodExceptionpublic IDecisionRule getBranch(IDecisionRule rule, boolean answer)
getBranch in interface IDecisionMethodpublic IDecisionRule getBranch(int ruleId, boolean answer)
public IDecisionCategory getCategory(IDecisionRule rule, boolean answer)
getCategory in interface IDecisionMethodpublic IDecisionCategory getCategory(int ruleId, boolean answer)
public boolean isEditable()
isEditable in interface IDecisionMethodpublic void setEditable(boolean value)
setEditable in interface IDecisionMethodpublic IDecisionRule getRule(int id)
getRule in interface IDecisionMethodgetRule in class AbstractTreeIDecisionMethod.getRule(int)public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String toString()
toString in class AbstractTreepublic void setParameters(org.openscience.cdk.interfaces.IAtomContainer mol)
AbstractTreesetParameters in interface IDecisionMethodsetParameters in class AbstractTreepublic IDecisionNodesFactory getNodesFactory()
public void setNodesFactory(IDecisionNodesFactory nodesFactory)
public boolean getInteractive()
getInteractive in interface IDecisionInteractivepublic void setInteractive(boolean value)
setInteractive in interface IDecisionInteractiveprotected ambit2.core.data.ArrayResult createArrayResult(int length)
protected void setArrayValue(ambit2.core.data.ArrayResult result,
int index,
org.openscience.cdk.interfaces.IAtomContainer mol,
String propertyName)
public org.openscience.cdk.qsar.DescriptorValue calculate(org.openscience.cdk.interfaces.IAtomContainer mol)
calculate in interface org.openscience.cdk.qsar.IMolecularDescriptorpublic String[] getDescriptorNames()
getDescriptorNames in interface org.openscience.cdk.qsar.IDescriptorpublic org.openscience.cdk.qsar.result.IDescriptorResult getDescriptorResultType()
getDescriptorResultType in interface org.openscience.cdk.qsar.IMolecularDescriptorpublic String[] getParameterNames()
getParameterNames in interface org.openscience.cdk.qsar.IDescriptorpublic Object[] getParameters()
getParameters in interface org.openscience.cdk.qsar.IDescriptorpublic Object getParameterType(String arg0)
getParameterType in interface org.openscience.cdk.qsar.IDescriptorpublic void setParameters(Object[] arg0) throws org.openscience.cdk.exception.CDKException
setParameters in interface org.openscience.cdk.qsar.IDescriptororg.openscience.cdk.exception.CDKExceptionpublic org.openscience.cdk.qsar.DescriptorSpecification getSpecification()
getSpecification in interface org.openscience.cdk.qsar.IDescriptorpublic void removeListener()
removeListener in interface IDecisionInteractivepublic List<ambit2.base.data.Property> process(UserDefinedTree target) throws net.idea.modbcum.i.exceptions.AmbitException
process in interface ambit2.core.data.IObject2Properties<UserDefinedTree>process in interface net.idea.modbcum.i.processors.IProcessor<UserDefinedTree,List<ambit2.base.data.Property>>net.idea.modbcum.i.exceptions.AmbitExceptionpublic void setEnabled(boolean value)
setEnabled in interface net.idea.modbcum.i.processors.IProcessor<UserDefinedTree,List<ambit2.base.data.Property>>public boolean isEnabled()
isEnabled in interface net.idea.modbcum.i.processors.IProcessor<UserDefinedTree,List<ambit2.base.data.Property>>public long getID()
getID in interface net.idea.modbcum.i.processors.IProcessor<UserDefinedTree,List<ambit2.base.data.Property>>public void close()
throws Exception
close in interface net.idea.modbcum.i.processors.IProcessor<UserDefinedTree,List<ambit2.base.data.Property>>Exceptionpublic void open()
throws Exception
open in interface net.idea.modbcum.i.processors.IProcessor<UserDefinedTree,List<ambit2.base.data.Property>>Exceptionpublic void initialise(org.openscience.cdk.interfaces.IChemObjectBuilder builder)
initialise in interface org.openscience.cdk.qsar.IDescriptorCopyright © 2004–2018 Ideaconsult Ltd. All rights reserved.