samoa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianmarco De Francisci Morales <g...@apache.org>
Subject Re: Storing predictions of each instance
Date Sun, 07 Feb 2016 13:30:03 GMT
Hi Eduardo,

We actually already do something like that to compute the final statistics.
Have a look at the code of the classification evaluator.
https://github.com/apache/incubator-samoa/blob/master/samoa-api/src/main/java/org/apache/samoa/evaluation/BasicClassificationPerformanceEvaluator.java

Cheers,

-- Gianmarco

On Thu, Feb 4, 2016 at 7:38 PM, Eduardo Costa <eduardocosi@gmail.com> wrote:

> Hi Nicolas, thanks for fast reply!
>
> I want to test my model against every instance that comes in and store the
> prediction result for every instance e.g:
>
>    inst#,   actual,  predicted,  error
>      1       2:no      1:yes      +
>      2       2:no      1:yes      +
>      3      1:yes      1:yes
>      4      1:yes      1:yes
>      5      1:yes      1:yes
>
> Because I'm trying to build a rudimentary system for the detection of
> anomalies using SAMOA to classify instances in anomaly or normal and I need
> these information to calculate the false positives, false negatives and
> correlate with other information.
>
> Best regards,
> Eduardo.
>
> 2016-02-04 6:47 GMT-02:00 Nicolas Kourtellis <nkourtellis@gmail.com>:
>
> > Hi Eduardo,
> >
> > Welcome and thanks for trying out SAMOA!
> >
> > I am not sure what you mean by "each instance".
> >
> > You want to test your model against every instance that comes in?
> > And for that you want to output the prediction of this test?
> >
> > Or you want to test your model at some regular intervals (e.g., every
> > 100k instances) and output the prediction of this test every time?
> >
> > The parameter -f should allow you to adjust how frequently you test your
> > current model. However, I wouldn't set it for every instance!
> > Thats probably an overkill.
> >
> > Regarding the output of the prediction, you should be able to define
> > a .csv output file of the prediction performance using the parameter -d
> > in the PrequentialEvaluation.
> >
> > Hope this helps!
> >
> > Nicolas
> >
> >
> >
> >
> >
> > On Thu, Feb 4, 2016 at 1:42 AM, Eduardo Costa <eduardocosi@gmail.com>
> > wrote:
> >
> > > I'm begining to use SAMOA and  I' d like to store in a file or mysql
> the
> > > prediction for each instance when I use this command: bin/samoa storm
> > > target/SAMOA-Storm-0.4.0-incubating-SNAPSHOT.jar "PrequentialEvaluation
> > -l
> > > (classifiers.ensemble.AdaptiveBagging -s 2) -s
> > > (org.apache.samoa.moa.streams.ArffFileStream -f covtypeNorm.arff) -f
> > 100000
> > > -n ARFF-teste5"
> > >  , but I don't know what I must to do. Could you help-me?
> > > Cheers,
> > > Eduardo.
> > >
> >
> >
> >
> > --
> > Nicolas Kourtellis
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message