Random Seed

Dear sir,

I would like to do various iteration of sampling and neural network prediction using different random seed. I would like to exract these random seeds used for reference.  I have tried to use "randomseed" flow variable to record the seed values.  However, the output seed seems always equal to 321321321 (default seed), if I changed the seed value to another value (e.g. 123123123), the output flow variable of the seed will change to 123123123, but the value will not be updated if I choose random seed generated by KNIME.  Can you help me about this?

 

Thanks

Lawson

Hi Lawson,

In order to be able to change random seed dynamically you have to pass the value for the seed as a flow variable. Then you can simply save the variable. Alternatively you can create a flow variable by putting a name for the variable of interest on the Flow Variables tab of the configuration dialog. 

Please find attached a sample workflow where I train an MLP in a loop with several random seed values and then save them together with accuracy. 

 

Best regards,

Anna

Anna

Thanks for your kind help

Lawson

Hi Anna

 

Thanks for help.

 

I got another question in looping.  I have a file with 30 rows in 7 columns, each column is the parameter used in the weighting before the modeling. So, I need to import the first row, do the modeling with various seeds (say to use 3 seeds from your example as your reply), then start again in the next row of parameters until the end of file.  I use Chunk Loop Start, which facilitate reading one by one.

However, error in the modeling node stated that problem in looping.  I think the problem is using two loopings in a flow, do u have any examples or solutions on this issue?

 

Many thanks

Lawson