0

What needs to be the structure of weight_column in Tensorflow estimators?Does the rare class need to have higher weights? If class 0 - 90% of labels, class 1 is 10% of labels, then should my weight_column need to be

labels : [0,0,0,1]
weight_column: [0.1,0.1,0.1,0.9]

Is my understanding correct?. Will the estimator ignore this column internally so as to not treat it as a feature?

DSOx
  • 73
  • 3
  • Yes, the minor class is usually upweighted. See this answer - https://stackoverflow.com/a/48099304/712995 – Maxim Feb 10 '18 at 14:28
  • Thanks @Maxim. I had looked at your link but was confused because you had uses 1 for all values. Also, will the column be discarded internally as a feature – DSOx Feb 10 '18 at 15:21
  • The column was not a feature because OP specifically asked for it. The weights are arbitrary. All `1` is a default, means all inputs are equally important – Maxim Feb 10 '18 at 15:29
  • Ho @Maxim. Thanks again. Could you please tell me whether the weight_column will not be used as a feature in the Estimator, otherwise the model could learn from the feature and given the values of this column are discriminatory, it will learn perfectly. Pls let me know if I am making sense – DSOx Feb 11 '18 at 14:38
  • Hey DSOx, my understanding is the weight column won't automatically be used as a feature. You pass estimators a list of feature columns separately. – Chris Jun 21 '18 at 02:22

0 Answers0