Tensorflow 1.9 DNNClassifier unequal output labels optimization
What you said is considered one approach to solving this issue, as this prevents your computed gradient from being dominated by Classes 1 and 2. Depending on your data, it may be effective to add some Gaussian noise to the underrepresented samples to create similar samples. Another good idea in general to avoid overfitting is to apply a dropout if you have not already.
I have a classification problem which requires some optimization, as my results are not quite adequate.
I'm using the DNNClassifier for a huge dataset in order to classify items in 5 different classes (labels). I have over 2000 distinct items (in a hashbucket column with size 2000 and dims 6 - is this adequate?) and multiple numeric columns for said classification.
My problem is the following: the amount of items belonging in each class is very variable. Class 1 is very common, class 2 is common but classes 3 4 and 5 are highly uncommon (under 2% of the dataset) but they are the most interesting ones in my test case. Even if I tweak the network size/number of neurons or the training epoch, I get close to no results in classes 3, 4 and 5, so class 1 and 2 are clearly overfitted.
I saw the weight_column option in the documentation - would that be a good idea to change the learning weight of these three class to "normalize" the weight in each class ? Is there a more efficient way to get better results on rarer cases without losing the detection precision on the common classes?
Many thanks!