AI-006: 吴恩达教授(Andrew Ng)的机器学习课程学习笔记21-26
本文是学习Andrew Ng的机器学习系列教程的学习笔记。教学视频地址:
https://study.163.com/course/introduction.htm?courseId=1004570029#/courseDetail?tab=1
本文中的白色背景视频截图来自Andrew Ng的视频脚程, 黑色背景为个人实验。
21. Octave Tutorial - Basic operations
The most common prototyping language in ML is Octave Matlab Python Numpy and R.
22. Octave Tutorial - Moving data around
23. Octave Turorial - Computing on data
Generate a 3*3 matrix
Get each large element of two matrix:
Sum each column:
Sum each row:
Flipud - flip up down
Sum up the elements in the other diagonal.
正、反对角线元素求和:
Invert the matrix - pinv:
24. Octave Tutorial - Plotting data
clear a plot
Using comma chaining of commands, 逗号可以连接多个命令,一行调用;
25. Octave Turorial - For, while, if statements, and functions
Functions:
functionName.m doc
In the path:
Or add path:
Return two value:
Real one:
Design matrix:
Y:
Theta:
Cost function:
26. Octave Tutorial - Vectorization
Thinking in vector:
Normal way:
Make code more affection