简体   繁体   中英

Underlying concept of regression for beginner (Machine Learning)

I'm new to machine learning. I apologize if the question looks a bit messy. This framework ( https://www.tensorflow.org/tutorials/keras/regression ) applies neural network to solve a regression problem and I've a few questions.

数据集尾部

Tail of dataset is shown as above. The last 3 columns are making use of one-hot encoding.

问题 1

Inspection of data is shown as above. Question 1) Why do we need to do this?

问题2

After inspection, it splits the features from labels. Question 2) I understand the concept y = mx1 + mx2 + ... + c in regression. We have MPG, cylinders, displacement, horsepower etc. as our features (x1,x2,x3,x4...) but we do not have labels (y) in the dataset. How are we supposed to perform a supervised training in this case? What does it mean by 'separate label from features'?

Thank you very much for reading this question!

Labels

Labels are what the data is supposed to be.
In your case, your label seems to be MPG, so you're learning the MPG from the data.
Object #1 has an MPG of 27, Object #2 has an MPG of 44, et cetera.

Features

Features are what the data is:
Object #1 could be a matrix with the following entries: {0,1;1,0}, Object #2 could be a matrix with the following entries: {1,1;1,0}, et cetera.

Note that labels and features can have different types of representations in code; it is important that you understand the conceptual difference.

The connection between features and labels

You want the algorithm to learn that matrices that look some way have a certain MPG, and that matrices that look a little different have another MPG.

In order to do so, you want to separate the labels (object types, in this case MPG) from the features (objects themselves, in this case the data of each object excluding the MPG) in order to learn and predict the MPG from the data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM