2
$\begingroup$

I am working on a logistic regression problem for offshore rig automation. One of the predictors is time duration reading from a sensor.

Due to the nature of the sensor (and the automation system), the measured duration --- a continuous value --- concentrates in two regions: one region is 1 second to 10 seconds; another region is 1 minute to 2 hours.

Surely, I can use log pre-processing to make this feature's histogram more like a bell-shape. But in the end, these 2 clusters exist. Also, these 2 clusters exist for a reason, something to do with some valves' status.

I am thinking about treating this continuous feature like a categorical feature: split it into 2 separated features (one for each cluster) , similar to one-hot encoding. However, different from one-hot-encoding, the two new features will be continuous values.

Does this make sense from a theoretical perspective? Can anyone provide some reference for me so I can read up (or google) ?

$\endgroup$
2
$\begingroup$

There is one problem with "splitting" the data into two separate predictors A and B. Namely, for an instance that falls into the "low" group, predictor A will contain the actual sensor reading, but predictor B will contain zero. And vice versa. (Or any other fixed value that has nothing to do with the actual sensor reading.) This actually models a system with two sensors, one of which always reads zero. Which, of course, is a different system from what you have.

What looks more promising to me would be to use a single predictor containing the actual sensor reading, in an interaction with a dummy predictor that is 0 if the reading is in the low range, and 1 if the reading is in the high range. The interaction term means that your model accounts for linear effects of the sensor reading, but with different slopes in the two regions.

Alternatively, you may want to consider spline transforming your sensor reading to account for possible nonlinearities. (Best to use constrained or natural splines so you don't get oscillations at extreme values.) Or use a spline transformation in interaction with a dummy "range" predictor as above. Regression Modeling Strategies by Frank Harrell contains a very good introduction to splines.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ thanks @Stephan, just to make sure that I understand correctly: " in an interaction with a dummy predictor ", by interaction you mean multiplication , correct ? $\endgroup$ – eight3 Oct 1 '19 at 9:51
  • $\begingroup$ Yes, exactly. Compare en.wikipedia.org/wiki/Interaction_(statistics), and our interaction tag. Your software package should have built-in support for modeling interactions. $\endgroup$ – Stephan Kolassa Oct 1 '19 at 9:52

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.