简体   繁体   English

初学者回归的基本概念(机器学习)

[英]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.这个框架 ( https://www.tensorflow.org/tutorials/keras/regression ) 应用神经网络来解决回归问题,我有几个问题。

数据集尾部

Tail of dataset is shown as above.数据集的尾部如上所示。 The last 3 columns are making use of one-hot encoding.最后 3 列使用 one-hot 编码。

问题 1

Inspection of data is shown as above.检查数据如上所示。 Question 1) Why do we need to do this?问题1)为什么我们需要这样做?

问题2

After inspection, it splits the features from labels.检查后,它将特征与标签分开。 Question 2) I understand the concept y = mx1 + mx2 + ... + c in regression.问题 2)我理解回归中的概念 y = mx1 + mx2 + ... + c。 We have MPG, cylinders, displacement, horsepower etc. as our features (x1,x2,x3,x4...) but we do not have labels (y) in the dataset.我们有 MPG、气缸、位移、马力等作为我们的特征 (x1,x2,x3,x4...) 但我们在数据集中没有标签 (y)。 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.在您的情况下,您的标签似乎是 MPG,因此您正在从数据中学习 MPG。
Object #1 has an MPG of 27, Object #2 has an MPG of 44, et cetera.对象#1 的 MPG 为 27,对象 #2 的 MPG 为 44,等等。

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.对象 #1 可以是具有以下条目的矩阵:{0,1;1,0},对象 #2 可以是具有以下条目的矩阵:{1,1;1,0} 等等。

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.您希望算法了解看起来有些不同的矩阵具有特定的 MPG,而看起来有些不同的矩阵具有另一个 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.为此,您需要将标签(对象类型,在本例中为 MPG)与特征(对象本身,在本例中为不包括 MPG 的每个对象的数据)分开,以便从数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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