1
$\begingroup$

I am using some classic models for ML, such as logistic and linear regression, K-neighbors etc, for a binary classifier.

My dataset is complete, i.e. there are no missing values. But there are some meaningless values.

Let say in my problem I have an image and I spilt the image to 25 parts. I have 50 features, for each part in the image I have a feature of how many cars are in that part, and the average speed of the cars in that part.

In case part has zero cars in it, the second feature for that area will be Null (there is no speed average if there are no cars, and 0 has a meaning so I don't want to say 0)

It is not duplicate from missing data questions, since I know there is no real number that I can give for that feature that will be correct, and I have a dependency here, since the first feature is always a real number, by its value I can tell if the second feature has meaning or not (if I could, I would tell the classifier if feature A is 0, ignore feature B, otherwise learn with both of them).

What would you suggest?

$\endgroup$
1
  • $\begingroup$ Also, consider this answer for how to handle this situation in (potentially generalized) linear modeling, at least. $\endgroup$ – EdM Oct 10 '20 at 16:24