I have a dataset as below. It is a classification problem with multiple x variables and a y variable. Y variable has 5 levels. The below picture has y variable on x axis and one x variable on y axis. As you can see from the picture below, for each value of Y, a x variable distribution is not very different (i plotted similar chart for all x variables- one x variable at a time vs y and seeing the same trend). Due to this issue, most of the observations are getting classified as class 0 or 4. I built a randomforest with 500 trees. How could i improve accuracy? I thought of taking square or cube of each x so that distance between class means would increase but it won't help with variance of each class
distribution of 5 classes in my data is as below
0 1 2 3 4 5104 2639 2322 2661 5274
Column means and standard deviations of my x variables are very similar :(
I have 26 x variables and 5 outputs. As mentioned above most of the datapoints are being predicted to class 0 or 5. I performed one additional model where for each Y class i found out mean of each x variable. That step provided me 26*5 means. Then for each observations and each x variable i found out squared distance between the datapoint and class centers and summed it for each observation. This would return me 5 distances for each observations and I assigned that observation to a class where distance is minimum. This approach is much better.
The approach in short:
- find mean of x variable for each Y class - for example i got x1_mean_for_y=0
- find squared distances for each value of x column - for example squared distance between (1st observation of x1 and x1_mean_for_y)
- for each datapoint some all distances by class
- assign a datapoint to a class where the distance is minimum
This approach assigns relatively less number of observations to class 0 and 4 and my overall accuracy has gone by 7%
how could i improve my model further?