Мой код работает, но ничего не даст, и я не уверен, почему? Вот изображение файла phillies_of
import csv
import numpy as np
import random
import pandas as pd
from pandas import DataFrame
import matplotlib.pyplot as plt
from sklearn import linear_model
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
#national league east
phillies_of = pd.read_csv('/Users/hannahbeegle/Desktop/Teams/PHILLIES.csv', header = None)
phillies_pr = pd.read_csv('/Users/hannahbeegle/Desktop/Teams/PHILLIES_PR.csv',header = None)
X = phillies_of.iloc[1:33, [5, 9, 10, 13, 17, 18, 21, 23, 25]].values
Y = phillies_of.iloc[1:33,2].values
poly = PolynomialFeatures(degree = 8)
X_poly = poly.fit_transform(X)
print('Done')
poly.fit(X_poly, Y)
lin2 = LinearRegression()
lin2.fit(X_poly, Y)
print('Done 2.0')
plt.scatter(X, Y, color = 'blue', s = 10)
plt.plot(X, lin2,predict(poly.fit_transform(X)), color = 'red')
plt.show()
lin2.predict(poly.fit_transform(110.0))
Вывод: Готово