Hi Banu/Seshi,

Actually, it's the expected behavior of this extension. According to the
parameters you have provided in the above example, after 12 events, it will
start triggering output events. All the input data will be used to update
Markov matrix continuously while giving the outputs.

There is an output parameter called 'notify' [1]. It will give the
notification (true/false) if a particular event has a transition
probability less than the given threshold (0.5 in this case). You can use
that parameter to distinguish output events based on your requirement.

Hope you will be able to meet your requirement by modifying the above query
as below,

from markovStream#markov:markovChain(id, state, 60 min, 0.5, 12, true)
select txnid, id as cardnum, txnamt, currency, email, shippingaddress,
billingaddress, ip, itemNo, qty, timestamp, 0.0 as score, 100 as fraudflag,
transitionProbability as transitionProbability, notify
having notify == true
insert into FraudStream;

[1]
https://docs.wso2.com/display/CEP420/Markov+Models+Extension#319133f154a64f9bb1f2df7f2057a602


Thanks,
Ashen


On Tue, Apr 25, 2017 at 2:26 PM, Seshika Fernando <[email protected]> wrote:

> So to give bit more context, ideally the function should output only
> events that have transition probability less than the given threshold (0.5
> in this case).
>
> But now the output contains events that have transition probability more
> than the given threshold.
>
> On Tue, Apr 25, 2017 at 1:17 PM, Banu Nissanka <[email protected]> wrote:
>
>>
>> ---------- Forwarded message ----------
>> From: Banu Nissanka <[email protected]>
>> Date: Tue, Apr 25, 2017 at 1:12 PM
>> Subject: Markov extension is not filtering events properly with DAS-3.1.0
>> To: Sriskandarajah Suhothayan <[email protected]>, Mohanadarshan
>> Vivekanandalingam <[email protected]>
>> Cc: Seshika Fernando <[email protected]>
>>
>>
>> Hi,
>> Im working on fraud detection setup and  Im using the following markov
>> extention with it.
>>
>> from markovStream#markov:markovChain(id, state, 60 min, 0.5, 12, true)
>> select txnid,id as cardnum, txnamt,currency,email, shippingaddress,
>> billingaddress, ip,itemNo, qty,timestamp,0.0 as score, 100 as fraudflag,
>> transitionProbability as transitionProbability
>> insert into FraudStream;
>>
>> But this not perform filtering properly, outputs events which has 
>> transitionProbability
>> greater than 0.5 as well.
>>
>> Thanks,
>>
>> --
>>
>>
>> *Banu Nissanka*
>> Email : [email protected]
>> Mobile : +94713151493 <+94%2071%20315%201493>
>> Web : https://wso2.com/signature <http://wso2.com/signature>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "WSO2 Engineering Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "WSO2 Engineering Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>



-- 
*Ashen Weerathunga*
Software Engineer
WSO2 Inc.: http://wso2.com
lean.enterprise.middleware

Email: [email protected]
Mobile: +94716042995 <94716042995>
LinkedIn: *http://lk.linkedin.com/in/ashenweerathunga
<http://lk.linkedin.com/in/ashenweerathunga>*
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to