want to remove data by prediction score , anyone done this before?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

want to remove data by prediction score , anyone done this before?

linlin
using weka.classifiers.evaluation.output.prediction.CSV
and i got this csv
=== Predictions under cross-validation ===
                               
inst#actual,predicted ,prediction
1 1:N 1:N 0.68
2 1:N 1:N 0.73

wanna try to remove data with prediction score
for example if score under 0.70 than remove
but no idea how to do it



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: want to remove data by prediction score , anyone done this before?

Peter Reutemann
> using weka.classifiers.evaluation.output.prediction.CSV
> and i got this csv
> === Predictions under cross-validation ===
>
> inst#actual,predicted   ,prediction
> 1       1:N     1:N             0.68
> 2       1:N     1:N             0.73
>
> wanna try to remove data with prediction score
> for example if score under 0.70 than remove
> but no idea how to do it

You could use the AddClassification filter to add the prediction to the dataset:
https://weka.sourceforge.io/doc.dev/weka/filters/supervised/attribute/AddClassification.html

And then use the SubsetByExpression filter to remove the unwanted instances:
https://weka.sourceforge.io/doc.dev/weka/filters/unsupervised/instance/SubsetByExpression.html

Finally, just remove the attribute that contained the prediction again
using the Remove filter:
https://weka.sourceforge.io/doc.dev/weka/filters/unsupervised/attribute/Remove.html

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 577-5304
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: want to remove data by prediction score , anyone done this before?

linlin
thanks for your quick and helpful reply!

just wondering have you ever gotten this error ?
##Unable to determine structure as arff (Reason: java.io.IOException:
premature end of file, read Token[EOF], line 1).

while using  java -cp ./weka.jar weka.filters.unsupervised.attribute.Remove
command


Best regards,        




--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: want to remove data by prediction score , anyone done this before?

佐藤 広行
Hello

Please look into the arff with a binary editor.
You may find EOF at line 1.

Hiro

-----Original Message-----
From: linlin [mailto:[hidden email]]
Sent: Sunday, January 31, 2021 5:46 PM
To: [hidden email]
Subject: [Wekalist] Re: want to remove data by prediction score , anyone done this before?

thanks for your quick and helpful reply!

just wondering have you ever gotten this error ?
##Unable to determine structure as arff (Reason: java.io.IOException:
premature end of file, read Token[EOF], line 1).

while using  java -cp ./weka.jar weka.filters.unsupervised.attribute.Remove
command


Best regards,        




--
Sent from: https://weka.8497.n7.nabble.com/ _______________________________________________
Wekalist mailing list -- [hidden email] Send posts to [hidden email] To unsubscribe send an email to [hidden email] To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: want to remove data by prediction score , anyone done this before?

Peter Reutemann
> Please look into the arff with a binary editor.
> You may find EOF at line 1.

EOF is short for "end of file". Weka expected to read data from the
file, but it appears to be empty. Did you accidentally overwrite your
original file?

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 577-5304
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html