@KFStep(name="StorePropertiesInEnvironment", category="Flow", toolTipText="Store property settings for a particular algorithm-based step (eg Classifier, Clusterer etc) in the flow environment. When connected to a downstream Job step, the sub-flow executed by the Job can use a SetPropertiesFromEnvironment step to access the stored properties and set them on the underlying scheme in an algorithm-based step. Each property is configured by specifying the attribute in the incoming instance to obtain its value from, the target scheme-based step (in the sub-flow) that will receive it, the property name/path to set on the target step and a default property value (optional) to use if the value is missing in the incoming instance. If the property/path field is left blank, then it is assumed that the value is actually a scheme + options spec in command-line form; otherwise, the value is set by processing the property path - e.g. if our target step to receive property settings was Bagging (itself with default settings), and the property path to set was \'classifier.maxDepth\', then the classifier property of Bagging would yield a REPTree base classifier and the maxDepth property of REPTree would be set. Note that the SetPropertiesFromEnvironment step will process property settings in the order that they are defined by this step. This means that it is possible to set the entire base learner for a Classifier stepwith one property setting and then drill down to a particular option in the base learner using a second property setting.", iconPath="weka/gui/knowledgeflow/icons/StorePropertiesInEnvironment.gif") public class StorePropertiesInEnvironment extends BaseStep
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
m_internalRep
Internal string-based representation of property configs
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
m_propsToSetFromIncomingInstances
Map of properties to set based on the values of attributes in incoming
instances.
|
protected boolean |
m_raiseErrorWhenValueMissing |
protected boolean |
m_structureCheckComplete
True if the structure has been checked
|
protected boolean |
m_structureOK
OK if there is at least one specified attribute in the incoming instance
structure
|
static java.lang.String |
SEP1
Separators for internal variable specification
|
static java.lang.String |
SEP2 |
m_stepIsResourceIntensive, m_stepManager, m_stepName| Constructor and Description |
|---|
StorePropertiesInEnvironment() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkStructure(Instances structure) |
java.lang.String |
getCustomEditorForStep()
Return the fully qualified name of a custom editor component (JComponent)
to use for editing the properties of the step.
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
java.lang.String |
getPropsInternalRep() |
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
internalDynamicToMap(java.lang.String internalRep) |
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
protected void |
processInstance(Instance inst,
Data existingEnv) |
void |
setPropsInternalRep(java.lang.String rep) |
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stoppublic static final java.lang.String SEP1
public static final java.lang.String SEP2
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> m_propsToSetFromIncomingInstances
protected boolean m_structureCheckComplete
protected boolean m_structureOK
protected java.lang.String m_internalRep
protected boolean m_raiseErrorWhenValueMissing
@ProgrammaticProperty public void setPropsInternalRep(java.lang.String rep)
public java.lang.String getPropsInternalRep()
public void stepInit()
throws WekaException
StepWekaException - if a problem occurs during initializationpublic void processIncoming(Data data) throws WekaException
BaseStepprocessIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the payload to processWekaException - if a problem occursprotected void processInstance(Instance inst, Data existingEnv) throws WekaException
WekaExceptionprotected void checkStructure(Instances structure)
public java.util.List<java.lang.String> getIncomingConnectionTypes()
Steppublic java.util.List<java.lang.String> getOutgoingConnectionTypes()
Steppublic java.lang.String getCustomEditorForStep()
getCustomEditorForStep in interface StepgetCustomEditorForStep in class BaseSteppublic static java.util.Map<java.lang.String,java.util.List<java.lang.String>> internalDynamicToMap(java.lang.String internalRep)