Cannot find the degree that fits my polynomial regression model in sklearn
0
I have a polynomial features function that I want to give a degree of (1/2) or 0.5, because the data set used is a downward plateau with a degree of at most (1/2), however the predictions produced are all the same and the r-squared mean is -23736.436220427375. When the degree is changed to 2 and onward the predictions increase as the X values get past the mid-point, resulting in a parabola, where as the data is not a parabola. import pandas as pd import numpy as np from sklearn.linear_model import LinearRegression from sklearn.preprocessing import PolynomialFeatures df = pd.read_csv('infantmortality.csv',sep=',') x = df['Year'] y = df['Infant Mortality Rate'] x_Train = np.array(x[96:150]).reshape(-1, 1) y_Train = y[96:150] x_Test = np.array(x[150:193]).reshape(-1, 1) ...