ensemble of filters

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

ensemble of filters

Abdrahman0x
Hi,

Is there any ensemble of filters rather than multifilter. The only ones
found are ensemble for classifiers such as AdaBoost, Bagging and Stacking.
Is there any for filter methods?

Thanks,
AR



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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
|

Re: ensemble of filters

Eibe Frank-3
As an alternative to MultiFilter, you can nest meta learning schemes such as FilteredClassifier. And you can also use FilteredClassifier as a base classifier in AdaBoost, etc., if you want to apply a filter to build an ensemble classifier.

Cheers,
Eibe

On Fri, Aug 9, 2019 at 8:00 PM Abdrahman0x <[hidden email]> wrote:
Hi,

Is there any ensemble of filters rather than multifilter. The only ones
found are ensemble for classifiers such as AdaBoost, Bagging and Stacking.
Is there any for filter methods?

Thanks,
AR



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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]
To subscribe, unsubscribe, etc., visit 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
|

Re: ensemble of filters

Abdrahman0x
Thank you Eibe,

What I am looking for is ensemble of selection filters not classifiers. How
can I group a set of selection filter algorithms such as GainRation, Genetic
Search, and CFS for example all togother before using or passing the reduced
set to be evaluated by a classifier. How such thing can be implemented in
Weka?

Thank you
AR



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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
|

Re: ensemble of filters

Abdrahman0x
Abdrahman0x wrote

> Thank you Eibe,
>
> What I am looking for is ensemble of selection filters not classifiers.
> How
> can I group a set of selection filter algorithms such as GainRation,
> Genetic
> Search, and CFS for example all togother before using or passing the
> reduced
> set to be evaluated by a classifier. How such thing can be implemented in
> Weka?
>
> Thank you
> AR
>
>
>
> --
> Sent from: https://weka.8497.n7.nabble.com/
> _______________________________________________
> Wekalist mailing list
> Send posts to:

> Wekalist@.ac

> To subscribe, unsubscribe, etc., visit
> https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Can anyone guide me about this? How make ensemble of selection algorithms?

Thank you
AR



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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
|

Re: ensemble of filters

Eibe Frank-3
In reply to this post by Abdrahman0x
This may have already been answered in one of your other questions. Anyway, you can use the MultiFilter to combine several AttributeSelection filters and put the MultiFilter into a FilteredClassifier. Alternatively, you can just chain together several AttributeSelectedClassifier objects, nesting each of them into the previous one in the chain.

Cheers,
Eibe

On Sat, Aug 10, 2019 at 7:16 PM Abdrahman0x <[hidden email]> wrote:
Thank you Eibe,

What I am looking for is ensemble of selection filters not classifiers. How
can I group a set of selection filter algorithms such as GainRation, Genetic
Search, and CFS for example all togother before using or passing the reduced
set to be evaluated by a classifier. How such thing can be implemented in
Weka?

Thank you
AR



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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]
To subscribe, unsubscribe, etc., visit 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
|

Re: ensemble of filters

Abdrahman0x
Thank you Eibe, I got it

cheers,
AR



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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
|

bug report: minor bug in RemoveType filter

Ted Cary
Hello,

I believe there is a minor bug in the RemoveType filter (weka.filters.unsupervised.attribute.RemoveType), described below.  This is on Weka version 3.8.3; java version: jdk-12.0.2; Windows 7 64-bit.

Our use case is that when we use ensemble meta classifiers, we often need to perform a practitioner’s regulation, filtering only nominal attributes to one base classifier, and numerical attributes to another base classifier, etc, but if the attributes to be passed (invert-selected) by the filter and the class attribute are both nominal, RemoveType fails.  

In the code, this is because if invertSelection (m_invert) is set for the filter, and the class attribute is of the same type as attributeType (m_attTypeToDelete), then the attribute will be added twice in a row to attsToDelete, in both lines 129 and in line 134.  Since m_invert is set, attsToDelete really contains attributes to *retain*, so later remove.setInputFormat will throw the following exception because it tries to create Instances where two attributes have the same name:

java.lang.IllegalArgumentException: Attribute names are not unique! Causes: 'Diagnosis' weka.core.Instances.<init>(Instances.java:264)

(Our nominal class attribute was named 'Diagnosis'.)

The quick code fix that I used was to bracket line 129 with the following “if” condition:

if (instanceInfo.attribute(i).type() != m_attTypeToDelete) {attsToDelete[numToDelete++] = i;}

There are also awkward workarounds you could try in Explorer, like to temporarily change your class attribute and then change it back after applying the filter, but it would better if the filter code were patched. 

HTH, 
TC

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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
|

Re: bug report: minor bug in RemoveType filter

Eibe Frank-2
Administrator
Thanks for reporting this bug! I have committed a fix to all applicable branches and the next nightly snapshots should have the fix.

Cheers,
Eibe

> On 29/08/2019, at 3:08 AM, Ted Cary <[hidden email]> wrote:
>
> Hello,
>
> I believe there is a minor bug in the RemoveType filter (weka.filters.unsupervised.attribute.RemoveType), described below.  This is on Weka version 3.8.3; java version: jdk-12.0.2; Windows 7 64-bit.
>
> Our use case is that when we use ensemble meta classifiers, we often need to perform a practitioner’s regulation, filtering only nominal attributes to one base classifier, and numerical attributes to another base classifier, etc, but if the attributes to be passed (invert-selected) by the filter and the class attribute are both nominal, RemoveType fails.  
>
> In the code, this is because if invertSelection (m_invert) is set for the filter, and the class attribute is of the same type as attributeType (m_attTypeToDelete), then the attribute will be added twice in a row to attsToDelete, in both lines 129 and in line 134.  Since m_invert is set, attsToDelete really contains attributes to *retain*, so later remove.setInputFormat will throw the following exception because it tries to create Instances where two attributes have the same name:
>
> java.lang.IllegalArgumentException: Attribute names are not unique! Causes: 'Diagnosis' weka.core.Instances.<init>(Instances.java:264)
>
> (Our nominal class attribute was named 'Diagnosis'.)
>
> The quick code fix that I used was to bracket line 129 with the following “if” condition:
>
> if (instanceInfo.attribute(i).type() != m_attTypeToDelete) {attsToDelete[numToDelete++] = i;}
>
> There are also awkward workarounds you could try in Explorer, like to temporarily change your class attribute and then change it back after applying the filter, but it would better if the filter code were patched.
>
> HTH,
> TC
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> To subscribe, unsubscribe, etc., visit 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]
To subscribe, unsubscribe, etc., visit 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
|

Re: bug report: minor bug in RemoveType filter

Ted Cary
That was fast, thanks Eibe!

On Wed, Aug 28, 2019 at 9:41 PM Eibe Frank <[hidden email]> wrote:
Thanks for reporting this bug! I have committed a fix to all applicable branches and the next nightly snapshots should have the fix.

Cheers,
Eibe

> On 29/08/2019, at 3:08 AM, Ted Cary <[hidden email]> wrote:
>
> Hello,
>
> I believe there is a minor bug in the RemoveType filter (weka.filters.unsupervised.attribute.RemoveType), described below.  This is on Weka version 3.8.3; java version: jdk-12.0.2; Windows 7 64-bit.
>
> Our use case is that when we use ensemble meta classifiers, we often need to perform a practitioner’s regulation, filtering only nominal attributes to one base classifier, and numerical attributes to another base classifier, etc, but if the attributes to be passed (invert-selected) by the filter and the class attribute are both nominal, RemoveType fails. 
>
> In the code, this is because if invertSelection (m_invert) is set for the filter, and the class attribute is of the same type as attributeType (m_attTypeToDelete), then the attribute will be added twice in a row to attsToDelete, in both lines 129 and in line 134.  Since m_invert is set, attsToDelete really contains attributes to *retain*, so later remove.setInputFormat will throw the following exception because it tries to create Instances where two attributes have the same name:
>
> java.lang.IllegalArgumentException: Attribute names are not unique! Causes: 'Diagnosis'       weka.core.Instances.<init>(Instances.java:264)
>
> (Our nominal class attribute was named 'Diagnosis'.)
>
> The quick code fix that I used was to bracket line 129 with the following “if” condition:
>
> if (instanceInfo.attribute(i).type() != m_attTypeToDelete) {attsToDelete[numToDelete++] = i;}
>
> There are also awkward workarounds you could try in Explorer, like to temporarily change your class attribute and then change it back after applying the filter, but it would better if the filter code were patched.
>
> HTH,
> TC
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> To subscribe, unsubscribe, etc., visit 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]
To subscribe, unsubscribe, etc., visit 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]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html