Octave function/syntax induction (updated from time to time)

Suddenly, I feel that there are more and more functions or grammars in octave. It is easy to forget, and I can’t do it without summarizing, and I don’t want to read the previous ones. Let’s memorize it from now on, it’s not too late.
Note: For details, you can use help xxx to query the usage of xxx


0 some gibberish syntax

Many predecessors have summed it up, so I won't write it again. Here are the favorites (in no particular order), thank you Chicory:
Octave Basic Operation
Programming Exercise (1): Linear Regression
Octave Quick Start (2) - Data Loading , store, modify


1. fminunc

insert image description here
fminunc can be used as a gradient descent method, and it is much faster than gradient descent, it is an advanced algorithm.
insert image description here
insert image description here
Finally, if the initialTheta in fminunc is 2-dimensional or above, it cannot be a real number. [Introduction to calling method]


2. fmincg

See Wu Enda Machine Learning's ex3 homework 2 for details


3. [ ] and reshape

[ ] is used to turn the matrix into one element, and then arrange it row by row. reshape is to arrange and link
elements within a given range of a matrix according to a given size

insert image description here

Guess you like

Origin blog.csdn.net/Only_Wolfy/article/details/89929004