Course Name: Artificial Intelligence class: 13 level meter This experiment Date: May 11
School Number: 136201010495 Name: Evangeline Score:
First, the name of the experiment
Linear Regression Prediction System
Second, the purpose and requirements of the experiment
The basic method of understanding and mastering linear regression prediction can be programmed to implement a simple linear regression prediction system.
1, familiar with Octave programming language;
2, the linear regression prediction function, the cost function design and implementation;
3. Parameter learning using gradient descent algorithm
Third, the experimental tools
Octave notepad++
Iv. Contents and steps of the experiment
1, installation programming tools: Octave,:
2, after installation octave, double-click the corresponding icon to open the desktop: You can use the command line to run the program, the commonly used commands are as follows:
(1) Change the current directory command: CD
(2) Show current path command: pwd
(3) Show when directory command: LS
3, fill in the corresponding code:
The EX1.M interface code is as follows:
The COMPUTECOST.M code is as follows:
The GRADIENTDESCENT,M code is as follows:
Experiment with Octave-3.2.4 Software as follows:
(1) Open the corresponding Octave-3.2.4 application software, to clear the screen CLC.
(2) Adjust the corresponding address.
(3) Add the corresponding code, use npp.6.1.2 software to encode, EX1.M and GRADIENTDESCENT.M and COMPUTCOST.M code as follows.
(4) run.
5, the results of operation such as:
Initial diagram:
Forecast Trend Chart:
Stereoscopic diagram:
Initial position Map:
Best location Map:
V. Summary of the Experiment
In this experiment, I met a lot of problems and difficulties, but through my careful examination and memory of the teacher in the lecture on the content and methods, I finally finished the experiment. So in this respect my knowledge is very weak, so I also need to learn more and strengthen this knowledge. But this experiment has taught me how to predict linear regression and how to design and implement cost functions, as well as the functions of Octave-3.2.4 and notepad++, and also learn some methods of Octave-3.2.4 and notepad++ configuration, Verify that Octave-3.2.4 and notepad++ code modifications run as graphs.
Artificial Intelligence Experiment Report