import numpy as np
import sklearn
from sklearn import linear_model
from sklearn.utils import shuffle
data = pd.read_csv('student-mat.csv', sep=';')
predict = 'Markup'
x = np.array(data.drop([predict], 1))
y = np.array(data[predict])
x_train, x_test, y_train, y_test = sklearn.model_selection.train_test_split(x, y, test_size=0.1)
linear = linear_model.LinearRegression()
linear.fit(x_train, y_train)
acc = linear.score(x_test, y_test)
print(acc)
print(linear.coef_)
print(linear.intercept_)
Currently the way its set up it can generate a linear model but for my data I need an exponential one, the problem is I dont fully understand the linear = linear_model.LinearRegression()
part of the code. Its using sklearn which ive looked into but cannot find an exponential equivalent. If someone can replace that line with an exponential equivalent that would be amazing.