Python Bytes - Linear Regression Prediction #python #datascience #coding Code in Description

#Coded by Andrew C import pandas as pd import numpy as np from sklearn import datasets from sklearn.linear_model import LinearRegression from sklearn.model_...

AC•27.6K views•0:06

🔥 Related Trending Topics

LIVE TRENDS

This video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!

THIS VIDEO IS TRENDING!

This video is currently trending in Bangladesh under the topic 's'.

About this video

#Coded by Andrew C import pandas as pd import numpy as np from sklearn import datasets from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split wine_dataset = datasets.load_wine() wine = pd.DataFrame(wine_dataset.data, columns=wine_dataset.feature_names) X = wine[['ash']] Y = wine['alcohol'] X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.3, random_state=1) model = LinearRegression() model.fit(X_train, Y_train) new_RM = np.array([2.5]).reshape(-1,1) print("Prediction: " + str(model.predict(new_RM)))

Video Information

Views
27.6K

Total views since publication

Likes
224

User likes and reactions

Duration
0:06

Video length

Published
Apr 10, 2023

Release date

Quality
hd

Video definition

About the Channel