How to choose input variables for ML Let's say I have a huge database with 100K records and 60 columns. Let's say one of the column is "min_p". What I do is apply some logic/rule to determine the output label for this record. Basically I look at previous two records and next two records of this min_p. If the condition is satisfied, I will mark the label as 1 else I will mark it as 0.

Now my question, since I have directly derived the label from this called "min_p", should I retain it as one of my predictors in my final dataset? Since I have used that derive the label,  I didn't include them in my dataset as a input variable thinking that it is incorrect 

Can you help me with this?
[edited, I misread the question in the first version]

The fact that the label is determined from a combination of values from this feature is not a problem in itself: if it makes sense, it's always better to give the best indicators to the learning algorithm. So the only questions are:


whether it makes sense for your problem to have the feature provided as input for any new instance: if yes, then there's no reason to remove it.
whether it's useful to apply ML to your problem: if the label can be determined directly from a single feature, it's simply not useful to train a model.


You mention that the label is based on information from the previous/next two records. Keep in mind that the model needs to predict its target for any individual instance as input, unless you're using a sequential model (for instance with times series).