I have a dataset including two columns age ans flexibility variables. The following plot displays the corrolation between the age of people and their body flexibility based on my dataset:
I am trying to make a cubic model where flexibility depends on the age cubed. So I have done:
from sklearn.linear_model import LinearRegression df["Age_cubed"] = df["Age"].pow(3) X = df[["Age_cubed"]] Y = df["Flexibility"] model = linear_model.LinearRegression() model.fit(X, Y) r_sq = model.score(X, Y) model.coef_ # 10.02 model.score(X, Y) # 0.93 Now the corresponding plot is: 
This model has an interocept of 0.034:
print(model.intercept_) # 0.034 Is there a way to force python to form the above linear regression model with intercept equal to 0?

from sklearn.linear_model import LinearRegression