What is the difference between a feature and a label?

前端 未结 7 1631
天涯浪人
天涯浪人 2020-12-12 10:00

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 fea

相关标签:
7条回答
  • 2020-12-12 10:40

    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.

    0 讨论(0)
  • 2020-12-12 10:45

    Feature:

    In Machine Learning feature means property of your training data. Or you can say a column name in your training dataset.

    Suppose this is your training dataset

    Height   Sex   Age
     61.5     M     20
     55.5     F     30
     64.5     M     41
     55.5     F     51
     .     .     .
     .     .     .
     .     .     .
     .     .     .
    

    Then here Height, Sex and Age are the features.

    label:

    The output you get from your model after training it is called a label.

    Suppose you fed the above dataset to some algorithm and generates a model to predict gender as Male or Female, In the above model you pass features like age, height etc.

    So after computing, it will return the gender as Male or Female. That's called a Label

    0 讨论(0)
  • 2020-12-12 10:45

    A feature briefly explained would be the input you have fed to the system and the label would be the output you are expecting. For example, you have fed many features of a dog like his height, fur color, etc, so after computing, it will return the breed of the dog you want to know.

    0 讨论(0)
  • 2020-12-12 10:47

    Here comes a more visual approach to explain the concept. Imagine you want to classify the animal shown in a photo.

    The possible classes of animals are e.g. cats or birds. In that case the label would be the possible class associations e.g. cat or bird, that your machine learning algorithm will predict.

    The features are pattern, colors, forms that are part of your images e.g. furr, feathers, or more low-level interpretation, pixel values.

    Label: Bird
    Features: Feathers

    Label: Cat
    Features: Furr

    0 讨论(0)
  • 2020-12-12 10:52

    Prerequisite: Basic Statistics and exposure to ML (Linear Regression)

    It can be answered in a sentence -

    They are alike but their definition changes according to the necessities.

    Explanation

    Let me explain my statement. Suppose that you have a dataset, for this purpose consider exercise.csv. Each column in the dataset are called as features. Gender, Age, Height, Heart Rate, Body_temp, and Calories might be one among various columns. Each column represents distinct features or property.

    exercise.csv

    User_ID  Gender Age  Height  Weight Duration    Heart_Rate  Body_Temp   Calories
    14733363 male   68  190.0   94.0    29.0           105.0    40.8        231.0
    14861698 female 20  166.0   60.0    14.0            94.0    40.3        66.0
    11179863 male   69  179.0   79.0    5.0             88.0    38.7        26.0
    

    To solidify the understanding and clear out the puzzle let us take two different problems (prediction case).

    CASE1: In this case we might consider using - Gender, Height, and Weight to predict the Calories burnt during exercise. That prediction(Y) Calories here is a Label. Calories is the column that you want to predict using various features like - x1: Gender, x2: Height and x3: Weight .

    CASE2: In the second case here we might want to predict the Heart_rate by using Gender and Weight as a feature. Here Heart_Rate is a Label predicted using features - x1: Gender and x2: Weight.

    Once you have understood the above explanation you won't really be confused with Label and Features anymore.

    0 讨论(0)
  • 2020-12-12 10:52

    Let's take an example where we want to detect the alphabet using handwritten photos. We feed these sample images in the program and the program classifies these images on the basis of the features they got.

    An example of a feature in this context is: the letter 'C' can be thought of like a concave facing right.

    A question now arises as to how to store these features. We need to name them. Here's the role of the label that comes into existence. A label is given to such features to distinguish them from other features.

    Thus, we obtain labels as output when provided with features as input.

    Labels are not associated with unsupervised learning.

    0 讨论(0)
提交回复
热议问题