Operator SparkNaiveBayes
SPL standard and specialized toolkits > com.ibm.streamsx.sparkmllib 1.0.0 > com.ibm.streamsx.sparkmllib.classification > SparkNaiveBayes
This operator provides support for analysis of incoming tuple data against Apache Spark's naive bayes machine learning library.
Summary
- Ports
- This operator has 2 input ports and 1 output port.
- Windowing
- This operator does not accept any windowing configurations.
- Parameters
- This operator supports 4 parameters. (testDataAttr, modelPath, params, sparkMaster)
- Metrics
- This operator does not report any metrics.
Properties
- Implementation
- Java™
- Ports (0)
-
This input port is required. The operator expects an attribute of type list<float64> that will be used as input to the naive bayes algorithm.
- Properties
-
- Optional: false
- ControlPort: false
- WindowingMode: NonWindowed
- WindowPunctuationInputMode: Oblivious
- Ports (1)
-
This input control port is optional. The port expects a single attribute of type rstring and the value must be a string in JSON format. For example, to reload the spark model, the attribute value must be set to '{"reloadModel":true}'.
- Properties
-
- Optional: true
- ControlPort: true
- WindowingMode: NonWindowed
- WindowPunctuationInputMode: Oblivious
- Assignments
- Java operators do not support output assignments.
- Ports (0)
-
This output port is required. The operator passes through all attributes on the input port as-is to the output port. In addition, it expects an attribute called 'analysisResult' of type float64.
- Properties
-
- Optional: false
- testDataAttr
- Properties
-
- Type: list<float64>
- Cardinality: 1
- Optional: false
- ExpressionMode: Attribute
- modelPath
The path containing the persisted analytic model
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: false
- params
The parameters to be passed to the spark configuration as a comma-separated list of 'key=value'
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- sparkMaster
The spark master to use during the analysis. If not specified, the default value is 'local'
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- Operator class library
- Library Path: ../../impl/lib/streams-sparkmllib.jar, @SPARK_HOME@/lib/*