Hey! How do i display the equation of the line and the correlation coefficient?
@JohnKitchin Жыл бұрын
you can use something like plt.text to add an annotation to the plot. You have to construct the equation and compute R2 your self though. You can use pycse for that (github.com/jkitchin/pycse/blob/master/pycse/PYCSE.py#L284)
@krux022 жыл бұрын
The reason why outliers have such a big impact on the outcome in least squared error minimization is, the error is squared. Squared error minimization isn't done because of good results, it is done because of ease of computation. Total non-squared error minimization would just ignore the outlier here, there is just no closed formula to compute it.
@JohnKitchin2 жыл бұрын
you are describing minimizing the L1 norm (absolute value), it is basically the soft_l1 method, and similar to the huber method. It does not ignore the outlier, it just reduces the impact.