I have a data set of 100000 samples with binary output.

I would like to study the impact of Col_A (a continuous feature) on the output result.

Col_A has values from 0 to 7000000 and when I add this feature to my classifier it gives bad accuracy. I have tried z-score and scalar number but it doesn't change a thing.

I would like to try another method to solve this problem.

I made some plot visualization to my data and I found that there is some range in which the majority of the outputs are negatives. ie. when col_A is ranging between (0 - 200), between (2500 - 2800) and between (5200-5400) the majority of outputs are negatives.

I would like to create a new feature to specify which category my Col_A is in, instead of using Col_A.

PS: I can't use if--else rules because I don't know where to delimit these ranges, I have just analyzed the previous values from my plot. but I need to have a dynamic method for getting those categories.

Is there any type of clustering that can solve this problem?

Does neural network help for this case?

  • $\begingroup$ How skewed are your data in col_A? What type of classifier did you attempt? Do you have any other columns? $\endgroup$ – Alex L May 21 '19 at 0:42
  • $\begingroup$ I have many other columns but I want to work just on this one(Col_A) for getting those clusters. I tried to plot the variation of col_A according to the output. I have used col_A values on x_axis and the probability of getting a positive output on the y-axis . I have got a probability of positive output less than 50% between (0 - 200), between (2500 -2800) and between (5200-5400) $\endgroup$ – Nirmine May 21 '19 at 1:33
  • $\begingroup$ I would like to extract those ranges for creating a new feature and manipulate it on logistic regression as an additional feature with others feature for making binary classification $\endgroup$ – Nirmine May 21 '19 at 1:35

You want a supervised approach. Clustering will not care about your target variable and perform arbitrary splits that don't help.

Likely a decision tree can be helpful here, if you use a good implementation that can split the same feature multiple times (to break it into intervals). There are other approaches you could try, such as piecewise regression etc.

  • $\begingroup$ I need to know those ranges for another use in my system regardless of prediction. I need my system to make feedback when the value of this variable belongs to those ranges and to use those ranges as a feature of prediction after. do you think that piecewise regression or any other method can help in this case $\endgroup$ – Nirmine May 21 '19 at 11:59
  • $\begingroup$ You can try to read the values off a decision tree. $\endgroup$ – Has QUIT--Anony-Mousse May 21 '19 at 16:39

I would like to study the impact of Col_A (a continual feature) on the output result.

If you want to study the impact of a feature, in the sense to obtain an interpretable observation of the relationship between the variables, neural networks are probably not a good idea.

I would go with (supervised) regression trees, as the model they produce is self-explanatory (and can be used for prediction too).

  • $\begingroup$ I didn't mean that I would like to specify the correlation but I mean that I want to use it for studying how can improve the accuracy of a model $\endgroup$ – Nirmine May 21 '19 at 11:40
  • $\begingroup$ I will use logistic regression model at the end for measuring the accuracy of prediction. but I want first to divide a continuous feature to some meaningful categories $\endgroup$ – Nirmine May 21 '19 at 11:45
  • $\begingroup$ I need to do that because I want additionally to use those categories in another purpose in my system (Regardless to prediction ) $\endgroup$ – Nirmine May 21 '19 at 11:49
  • $\begingroup$ I.e. I need my system to make feedback when the value of this variable belongs to those ranges $\endgroup$ – Nirmine May 21 '19 at 12:00
  • $\begingroup$ I think regression decision trees will do exactly what you want, they will give you a prediction based on conditions such as "col_A > x" and "col_A < y" $\endgroup$ – Erwan May 21 '19 at 12:42

I think this may help. From here, you can obtain decision rules and then create some feature based on this, which could be used by any other model.

Hope this helps!


I would like to study the impact of Col_A (a continual feature) on the output result. Blockquote

I would say this can be measured statistically and there are a lot of ways through which you can study the impact of Col_A on the output. A simple approach would be to create a model which would randomly guess the output for each input and calculate its log loss. Now build another model only with Col_A features along with the input and calculate the log loss of this model. Compare log losses of both the models. If the log loss is significantly reduced in the latter model, this means Col_A has some valuable information. This can be thought like univariate analysis

  • $\begingroup$ I have already tested a model without col_A in comparison with a second model containing col_A but the second model has slightly worse results than the first model. After I create a new model with col_B (that contain 0 for each row belong to those negatives ranges and 1 for other rows ) and I have got a good result. $\endgroup$ – Nirmine May 21 '19 at 11:35
  • $\begingroup$ I have specified those ranges manually. I want to know if there is a method for applying it automatically $\endgroup$ – Nirmine May 21 '19 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.