I have datasets with some outliers. From the simple linear regression, using
stat_lin = stats.linregress(X, Y)
I can get coefficient, intercept, r_value, p_value, std_err
But I want to apply robust regression method as I don't want to include outliers.
So I applied Huber regressor from Sklearn,
huber = linear_model.HuberRegressor(alpha=0.0, epsilon=1.35)
huber.fit(mn_all_df['X'].to_numpy().reshape(-1, 1), mn_all_df['Y'].to_numpy().reshape(-1, 1))
from that, I can get, coefficient, intercept, scale, outliers.
I am happy with the result as the coefficient value is higher and the regression line is fitting with the majority of the data points.
However, I need a values such as r value and p value to say, the results from huber regressor is significant.
How can I get r value and p value from the robust regression (my case, using huber regressor)