Hi Srinath,
We added #1 for better usability. When there's a long list of feature
values to be passed to the ML model, we do not need to specify the
attribute values explicitly. Extension will match the attribute names of
the input stream with the feature names of the model and does the
prediction.
for #1, we have to give the query as follows,
from InputStream#ml:predict('ml-model')
select *
insert into PredictionStream
Thanks.
On Fri, May 15, 2015 at 9:05 AM, Srinath Perera <[email protected]> wrote:
> Why don't we only do #2. What is the advantage/ use case of having #1?
>
> On Thu, May 14, 2015 at 4:17 PM, Sriskandarajah Suhothayan <[email protected]>
> wrote:
>
>> When done also add this to the Siddhi documentation at[1]
>>
>> Suho
>>
>> [1]https://docs.wso2.com/display/CEP400/Siddhi+Extensions
>>
>> On Thu, May 14, 2015 at 3:35 PM, Manorama Perera <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> We are in the process of implementing a CEP extension for Machine
>>> Learner Predictions. This extension allows the machine learning models
>>> generated by WSO2 ML to be used within CEP for predictions.
>>>
>>> To use this, following ML features need to be installed in CEP.
>>>
>>> - Machine Learner Core feature
>>> - Machine Learner Commons feature
>>> - Machine Learner Database Service feature
>>>
>>> This extension is implemented as a *StreamProcessor*.
>>>
>>> *The syntax :*
>>>
>>> There are two possible ways to use the extension.
>>>
>>> *<stream-name>#ml:predict(‘<path-to-ML-model>’) *
>>>
>>> *<stream-name>#ml:predict('<path-to-ML-model>', attribute 1, attribute
>>> 2, .......)*
>>>
>>> *path-to-MLModel*
>>>
>>> The storage location of the Machine learning model can be either
>>> registry or file system.
>>>
>>> If the model is stored in the registry, *path-to-ML-model* should have
>>> the prefix *registry:*
>>> If the model is stored in the file system, *path-to-ML-model* should
>>> have the prefix *file:*
>>>
>>> *attribute 1, attribute 2, ….*
>>>
>>> These are the attribute names of the stream. The values of these
>>> attributes are sent to the MLModel as feature input values. When the
>>> attribute names are not explicitly given, the extension will map the
>>> attribute names of the stream with the feature names of the ML model.
>>>
>>> The output events will contain the attribute* prediction* which holds
>>> the prediction result for that particular event.
>>>
>>> Thanks.
>>>
>>> --
>>> Manorama Perera
>>> Software Engineer
>>> WSO2, Inc.; http://wso2.com/
>>> Mobile : +94716436216
>>>
>>
>>
>>
>> --
>>
>> *S. Suhothayan*
>> Technical Lead & Team Lead of WSO2 Complex Event Processor
>> *WSO2 Inc. *http://wso2.com
>> * <http://wso2.com/>*
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
>> http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter:
>> http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in:
>> http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
>>
>
>
>
> --
> ============================
> Blog: http://srinathsview.blogspot.com twitter:@srinath_perera
> Site: http://people.apache.org/~hemapani/
> Photos: http://www.flickr.com/photos/hemapani/
> Phone: 0772360902
>
--
Manorama Perera
Software Engineer
WSO2, Inc.; http://wso2.com/
Mobile : +94716436216
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture