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

## Class PerceptronClassifierStreamProcessorExtension

- 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.classification.perceptron.PerceptronClassifierStreamProcessorExtension

- 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 PerceptronClassifierStreamProcessorExtension
      extends org.wso2.siddhi.core.query.processor.stream.StreamProcessor

  Predict using a linear binary classification Perceptron model built via `PerceptronClassifierStreamProcessorExtension`

- - ### 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
    `PerceptronClassifierStreamProcessorExtension()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Object>` | `currentState()`
    `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)`
    `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 PerceptronClassifierUpdaterStreamProcessorExtension
    `void` | `restoreState(Map<String,Object> state)`
    `void` | `start()`
    `void` | `stop()`

    - ### 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

    - #### PerceptronClassifierStreamProcessorExtension

          public PerceptronClassifierStreamProcessorExtension()

  - ### 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)

      Specified by:
        `init` in class `org.wso2.siddhi.core.query.processor.stream.StreamProcessor`

    - #### 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 PerceptronClassifierUpdaterStreamProcessorExtension
      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()

    - #### stop

          public void stop()

    - #### currentState

          public Map<String,Object> currentState()

    - #### restoreState

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

Copyright © 2019 WSO2. All rights reserved.