Extracting misclassified instances

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Extracting misclassified instances

alkunany
Hi,
Kindly just wondering about if I get help in how to extract  misclassified  instances ( not Remove)  into dataset so I can Classify it again ? like iteration process.
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

Eibe Frank-3
Take a look at boosting (e.g., AdaBoostM1 in WEKA). This seems similar to what you have in mind.

Cheers,
Eibe

On Sun, Aug 6, 2017 at 6:03 PM, alkunany <[hidden email]> wrote:
Hi,
Kindly just wondering about if I get help in how to extract  misclassified
instances ( not Remove)  into dataset so I can Classify it again ? like
iteration process.
Thanks



--
View this message in context: http://weka.8497.n7.nabble.com/Extracting-misclassified-instances-tp41434.html
Sent from the WEKA mailing list archive at Nabble.com.
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

alkunany
Thanks for your response ,
Maybe if I use Removelmisclassified filter and invert the selection it will work to get those instances in new dataset?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

Eibe Frank-2
Administrator
Yes, that works. Command-line-based example:

java -cp ~/weka-3-9-1/weka.jar weka.Run .RemoveMisclassified -V -i ~/datasets/UCI/iris.arff -c last -W .J48
@relation 'iris-weka.filters.unsupervised.instance.RemoveMisclassified-Wweka.classifiers.trees.J48 -C 0.25 -M 2-C-1-F0-T0.1-I0-V'

@attribute sepallength numeric
@attribute sepalwidth numeric
@attribute petallength numeric
@attribute petalwidth numeric
@attribute class {Iris-setosa,Iris-versicolor,Iris-virginica}

@data

5.9,3.2,4.8,1.8,Iris-versicolor
4.9,2.5,4.5,1.7,Iris-virginica
7.2,3,5.8,1.6,Iris-virginica

Cheers,
Eibe

> On 6/08/2017, at 8:43 PM, alkunany <[hidden email]> wrote:
>
> Thanks for your response ,
> Maybe if I use Removelmisclassified filter and invert the selection it will
> work to get those instances in new dataset?
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Extracting-misclassified-instances-tp41434p41438.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

alkunany
This post was updated on .
Dear Eibe
Thanks for response.
by the way dose weka support a method to passing the misclassified instances from one base classifier into another one ( not meta classifier) ? or I have to extracted manually and apply it again with the classifier  ?  
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

Eibe Frank-3
You can use the FilteredClassifier (from the meta package of classifiers).

Cheers,
Eibe

On Tue, Aug 8, 2017 at 6:54 PM, alkunany <[hidden email]> wrote:
Dear Erike
Thanks for response.
by the way dose weka support a method to passing the misclassified instances
from one classifier into another one ? or I have to extracted manually and
apply it again with the classifier  ?
Thanks



--
View this message in context: http://weka.8497.n7.nabble.com/Extracting-misclassified-instances-tp41434p41448.html
Sent from the WEKA mailing list archive at Nabble.com.
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html


_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

alkunany
Dear Ebie
I didn't find any tutorial to explain how to pass the misclassified instances
from one classifier into another one.
Could you please help me in that ?
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

Eibe Frank-2
Administrator
I’m still not entirely sure what you have in mind but here is an example with the FilteredClassifier (giving very poor results in this case because there are very few misclassified instances that remain to build the classifier).

Cheers,
Eibe

java -cp ~/weka-3-8-1/weka.jar weka.Run .FilteredClassifier -F ".RemoveMisclassified -V -W .J48" -W .J48  -t ~/IdeaProjects/Weka/trunk/wekadocs/data/iris.arff

Options: -F ".RemoveMisclassified -V -W .J48" -W .J48

FilteredClassifier using weka.classifiers.trees.J48 -C 0.25 -M 2 on data filtered through weka.filters.unsupervised.instance.RemoveMisclassified -W "weka.classifiers.trees.J48 -C 0.25 -M 2" -C -1 -F 0 -T 0.1 -I 0 -V

Filtered Header
@relation 'iris-weka.filters.unsupervised.instance.RemoveMisclassified-Wweka.classifiers.trees.J48 -C 0.25 -M 2-C-1-F0-T0.1-I0-V'

@attribute sepallength numeric
@attribute sepalwidth numeric
@attribute petallength numeric
@attribute petalwidth numeric
@attribute class {Iris-setosa,Iris-versicolor,Iris-virginica}

@data


Classifier Model
J48 pruned tree
------------------
: Iris-virginica (3.0/1.0)

Number of Leaves  : 1

Size of the tree : 1


Time taken to build model: 0.02 seconds
Time taken to test model on training data: 0 seconds

=== Error on training data ===

Correctly Classified Instances          50               33.3333 %
Incorrectly Classified Instances       100               66.6667 %
Kappa statistic                          0    
Mean absolute error                      0.4444
Root mean squared error                  0.5443
Relative absolute error                100      %
Root relative squared error            115.4701 %
Total Number of Instances              150    


=== Detailed Accuracy By Class ===

                 TP Rate  FP Rate  Precision  Recall   F-Measure  MCC      ROC Area  PRC Area  Class
                 0.000    0.000    0.000      0.000    0.000      0.000    0.500     0.333     Iris-setosa
                 0.000    0.000    0.000      0.000    0.000      0.000    0.500     0.333     Iris-versicolor
                 1.000    1.000    0.333      1.000    0.500      0.000    0.500     0.333     Iris-virginica
Weighted Avg.    0.333    0.333    0.111      0.333    0.167      0.000    0.500     0.333    


=== Confusion Matrix ===

  a  b  c   <-- classified as
  0  0 50 |  a = Iris-setosa
  0  0 50 |  b = Iris-versicolor
  0  0 50 |  c = Iris-virginica



=== Stratified cross-validation ===

Correctly Classified Instances          50               33.3333 %
Incorrectly Classified Instances       100               66.6667 %
Kappa statistic                          0    
Mean absolute error                      0.4444
Root mean squared error                  0.5544
Relative absolute error                100      %
Root relative squared error            117.6152 %
Total Number of Instances              150    


=== Detailed Accuracy By Class ===

                 TP Rate  FP Rate  Precision  Recall   F-Measure  MCC      ROC Area  PRC Area  Class
                 0.000    0.000    0.000      0.000    0.000      0.000    0.500     0.333     Iris-setosa
                 0.400    0.400    0.333      0.400    0.364      0.000    0.500     0.333     Iris-versicolor
                 0.600    0.600    0.333      0.600    0.429      0.000    0.500     0.333     Iris-virginica
Weighted Avg.    0.333    0.333    0.222      0.333    0.264      0.000    0.500     0.333    


=== Confusion Matrix ===

  a  b  c   <-- classified as
  0 20 30 |  a = Iris-setosa
  0 20 30 |  b = Iris-versicolor
  0 20 30 |  c = Iris-virginica


> On 9/08/2017, at 9:49 PM, alkunany <[hidden email]> wrote:
>
> Dear Ebie
> I didn't find any tutorial to explain how to pass the misclassified
> instances
> from one classifier into another one.
> Could you please help me in that ?
> Thanks
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Extracting-misclassified-instances-tp41434p41453.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

alkunany
Dear Eibe
Thanks For response .
I know how to do that but the question is how to pass the misclasssifed instances into another classier ?
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extracting misclassified instances

Eibe Frank-2
Administrator
This is what happens in the example I sent you. The FilteredClassifier passes the misclassified data on to the specified base learner (J48).

Cheers,
Eibe

> On 10/08/2017, at 5:50 PM, alkunany <[hidden email]> wrote:
>
> Dear Eibe
> Thanks For response .
> I know how to do that but the question is how to pass the misclasssifed
> instances into another classier ?
> Thanks
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Extracting-misclassified-instances-tp41434p41461.html
> Sent from the WEKA mailing list archive at Nabble.com.
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Loading...