Ah yes. That would work. :)

On Thu, Jun 9, 2016 at 10:07 AM, Ashen Weerathunga <[email protected]> wrote:

> @Suho,
> sure, I'll handle that.
>
> @Seshi,
> I'm writing this as an Aggregate Function Extension. Therefore, it will
> be supported for all the window types that currently supports for aggregate
> functions such as avg, min, max etc. As an example, we can write a query as
> below,
>
> *from inputStream#window.lengthBatch(100)*
> *select math:percentile(temperature, 97.0) as percentile*
> *insert into outputStream;*
>
> Above query will return the 97th percentile value of last 100 events of
> temperature variable.
>
> Likewise, we can use other windows such as timeBatch, cron etc as for the
> requirement. Would that approach be OK with this?
>
> Thanks,
> Ashen
>
> On Thu, Jun 9, 2016 at 5:18 AM, Seshika Fernando <[email protected]> wrote:
>
>> Ashen,
>> Is there no way that we can provide a window for temperature field?
>> Practically, we may want to know the 97th percentile of the last n events.
>> In that case how would I use this extension? It might be a good idea to
>> allow user to provide an interval based on length and/or time (like we do
>> for regression)
>>
>> On 9 Jun 2016 01:54, "Sriskandarajah Suhothayan" <[email protected]> wrote:
>> >
>> > Since p can't change during the execution, make sure to force p to be a
>> constant value.
>> > Am I correct here ?
>>
>> +1. Yes, it should be constant.
>>
>> >
>> > Regards
>> > Suho
>> >
>> > On Wed, Jun 8, 2016 at 6:38 AM, Ashen Weerathunga <[email protected]>
>> wrote:
>> >>
>> >> Hi All,
>> >>
>> >> I'm writing a siddhi extension for calculating percentile values. This
>> will be implemented as an Aggregate Function Extension under math
>> extensions. Two input parameter will be required for this function as below:
>> >>
>> >> <double> percentile(<int|long|double|float> arg, <double> p)
>> >> arg : values that need to be considered when calculating the
>> percentile value
>> >> p : percentile
>> >> This will return an estimate for pth percentile of arg values.
>> >> eg : percentile(temperature, 95.0)
>> >> returns the 95th percentile value of all the temperature events based
>> on their arrival and expiry.
>> >> Please let me know if you have any suggestions on this.
>> >>
>> >> Thanks,
>> >> Ashen
>> >>
>> >> --
>> >> Ashen Weerathunga
>> >> Software Engineer
>> >> WSO2 Inc.: http://wso2.com
>> >> lean.enterprise.middleware
>> >>
>> >> Email: [email protected]
>> >> Mobile: +94 716042995
>> >> LinkedIn: http://lk.linkedin.com/in/ashenweerathunga
>> >
>> >
>> >
>> >
>> > --
>> > S. Suhothayan
>> > Technical Lead & Team Lead of WSO2 Complex Event Processor
>> > WSO2 Inc. http://wso2.com
>> > lean . enterprise . middleware
>> >
>> > cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
>> > twitter: http://twitter.com/suhothayan | linked-in:
>> http://lk.linkedin.com/in/suhothayan
>> >
>> > _______________________________________________
>> > Architecture mailing list
>> > [email protected]
>> > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>> >
>>
>>
>
>
> --
> *Ashen Weerathunga*
> Software Engineer
> WSO2 Inc.: http://wso2.com
> lean.enterprise.middleware
>
> Email: [email protected]
> Mobile: +94 716042995 <94716042995>
> LinkedIn: *http://lk.linkedin.com/in/ashenweerathunga
> <http://lk.linkedin.com/in/ashenweerathunga>*
>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to