ADM-201 dump PMP dumps pdf SSCP exam materials CBAP exam sample questions

深度学习入门 #1 – 译学馆
未登陆,请登陆后再发表信息
最新评论 (0)
播放视频

深度学习入门 #1

How to Make a Prediction - Intro to Deep Learning #1

大家好 这里是Seraj 欢迎来到 深度学习入门
Hello world, it’s Seraj andwelcome to Intro to Deep Learning.
这是这个系列的第一个视频
In this first episode,
在这个视频里 我们会通过动物大脑的重量
we’ll predict an animal’s body weight
来预测动物的体重
given only the weight of its brain.
这门课程会持续四个月
This course will be four months long and
并且会全部发布在我的youtube 频道上
it’ll all be released on my channel.
每周三上午10点(太平洋时间)
I have a live session every Wednesday
我会做一个直播
at 10 am PST that
深入解释一周的主题
explains every week’s topic in depth.
我现在正在和udacity合作
And I’m collaborating
给那些完成了这门课的人
with Udacity to offer a Nanodegree to those that
发一个纳米学位
successfully complete this course.
这门课是给那些
This course is
想要掌握神经网络的威力
for anyone who wants to learn how to harness the incredible
并成为深度学习工程师的人准备的
power of neural networks andbecome a deep learning engineer.
你不需要是资深的开发者或者数学家
You don’t have to be an experienceddeveloper or mathematician.
学习这门课的唯一要求就是知道量子力学
The only prerequisite for thiscourse is knowing quantum mechanics.
开个玩笑 知道python语法就行
Just kidding, only basic Python syntax.
我们会在创建AI的过程中学习
We’ll learn what we need to along the way by building an AI
我们创建的AI应用范围很广 可以预测特斯拉的股价
that can do everything from predictingthe price of Tesla stock
也可以画超现实主义的画
to painting surrealist masterpieces. Traditionally,
一般的程序是通过写明
programming has beenabout defining every single step for
每一步的步骤来产生结果
a program to reach an outcome.
机器学习颠倒了这个过程
The machine only flips that approach.
在机器学习里 我们定义好程序输出的结果
With machine learning,we define the outcome and
让程序学习产生这个结果的步骤
the program learnsthe steps to get there. So,
如果我想写一个
if I wanted to build an
分辨加州车牌的应用
app that can recognize California license plates.
并不需要写很多代码来
instead writing out code torecognize the hundreds of different
识别车牌的不同特征 比如字母的形状和颜色
features of a license plate like the shape of certain letters and the colors.
我们只需要对AI说
We just say,
这里有一些加州车牌的样本
here are some examples of a California license plate,
你自己去学习识别车牌的步骤吧
learn the steps you need sothat you can recognize it.
或者 如果我想要一个可以
Or if I wanted to make
玩马里奥的程序
a bot that could beat Super Mario,
我们不是在代码中给出每一可能场景的应对策略
instead of writing code forevery possible scenario like jumping
像是看到koopa向你走来时要起跳
if we see a koopa and it’s running towards you,
而且告诉程序 我们的目标是在没死过的情况下到达终点
we’d say the goal is to get to the endpoint without dying,
让程序去学习如何达到目标
learn the steps to get there.
甚至有时候我们都不知道会通过什么步骤才能做到
And sometimes we don’t even have an idea what steps could possibly be.
比如我们是一家银行的负责人
Like if we’re a bank
我们怀疑有欺诈行为
and we suspect there’s some kind of fraudulent
但是我们并不知道
activity happening but we’re not
该如何找到欺诈行为
sure exactly how to detect that or
甚至不知道应该探测什么
even know what to look for, we can say,
我们给程序所有用户活动的日志
here’s a log of all user activity.
让它找到与众不同的是哪一个
Find the users that are unlike the rest,
它就会自己学习找到异常
and it will learn the steps to detect the anomalies by itself.
机器学习已经应用到因特网的方方面面了
Machine learning is alreadyeverywhere on the Internet.
每个主要的服务都会在某种程度上利用它
Every major service uses it in some way.
事实上
In fact, you could be
当你看这个视频的时候
using it right now to decide which
YouTube正在用机器学习来决定其他哪些视频你可能会喜欢
other videos you mightlike as you watch this.
而且机器学习的使用会越来越广泛
And its uses will only grow over time.
他会被嵌入到所有因特网上的设备
It will be embedded in all ofour Internet connected devices.
从冰箱到汽车 到私人助理 无处不在
Everything from fridges,to cars, to personal assistance.
通过不断学习来满足我们的需要
Re-learning and adapting to our needs.
你应该知道
And you know that rule
有个理论说 需要一万小时去掌握一项技能
that says you need 10,000 hours to master any skill or
我们只需要把这个时间
we’ll just be able to offer
交给机器去训练
that training time to our machines and
它就可以立即提供给我们相应的能力
it’ll give us super powers instantly.
任何人都可以去写交响曲
Anyone will be able tocompose a symphony.
Alexa 我感觉有点悲伤
Alexa I feel melancholic.
给我写一首钢琴曲
Make me a piano piece for this.
[音乐]
[MUSIC]
给里面加上一点节奏
And have a beat to it.

Yo.
任何人都可以导演电影
Anyone will be able to direct a movie. Okay,
google助理 重新创作星球大战 但是把我加到里面
Okay, Google recreate Star Wars butput me in it.
我掌握了大部分代码
I doctorize most of my code now.
你伤透了我的心
You’re breaking my heart.
没错
Damn right.
有了机器学习 如果你想不到 没有它做不到
With machine learning,if you can trim it, it can exist.
借助于研究者在彼此的努力上创造
And the field is currentlyadvancing very fast as researchers
如今机器学习领域正在飞速发展
build on each other’s work.
我的神经网络效果很差
My neuronet sucks.
多加几层试试
Go deeper. Wow,
我刚达到了最佳效果
I just achieved state of the art.
如今有很多的机器学习模型
There are a lot of machinerunning models out there and
其中一个是神经网络
one of them is called a Neural Network.
当我们使用的神经网络
When we use a neural network
不只是一到二层
that’s not just one or two,
而是很多层去做预测的时候 我们管它叫深度学习
but many layers deep to make a prediction, we call that deep learning.
深度学习是机器学习的子集
It’s a subset of machinelearning that has outperformed
它在很多问题上
almost every other type of model almost every time
都战胜了其他的模型
on a huge range of tasks.
我们会在接下来的视频中深入讲解深度学习
We’ll dive into deep learningmore in the next episode but
现在只关注宏观上机器学习是什么样
this video will just focus onmachine learning in general.
我们通常将机器学习分为三类
We usually class learninginto three different styles.
第一类是有监督的学习
The first style is calledsupervised learning.
我们会给模型数据集
It’s where we give a
像是汽车图片加上标签
model a labeled data set like car pictures so
它会得到哪个是对哪个是错的反馈
it gets feedback on what’s correct andwhat’s not.
它需要学习标签和数据之间的联系
It just have to learn the mapping between the labels and the data.
之后它就可以解决一些
And then they can solve some given task
像是分辨图片中的
like classifying the type of
汽车种类的问题
car in an image.
相对来说这是很直观的
It’s all relatively straight forward and we
我们已经得到很好了的结果
‘ve gotten the incredible results from it.
第二类是无监督的学习
The second learning style iscalled unsupervised learning.
我们给模型
This is when we give a
没有标签的数据集
model a data set without labels,
它不会得到什么是正确的什么是错误的反馈
it gets no feedback on what’s correct ornot.
它要自己去学习数据的结构
It has to learn by itself,
来解决给出的问题
what the structure of the data is to solve some given task.
这种方式很难去实现但是很方便
This is harder to do but more convenient,
因为并不是每个人手头上都有一个完美标记的数据集
since not everyone has a perfectly labeled data set sitting around.
大部分数据都是没有标记的
Most data is unlabeled.
混乱且复杂
It’s messy and complex.
第三类是强化学习
And the third type isreinforcement learning.
这是不给一个
This is where a model is
模型正确性的反馈
n’t given feedback right off the bat,
它只有达到了目标才会得到反馈
it only gets it if it achieves its goal.
所以 如果我们尝试建立一个能够在象棋比赛中
So if we’re trying to create a reinforcement learning bot that can
战胜人类的强化学习机器人
learn to beat humans at chess,
它只会在赢得比赛后
it would only receive feedback if it
得到反馈
won the game whereas
而在有监督的方式中 每走一步我们都会得到反馈
in the supervised approach we get feedback every move and
在无监督的方式中 我们一直不会得到反馈 即使赢了
in the unsupervised approach we’d never get feedback, even if it won.
不像其它两种学习方式
Unlike the other two learning styles,reinforcement learning is linked
强化学习的理念是 在一个环境中试错
to the idea of interacting with an environment through trial and error.
我有不同动物的
So I’ve got a data set
数据集
of measurements of different animals and
我想要通过大脑的重量预测动物的体重
we want to predict an animals body weight given its brain weight.
由于我们的数据是有标签的
Since our data is labeled,
我们会通过有监督的方式
this will be a supervisor approach and
我们会在这个任务上使用的机器学习方法是回归
the type of machine learning taskwill perform is called regression.
我会边解释边写
We’ll write out a 10
一个10行的python脚本
line Python script to do this and I’ll explain things as we go.
首先引入三个依赖库
We’ll start off by importingour three dependencies.
第一个是pandas 我们用它来读入数据集
The first one is pandas which will let us read our data set.
第二个是scikit-learn
The second one is scikit learn
我们用它来进行机器学习
which is the machine learning library we’re using for this example.
第三个是matplotlib 用它来可视化模型和数据
And a third is matplotlib which will let us visualize our model and data.
现在 我们已经导入了所需的库
Now that we’ve importedour dependencies,
使用pandas的read_fwf函数
we can read our data set using pandas.We’ll use the read fwf
读取数据
function to read our animal data set,
将固定格式的数据转换为pandas
a table of fixed width formatted lines
的datafram对象
into a pandas data frame object
dataframe是一个有行和列的二维结构
which is a 2D data structure of rows andcolumns.
我们的数据集包含一些动物的
Our data set contains the averagebrain and body weight for
大脑的平均重量和对应的体重
a number of animal species.
一旦数据转换到dataframe里
Once our data is in our dataframe variables,
我们可以轻易地将两类数据
we can easily parse and
解析到两个变量中
read both measurements intotwo separate variables.
将大脑的数据记录到x_values变量里
We’ll store our brain measurementsin the x_values variable and
将体重的数据记录到y_values变量里
the body measurements inthe y_values variable. So,
如果我们把数据
if we were to plot this data right now
在二维的图形里画出来
on a standard 2D graph,
它看起来是这样的
it would look like this.
我们的目标是
And our goal is
给出新的动物体重的情况下预测头的重量
that given a new animal’s body weight will be able to predict what its brain size is.
所以我们要如何实现呢?
So how are we going to do that? Yeah,
啊哈
uh-huh.
你知道这是什么
You know what it is.
无关 有关无关 有关
Independent and dependent,independent and dependent.
我的数据里有大脑的重量和体重
My data’s got the values for the brain and the body weight.
我想知道用什么可以将他们联系起来
And i’m wondering what touse to find if they relate.
线性回归
Linear Regression.
找到这个关系
Helps find the relationship.
我们将要求出最佳拟合的那条线
We’re going to measure it and find the only line of best fit.
我们只需要线性方程y=mx+b
The equation y = mx +b is all we need.
b是截距 m是斜率
B is the y intercept andm measures how steep.
描点画图 让我们用大脑重量预测动物体重
Plied it on the graph, let us predict the body with the brain.
错误率很小 开香槟
Low error, pop champagne.
首先
When you set to
我们使用scikit-learn 的linear_model对象来初始化线性回归
learn linear model object to initialize our
将返回值赋给body_reg
linear regression and store itin the body regression variable.
之后我们就可以将x y的值输入到模型中
Then we can fit our model on our x y value pairs.
有了最佳拟合之后
Now that we have the line
我们可以在
that best fit we can plot our x,
散点图里画出x y 的值
y value pairs on a scatter plot.
根据拟合函数画出拟合曲线
Then plot our regression line by saying
通过对每个x值
for every x value we have
计算出相应的y值 并将他们连起来
predict the associated y value and draw a line that intersects all those points.
使用show函数展示图像
We can then display itusing the show function.
让我们在终端里运行它
Let’s go ahead compilethis code in terminal.
散点图会画出数据集里面的点
Our scatter plot will appear with all our data points mapped out.
x轴表示脑重量 y轴表示体重
The x axis represents brain weights and the y axis represents body weights.
回归曲线看起来和大部分的数据
Our regression lines seems to fit most
拟合地很好
of the data pretty well and there seems
这里的大脑重量和体重看起来有很强的相关性
to be a very strong correlation here between brain weight and body weight.
当我们沿着线移动
And as we move along the line,
我们也可以在给出大脑重量的情况下预测体重
given any brain weight we can also predict the associated body weight.
总结一下
So to break it down
传统的编程方式写明步骤来得到结果
while traditional programming is about defining the steps
机器学习写明结果
to reach an outcome, machine learningis about defining the outcome.
AI会自动找到步骤
And our program will learnthe steps to get there.
有三类机器学习类型 有监督的 无监督的
There are three different learningstyles, supervised, unsupervised and
和强化学习
reinforcement learning.
线性回归构造
And linear regression models
无关和相关变量之间的联系
the relationship between an independent and dependent variable
来产生最佳拟合直线
to create the line
然后我们可以使用拟合线来做出预测
of best fit which we can then use to make predictions.
上周编程挑战的的获胜者是Mick Van Hulst
The winner of last week’sCoding Challenge is Mick Van Hulst.
他修改了游戏世界使其更复杂
He modified the gameworld to be more complex.
并且他的队列学习机器人
And his queue learning bot was
比我的演示机器人更有效
much more efficient at reaching the goal than my demo bot
本周冠军
Wizard of the week.
而亚军是Vishal Batchu
And the runner up is Vishal Batchu.
他使用了细胞自动机来产生地图
He generated maps usingcellular automata.
本次视频的挑战是
The challenge for this video is
用scikit-learn在一个不同的数据集中创建回归线
to use scikit-learn to create a regression line
我会提供这个数据集
for a different data setthat I’ll provide, and
你的程序还要输出预测和真实值之间的误差
print out the error between yourprediction and the actual value.
详细信息都在readme中
Details are in the Readme,
在评论里写上你的github链接
post your GitHub link in the comments and
我会在下周宣布获胜者
I’ll announce the winner in one week.
请订阅我的视频
Please hit that Subscribe button and for now,
现在我要去继续学习了 感谢收看
I’ve got ta feel to learn, so thanks for watching.

发表评论

译制信息
视频概述

还视频提纲挈领地介绍了深度学习的概念和相关方法

听录译者

收集自网络

翻译译者

💥

审核员

审核员X

视频来源

https://www.youtube.com/watch?v=vOppzHpvTiQ

相关推荐