Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/profit.py Secret

Created Apr 29, 2021
Embed
What would you like to do?
from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(xtrain, ytrain)
ypred = model.predict(xtest)
data = pd.DataFrame(data={"Predicted Profit": ypred.flatten()})
print(data.head())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment