org.wso2.extension.siddhi.execution.streamingml.bayesian.classification

## Class BayesianClassificationUpdaterStreamProcessorExtension

- java.lang.Object
- - org.wso2.siddhi.core.query.processor.stream.AbstractStreamProcessor
  - - org.wso2.siddhi.core.query.processor.stream.StreamProcessor
    - - org.wso2.extension.siddhi.execution.streamingml.bayesian.classification.BayesianClassificationUpdaterStreamProcessorExtension

- All Implemented Interfaces:
    org.wso2.siddhi.core.query.processor.Processor, org.wso2.siddhi.core.util.extension.holder.EternalReferencedHolder, org.wso2.siddhi.core.util.snapshot.Snapshotable

      public class BayesianClassificationUpdaterStreamProcessorExtension
      extends org.wso2.siddhi.core.query.processor.stream.StreamProcessor

  Bayesian classification using multivariate logistic regression.

- - ### Field Summary

    - ### Fields inherited from class org.wso2.siddhi.core.query.processor.stream.StreamProcessor

      `outputExpectsExpiredEvents`

    - ### Fields inherited from class org.wso2.siddhi.core.query.processor.stream.AbstractStreamProcessor

      `additionalAttributes, attributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, elementId, inputDefinition, nextProcessor, queryName, siddhiAppContext, streamEventCloner, streamEventClonerHolder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BayesianClassificationUpdaterStreamProcessorExtension()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Object>` | `currentState()` Used to collect the serializable state of the processing element, that need to be.
    `protected List<org.wso2.siddhi.query.api.definition.Attribute>` | `init(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition, org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors, org.wso2.siddhi.core.util.config.ConfigReader configReader, org.wso2.siddhi.core.config.SiddhiAppContext siddhiAppContext)` The initialization method for `StreamProcessor`, which will be called before other methods and validate the all configuration and getting the initial values.
    `protected void` | `process(org.wso2.siddhi.core.event.ComplexEventChunk<org.wso2.siddhi.core.event.stream.StreamEvent> streamEventChunk, org.wso2.siddhi.core.query.processor.Processor nextProcessor, org.wso2.siddhi.core.event.stream.StreamEventCloner streamEventCloner, org.wso2.siddhi.core.event.stream.populater.ComplexEventPopulater complexEventPopulater)` Process events received by BayesianClassificationUpdateStreamingProcessorExtension.
    `void` | `restoreState(Map<String,Object> state)` Used to restore serialized state of the processing element, for reconstructing.
    `void` | `start()` This will be called only once and this can be used to acquire required resources for the processing element.
    `void` | `stop()` This will be called only once and this can be used to release the acquired resources for processing.

    - ### Methods inherited from class org.wso2.siddhi.core.query.processor.stream.StreamProcessor

      `init, processEventChunk`

    - ### Methods inherited from class org.wso2.siddhi.core.query.processor.stream.AbstractStreamProcessor

      `cloneProcessor, constructStreamEventPopulater, getElementId, getNextProcessor, initProcessor, process, setNextProcessor, setStreamEventCloner, setToLast`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BayesianClassificationUpdaterStreamProcessorExtension

          public BayesianClassificationUpdaterStreamProcessorExtension()

  - ### Method Detail

    - #### init

          protected List<org.wso2.siddhi.query.api.definition.Attribute> init(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition,
                                                                              org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors,
                                                                              org.wso2.siddhi.core.util.config.ConfigReader configReader,
                                                                              org.wso2.siddhi.core.config.SiddhiAppContext siddhiAppContext)

      The initialization method for `StreamProcessor`, which will be called before other methods and validate the all configuration and getting the initial values.
      Specified by:
        `init` in class `org.wso2.siddhi.core.query.processor.stream.StreamProcessor`
      Parameters:
        `attributeExpressionExecutors` - are the executors of each attributes in the Function
        `siddhiAppContext` - Siddhi app runtime context

    - #### process

          protected void process(org.wso2.siddhi.core.event.ComplexEventChunk<org.wso2.siddhi.core.event.stream.StreamEvent> streamEventChunk,
                                 org.wso2.siddhi.core.query.processor.Processor nextProcessor,
                                 org.wso2.siddhi.core.event.stream.StreamEventCloner streamEventCloner,
                                 org.wso2.siddhi.core.event.stream.populater.ComplexEventPopulater complexEventPopulater)

      Process events received by BayesianClassificationUpdateStreamingProcessorExtension.
      Specified by:
        `process` in class `org.wso2.siddhi.core.query.processor.stream.StreamProcessor`
      Parameters:
        `streamEventChunk` - the event chunk that need to be processed
        `nextProcessor` - the next processor to which the success events need to be passed
        `streamEventCloner` - helps to clone the incoming event for local storage or modification
        `complexEventPopulater` - helps to populate the events with the resultant attributes

    - #### start

          public void start()

      This will be called only once and this can be used to acquire required resources for the processing element. This will be called after initializing the system and before starting to process the events.

    - #### stop

          public void stop()

      This will be called only once and this can be used to release the acquired resources for processing. This will be called before shutting down the system.

    - #### currentState

          public Map<String,Object> currentState()

      Used to collect the serializable state of the processing element, that need to be. persisted for reconstructing the element to the same state on a different point of time
      Returns:
        stateful objects of the processing element as an map

    - #### restoreState

          public void restoreState(Map<String,Object> state)

      Used to restore serialized state of the processing element, for reconstructing. the element to the same state as if was on a previous point of time.
      Parameters:
        `state` - the stateful objects of the processing element as a map. This is the same map that is created upon calling currentState() method.

Copyright © 2019 WSO2. All rights reserved.