Linear regression (polynomial regression) --06

As already explained in the use of a straight line or a plane to fit over a number of sample points (shown), but in some cases, the use of linear hyperplane or not well fit such data, as this FIG.

For the above this figure, we can use two equations were fitted, and an image corresponding

If we need to find a straight line or not hyperplane, but a polynomial curve (HYPERSURFACES) represented, we can use the following equation to represent

Case Study:

The figure above, the left Position represents a title company, level of its representation level, salary represents their salary in this company, this is the right of the corresponding graphics

The following sklearn use this model out

As above, the data will be put into intermediate job.csv, using the FIG pyplot presented, we try later embodiment uses a linear regression is performed to show

It can be seen using an execution is not a good fit, so they need a way to polynomial regression fit

In the above polynomial fit when the need to pay attention degree is a value, the larger the value, corresponding to the curve becomes more complicated 

 

Guess you like

Origin blog.csdn.net/Escid/article/details/90399315