What is the difference between a feature and a label?

Wojtek Wencel picture Wojtek Wencel · Nov 30, 2016 · Viewed 72.1k times · Source

I'm following a tutorial about machine learning basics and there is mentioned that something can be a feature or a label.

From what I know, a feature is a property of data that is being used. I can't figure out what the label is, I know the meaning of the word, but I want to know what it means in the context of machine learning.

Answer

Prune picture Prune · Nov 30, 2016

Briefly, feature is input; label is output. This applies to both classification and regression problems.

A feature is one column of the data in your input set. For instance, if you're trying to predict the type of pet someone will choose, your input features might include age, home region, family income, etc. The label is the final choice, such as dog, fish, iguana, rock, etc.

Once you've trained your model, you will give it sets of new input containing those features; it will return the predicted "label" (pet type) for that person.