1
$\begingroup$

I have a dataset like below without labels

enter image description here

But with the help of experts opinion, we generate labels based on the below 3 rules (all 3 rules has to be met to label it as 1)

enter image description here

So now the dataset looks like below

enter image description here

As you can see that my final dataset has the labels.

Now I can run a ML model for classification. Am I right?

But I read that during model building process, features that were used to create the labels will have to be excluded because they might result in perfect separation of classes and model might fail. what does it mean by fail? Aren't we aiming for separation of classes through classification algorithms?

May I know why do we have to exclude these features (Ex: RG, FG and BP features which were used to derive labels)?

It's basically my model will be built on below dataset. But aren't we losing the predictive power? why do we have to build a model by excluding those features (that were used to derive labels)?

enter image description here

$\endgroup$

3 Answers 3

1
$\begingroup$

You created the labels using the data. If you are able to label them with the data, then why do you need a machine learning model? It simply becomes a rule based classifier. What you would like to do, is to find a function that fits your data points.

For example, if you run a decision tree classifier, then it's going to find perfect splits based on your labelling rules. Hence, you're feeding the model a bit about the labelling technique. This is called data leakage. The model sees something really obvious and will have accuracy of 1 usually.

$\endgroup$
1
  • $\begingroup$ Thanks for the response. Upvoted $\endgroup$
    – The Great
    Commented Mar 11, 2020 at 13:03
1
$\begingroup$

What you are doing is right. You can build a ML model using this. In your case your input and output are correlated. Consider the salary of an employee wrt his experience. These both are related and sometimes used to derive salary based on experience.

What you might have read is if one feature is used to derive other feature and dont use both features, as both will yield same results. You can point to that writing for further clarification.

Additionally, what is the significance of variables T1,T2 and T3? If these are nowhere correlated to the output label then actually you would have to eliminate them.

$\endgroup$
1
  • $\begingroup$ Thanks for the response. Upvoted. but what do you mean by "You can build a ML model using this". what does this denote here?. The question isn't about using one feature to derive another feature. It's about using feature to derive the labels $\endgroup$
    – The Great
    Commented Mar 11, 2020 at 7:52
1
$\begingroup$

But I read that during model building process, features that were used to create the labels will have to be excluded because they might result in perfect separation of classes and model might fail?

No, just because an expert used them does not mean that that feature only hast to be helpfull or not. If that was the truth than you could write a couple of if queries to classify. Leave all of it, rely on expert labeling, but let the whole dataset tell you otherwise.

$\endgroup$
4
  • $\begingroup$ Thanks for the response. Upvoted. Sorry my english skills isn't that good. May I kindly check with you once again. My question isn't on expert labeling. Yes, as you said I can write queries to classify them. But why is that during model building process, they exclude the features that were used for label generation and find predictions only based on remaining features? $\endgroup$
    – The Great
    Commented Mar 11, 2020 at 9:49
  • $\begingroup$ To see it the remaining features are discriminative enough (if not more) than the ones human can analyse and make predictions (i.e. create labels) $\endgroup$
    – Noah Weber
    Commented Mar 11, 2020 at 9:56
  • $\begingroup$ What will happen if I retain them in the dataset as is (without excluding) along with other features and train the model? $\endgroup$
    – The Great
    Commented Mar 11, 2020 at 9:58
  • $\begingroup$ Model will most likely only focus on the features that you used to create the labels. Let the data tell you. Try it with and without these features and check the performance on CV. Thats the best indicator. $\endgroup$
    – Noah Weber
    Commented Mar 11, 2020 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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