What is the difference between a feature and a label?

前端 未结 7 1678
天涯浪人
天涯浪人 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: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.

提交回复
热议问题