sampleWeights in module ml

asked 2017-11-17 07:50:05 -0500

LBerger gravatar image

updated 2017-11-17 07:51:02 -0500


In trainData a weight per sample can be defined in create method. Sample Weights are used in backprop, rprop method.

When you call calcError sample weigths are not used.

I think that calcError must use sample weights to give a good error value. Am I wrong?

edit retag flag offensive close merge delete


arent those weights only used for the training ? e.g. to mend an "uneven" class distribution, where you don't have enough samples for a certain class ?

with a real world prediction, you also would not know the label beforehand, so you could not know, which weight to apply.

berak gravatar imageberak ( 2017-11-17 08:51:35 -0500 )edit

No my problem is that I use simulated annealing to optimize node weight and bias, and I need a global error : calcError. Rprop and backprop use sample weights. Hence if I use calcError and I will not optimize same neural network than in rprop because traindata weights are not the same.

LBerger gravatar imageLBerger ( 2017-11-17 09:10:22 -0500 )edit