How to get number of instances into the SigmoidUnit class

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

How to get number of instances into the SigmoidUnit class

I am not a bot
Hi,
I'm trying to change how the weight is updated in the sigmoidUnit class. I
tried to get the number of instances from MultilayerPerceptron class but
that didn't quite work. Since there are multiple updateWeight() methods
throughout the whole program and I'm very new to this, I'm having difficulty
trying to pass an extra parameter into the updateWeight() method of the
SigmoidUnit to get the number of instances because I can't locate where the
updateWeight() method of the sigmoidUnit is actually being used.
My question is, is there an easier way to get the number of instances into
the sigmoidUnit class and if not can you direct me to the class where the
updateWeight method of the sigmoidUnit class is being used? Any help with
this will be greatly appreciated.



--
Sent from: http://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: How to get number of instances into the SigmoidUnit class

Michael Hall

> On Nov 25, 2018, at 7:06 PM, I am not a bot <[hidden email]> wrote:
>
> Hi,
> I'm trying to change how the weight is updated in the sigmoidUnit class. I
> tried to get the number of instances from MultilayerPerceptron class but
> that didn't quite work. Since there are multiple updateWeight() methods
> throughout the whole program and I'm very new to this, I'm having difficulty
> trying to pass an extra parameter into the updateWeight() method of the
> SigmoidUnit to get the number of instances because I can't locate where the
> updateWeight() method of the sigmoidUnit is actually being used.
> My question is, is there an easier way to get the number of instances into
> the sigmoidUnit class and if not can you direct me to the class where the
> updateWeight method of the sigmoidUnit class is being used? Any help with
> this will be greatly appreciated.

If you’re looking to modify the code anyhow you could create a directory and compile your own version of SigmoidUnit there.
If you want to know how you are getting to updateWeights in that class, then in the front of the updateWeights method add something like…

new Exception(“updateWeights DEBUG”).printStackTrace();

Then figure out how to launch Weka Explorer command line. I’m not remembering how at the moment.
Do it from your directory with something like

java -cp .:wherever/weka/jar/is/weka.jar WhateverLaunchWekaExplorerIs

The . in front of the class path tells java to use your modified SigmoidUnit instead of Weka’s.


_______________________________________________
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: How to get number of instances into the SigmoidUnit class

I am not a bot
Thanks for the reply Michael. As I said previously, I'm fairly new to this.
Can you elaborate a little on how to add the new Exception(“updateWeights
DEBUG”).printStackTrace(); method? I googled it a bit and I'm not sure how
to implement it.



--
Sent from: http://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: How to get number of instances into the SigmoidUnit class

Michael Hall

> On Nov 26, 2018, at 2:37 AM, I am not a bot <[hidden email]> wrote:
>
> Thanks for the reply Michael. As I said previously, I'm fairly new to this.
> Can you elaborate a little on how to add the new Exception(“updateWeights
> DEBUG”).printStackTrace(); method? I googled it a bit and I'm not sure how
> to implement it.
>

Insert into the Weka provided source with your favorite IDE/text editor.
_______________________________________________
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