WekaDeepLearning4j classifier is greyed out

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

WekaDeepLearning4j classifier is greyed out

Theo

Hi.

 

I am experimenting with WekaDeepLearning4j (version 1.7.1)

I constructed the following multi-instance dataset for testing purposes.

 

@relation my_relation

 

@attribute bag relational

  @attribute f1 numeric

  @attribute f2 numeric

@end bag

@attribute class {0,1}

 

@data

"61,1\n165,8",1

"88,24\n251,62",0

 

I cannot use the WekaDeepLearning4j classifier in GUI (version 3.8.5). It is greyed out.

It is enabled for typical datasets (e.g Iris dataset)

 

Regards,

Theo


_______________________________________________
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: WekaDeepLearning4j classifier is greyed out

Peter Reutemann
> I am experimenting with WekaDeepLearning4j (version 1.7.1)
>
> I constructed the following multi-instance dataset for testing purposes.
>
>
>
> @relation my_relation
>
>
>
> @attribute bag relational
>
>   @attribute f1 numeric
>
>   @attribute f2 numeric
>
> @end bag
>
> @attribute class {0,1}
>
>
>
> @data
>
> "61,1\n165,8",1
>
> "88,24\n251,62",0
>
>
>
> I cannot use the WekaDeepLearning4j classifier in GUI (version 3.8.5). It is greyed out.
>
> It is enabled for typical datasets (e.g Iris dataset)

Each classifier can handle only certain types of attributes natively.
You need to either preprocess the data for the classifier with the
appropriate filter (recommended to combine reprocessing and base
classifier with the FilteredClassifier meta-classifier) or find
another classifier.

For a dataset with a relational attribute, you could try classifiers
from the multiInstanceLearning package.

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: WekaDeepLearning4j classifier is greyed out

Eibe Frank-2
Administrator


> On 15/04/2021, at 9:05 AM, Peter Reutemann <[hidden email]> wrote:
>
>> I am experimenting with WekaDeepLearning4j (version 1.7.1)
>>
>> I constructed the following multi-instance dataset for testing purposes.
>>
>>
>>
>> @relation my_relation
>>
>>
>>
>> @attribute bag relational
>>
>>  @attribute f1 numeric
>>
>>  @attribute f2 numeric
>>
>> @end bag
>>
>> @attribute class {0,1}
>>
>>
>>
>> @data
>>
>> "61,1\n165,8",1
>>
>> "88,24\n251,62",0
>>
>>
>>
>> I cannot use the WekaDeepLearning4j classifier in GUI (version 3.8.5). It is greyed out.
>>
>> It is enabled for typical datasets (e.g Iris dataset)

It should be possible to apply the RnnSequenceClassifier in WekaDeeplearning4j to relational data by using the RelationalInstanceIterator:

  https://deeplearning.cms.waikato.ac.nz/user-guide/data/

Note that this learning algorithm is designed to be used for sequences (i.e., for sequence classification or regression), not unordered bags of instances like you would typically have in multi-instance problems.

> Each classifier can handle only certain types of attributes natively.
> You need to either preprocess the data for the classifier with the
> appropriate filter (recommended to combine reprocessing and base
> classifier with the FilteredClassifier meta-classifier) or find
> another classifier.
>
> For a dataset with a relational attribute, you could try classifiers
> from the multiInstanceLearning package.

And to filter the data into standard single-instance format by aggregation, there are also some corresponding processing tools in the multiInstanceFilters package (https://weka.sourceforge.io/doc.packages/multiInstanceFilters/): RELAGGS and MILESFilter.

Cheers,
Eibe
_______________________________________________
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: WekaDeepLearning4j classifier is greyed out

gyunksec
Wwàwaaaw

On Wed, 14 Apr 2021, 22:24 Eibe Frank, <[hidden email]> wrote:


> On 15/04/2021, at 9:05 AM, Peter Reutemann <[hidden email]> wrote:
>
>> I am experimenting with WekaDeepLearning4j (version 1.7.1)
>>
>> I constructed the following multi-instance dataset for testing purposes.
>>
>>
>>
>> @relation my_relation
>>
>>
>>
>> @attribute bag relational
>>
>>  @attribute f1 numeric
>>
>>  @attribute f2 numeric
>>
>> @end bag
>>
>> @attribute class {0,1}
>>
>>
>>
>> @data
>>
>> "61,1\n165,8",1
>>
>> "88,24\n251,62",0
>>
>>
>>
>> I cannot use the WekaDeepLearning4j classifier in GUI (version 3.8.5). It is greyed out.
>>
>> It is enabled for typical datasets (e.g Iris dataset)

It should be possible to apply the RnnSequenceClassifier in WekaDeeplearning4j to relational data by using the RelationalInstanceIterator:

  https://deeplearning.cms.waikato.ac.nz/user-guide/data/

Note that this learning algorithm is designed to be used for sequences (i.e., for sequence classification or regression), not unordered bags of instances like you would typically have in multi-instance problems.

> Each classifier can handle only certain types of attributes natively.
> You need to either preprocess the data for the classifier with the
> appropriate filter (recommended to combine reprocessing and base
> classifier with the FilteredClassifier meta-classifier) or find
> another classifier.
>
> For a dataset with a relational attribute, you could try classifiers
> from the multiInstanceLearning package.

And to filter the data into standard single-instance format by aggregation, there are also some corresponding processing tools in the multiInstanceFilters package (https://weka.sourceforge.io/doc.packages/multiInstanceFilters/): RELAGGS and MILESFilter.

Cheers,
Eibe
_______________________________________________
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: WekaDeepLearning4j classifier is greyed out

Theo
In reply to this post by Eibe Frank-2
My aim is to apply an lstm network.

The instances in each "bag" of the dataset are time depended. They include
data related to the same attributes, but recorded in sequential time slots.

Should I conclude from your answer, that instead of using WekaDeepLearning4j
classifier, is it equivalent to using RnnSequenceClassifier (with
RelationalInstanceIterator) and to configure the "layer specification"
adding i)LSTM-gateActivation and ii)RnnOutputLayer -lossFn ?



--
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: WekaDeepLearning4j classifier is greyed out

Eibe Frank-3
Yes, something along those lines should work. I have just tried

weka.classifiers.functions.RnnSequenceClassifier  -tBPTTBackward 3 -tBPTTForward 3  -normalization "No normalization/standardization" -iterator "weka.dl4j.iterators.instance.sequence.RelationalInstanceIterator -relationalAttributeIndex 0 -truncationLength 100 -bs 9"  -layer "weka.dl4j.layers.GravesLSTM -gateActivation \"weka.dl4j.activations.ActivationSigmoid \" -nOut 2 -activation \"weka.dl4j.activations.ActivationReLU \" -name \"GravesLSTM layer\"" -layer "weka.dl4j.layers.RnnOutputLayer -lossFn \"weka.dl4j.lossfunctions.LossMCXENT \" -nOut 2 -activation \"weka.dl4j.activations.ActivationSoftmax \" -name \"RnnOutput layer\""  -numEpochs 500

on

@relation test

@attribute time_series relational
@attribute x1 numeric
@attribute x2 numeric
@end time_series
@attribute class {0,1}

@data
"1,1\n2,2\n3,3\n4,4\n5,5\n6,6",0
"6,6\n5,5\n4,4\n3,3\n2,2\n1,1",1
"1,1\n2,2\n3,3\n4,4\n5,5\n6,6",0
"6,6\n5,5\n4,4\n3,3\n2,2\n1,1",1
"1,1\n2,2\n3,3\n4,4\n5,5\n6,6",0
"6,6\n5,5\n4,4\n3,3\n2,2\n1,1",1
"1,1\n2,2\n3,3\n4,4\n5,5\n6,6",0
"6,6\n5,5\n4,4\n3,3\n2,2\n1,1",1
"1,1\n2,2\n3,3\n4,4\n5,5\n6,6",0
"6,6\n5,5\n4,4\n3,3\n2,2\n1,1",1



On Thu, Apr 15, 2021 at 10:00 PM Theo <[hidden email]> wrote:
My aim is to apply an lstm network.

The instances in each "bag" of the dataset are time depended. They include
data related to the same attributes, but recorded in sequential time slots.

Should I conclude from your answer, that instead of using WekaDeepLearning4j
classifier, is it equivalent to using RnnSequenceClassifier (with
RelationalInstanceIterator) and to configure the "layer specification"
adding i)LSTM-gateActivation and ii)RnnOutputLayer -lossFn ?



--
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: WekaDeepLearning4j classifier is greyed out

Theo
Thank you Eibe.Your guidance is so helpful.

I assume you didn't use the default parameters to configure the
RnnSequenceClassifier and the LSTM layer.
It seems that you chose parameters that you believed they were appropriate
to do the job.
Any advice about the configuration choices would be appreciated.



--
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: WekaDeepLearning4j classifier is greyed out

Eibe Frank-2
Administrator
Primarily, I just increased the number of units in the LSTM layer from 0 to 5 (?). The default value of the layer size for the various layers available in wekaDeeplearning4j is zero, which will not produce meaningful results.

The number of epochs is also very small by default (10?) and generally needs to be adjusted. The other key parameter is the mini-batch size, which is 1 by default; as a rule of thumb, make that as large as possible given the amount of CPU/GPU memory you have (but note that sometimes smaller mini-batch sizes give better results than larger ones!). Finally, there is the learning rate. I don't think I changed that in my configuration.

Setting parameters and finding a good architecture for a new domain is generally an exercise in trial-and-error.

Cheers,
Eibe

On Fri, Apr 16, 2021 at 10:04 AM Theo <[hidden email]> wrote:
Thank you Eibe.Your guidance is so helpful.

I assume you didn't use the default parameters to configure the
RnnSequenceClassifier and the LSTM layer.
It seems that you chose parameters that you believed they were appropriate
to do the job.
Any advice about the configuration choices would be appreciated.



--
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: WekaDeepLearning4j classifier is greyed out

Theo
Thank you, Eibe.



--
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