Course Name: Artificial Intelligence class: 13 level meter This experiment Date: May 5
School Number: 136201010496 Name: Mao Zhiqiang 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, use notepad++ Editor to open the File New key folder-ex1 inside the program.
4, using notepad++ code editing software to edit the existing code to fill, because the octave software does not have editing capabilities. Drag the cost function into and write to the prediction function.
Similarly, you need to fill in the code
5, start octave software. Use the CLC command to clear the screen, and then use the CD command to make changes to the file path, completed after the execution of the EX1 program. The results are as follows:
Initial diagram:
Forecast Trend Chart:
Stereoscopic diagram:
Initial position Map:
Best location Map:
V. Summary of the Experiment
Through this experiment, let me understand the prediction method of linear regression and how to design and implement the cost function. Also understand the features of Octave-3.2.4 and notepad++, while also learning Octave-3.2.4 and notepad++ configuration of some methods to verify Octave-3.2.4 and notepad++ code modifications run into graphics. But in this experiment, there are still a lot of problems, but also need me to continue to learn the relevant knowledge to strengthen the content.
Artificial Intelligence Experiment Report