MethodEnsemblePredictor¶
Combine predictions from multiple distinct predictive pipelines.
This node is complementary to EnsemblePredictor: whereas the latter clones one underlying method multiple times and trains those clones on different subsets of the data, this node trains several distinct methods on the same data and then combines their predictions. This makes the node suitable for fixed multi-method ensembles, such as combining several sparse Bayesian classifiers that may have different failure modes. Each method is represented by a graph wired into one of the method inputs, typically beginning with a Placeholder named data and ending in a predictive node. The wrapped methods are trained the first time the node sees training data and are then reused for later predictions, just like other stateful machine-learning wrappers in NeuroPype. This node intentionally implements only fixed combination rules (mean, median, voting). Learning stack weights or selecting methods by internal cross-validation should be handled by a separate meta-learning node, since those procedures require out-of-sample predictions and a more elaborate selection protocol.
Version 0.6.0
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: AnyNumeric (can be None)
- data direction: INOUT
method1¶
Base method 1.
- verbose name: Method1
- default value: None
- port type: GraphPort
- value type: Graph
method1__signature¶
Argument names of the first base method. This is a graph-accepting wrapper around a predictive pipeline, analogous to Crossvalidation or EnsemblePredictor, except that here multiple distinct method graphs can be wired in and then combined. Each method graph should generally start with a Placeholder named data and end in a predictive node. Optional placeholders such as is_training, random_seed, and index may also be exposed via this signature if desired.
- verbose name: Method1 [Signature]
- default value: (data)
- port type: Port
- value type: object (can be None)
method2¶
Base method 2.
- verbose name: Method2
- default value: None
- port type: GraphPort
- value type: Graph
method2__signature¶
Signature for the "method2" input. This represents the signature for the subgraph that is wired into the "method2" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "method2" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
- verbose name: Method2 [Signature]
- default value: (data)
- port type: Port
- value type: object (can be None)
method3¶
Base method 3.
- verbose name: Method3
- default value: None
- port type: GraphPort
- value type: Graph
method3__signature¶
Signature for the "method3" input. This represents the signature for the subgraph that is wired into the "method3" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "method3" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
- verbose name: Method3 [Signature]
- default value: (data)
- port type: Port
- value type: object (can be None)
method4¶
Base method 4.
- verbose name: Method4
- default value: None
- port type: GraphPort
- value type: Graph
method4__signature¶
Signature for the "method4" input. This represents the signature for the subgraph that is wired into the "method4" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "method4" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
- verbose name: Method4 [Signature]
- default value: (data)
- port type: Port
- value type: object (can be None)
method5¶
Base method 5.
- verbose name: Method5
- default value: None
- port type: GraphPort
- value type: Graph
method5__signature¶
Signature for the "method5" input. This represents the signature for the subgraph that is wired into the "method5" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "method5" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
- verbose name: Method5 [Signature]
- default value: (data)
- port type: Port
- value type: object (can be None)
enabled¶
Whether to enable multi-method ensembling. If disabled, only the first wired method is used and the remaining methods are ignored.
- verbose name: Enabled
- default value: True
- port type: BoolPort
- value type: bool (can be None)
rule¶
Rule used to combine predictions across methods. The mean is appropriate for probabilistic outputs. The median is a robust alternative that can help if one of the methods is occasionally erratic. Voting turns each method's predictions into class labels first and then returns the majority decision encoded as one-hot class probabilities.
- verbose name: Rule
- default value: mean
- port type: EnumPort
- value type: str (can be None)
initialize_once¶
Calibrate the wrapped methods only once. If set to False, then the node will retrain its wrapped methods whenever a non-streaming input dataset is received.
- verbose name: Calibrate Only Once
- default value: True
- port type: BoolPort
- value type: bool (can be None)
dont_reset_model¶
Do not reset the wrapped methods when the preceding graph is changed.
- verbose name: Do Not Reset Model
- default value: False
- port type: BoolPort
- value type: bool (can be None)
random_seed¶
Seed for any pseudo-random choices used by wrapped methods that accept a random_seed placeholder. This can either be a splittable seed or a plain integer.
- verbose name: Random Seed
- default value: 12345
- port type: Port
- value type: AnyNumeric
verbosity¶
Verbosity level for diagnostics.
- verbose name: Verbosity
- default value: 1
- port type: IntPort
- value type: int (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)