LoginSignup
0
1

More than 5 years have passed since last update.

Andrew NG機械学習の勉強ノート(Week1)

Posted at

Introduction

Machine Learningは生活の各面に使われている:googleにウェブページのランキング、Facebookでの写真認識、だいたいの場合我々はどのように人工知能のプログラムを書くのが知らなくて、例えば、ラベル付きのウェブページを検索すること、ジャンクメールのインターセプトなど、でも機械学習にやらせることができる。

 機械学習の運用例

Database mining(web click data,medical record,biology,engineer),self-customize programs,无法变成的软件(ドロンの自動運転,NLC,computer vision,手書き文字の認識)など

Machine Learning定义:

Arthur Samuel --------- The field of study that gives computers the ability to learn without being explicitly programmed.
Tom Mitchell------- A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.

Machine Learning Algorithms:

Supervised Learning
Unsupervised Learning
Reinforcement learning
recommender systems

Supervised Learning:

教室付き学習は、既存の正しい予測値がある訓練集があって、回帰分析で連続値を予測するものである。
In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output.
Supervised learning problems are categorized into "regression" and "classification" problems. In a regression problem, we are trying to predict results within a continuous output, meaning that we are trying to map input variables to some continuous function. In a classification problem, we are instead trying to predict results in a discrete output. In other words, we are trying to map input variables into discrete categories.

Unsupervised Learning

教師なし学習は、属性やラベルの概念なしで、与えられるデータの特徴を見つけ出すのが目的
Unsupervised learning allows us to approach problems with little or no idea what our results should look like. We can derive structure from data where we don't necessarily know the effect of the variables.
We can derive this structure by clustering the data based on relationships among the variables in the data.

Ocatave

オープンソースのソフトウェア,Ocataveで,数多くの機械学習アルゴリズムは数行のコードで実現できる

h=hypothesis(仮設)
image.png

入門アルゴリズム:線形関数(Linear regression)

Cost function

image.png

image.png
image.png
Contour plots
image.png
線形回帰の一つのアルゴリズム:Gradient decent
このアルゴリズムはコストファンクションJを最小化できる、例えばJ(x1,x2,x3....xn)を持っている、最小値を求めるとき、この最急降下法を使える
簡単に言うと、x1,x2を0として、J(x1,x2)の値を計算します、その後、x1,x2の値をどんどん変えて、最終的求める最小値を得られる。
最急降下法のポイントは、局所的最小値に収束するしかできないこと。
image.png
α: は学習率と呼ぶ、基本的にどれだけ大きな降下ステップを 最急降下法で取るかを制御する。もしαが非常に大きい場合、それが対応するのは、 非常に積極的な最急降下法のやり方となり、大きなステップで降下します
image.png
最急降下法の正しい実装方法、同時更新です
image.png
最急降下法の中で、,局所的最小値に達する時、自動的もっと小さいαを使う

以上の最急降下法とコスト関数をあわせて、機械学習の初めてのアルゴリズムーーー線形回帰法である。
image.png

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1