Doubt in Linear Reg - "random_state" - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Doubt in Linear Reg - "random_state" (/thread-26563.html) |
Doubt in Linear Reg - "random_state" - kumarants - May-05-2020 import pandas as pd import numpy as np from sklearn import linear_model import statsmodels.api as sm from sklearn.metrics import mean_squared_error data=pd.read_excel('C:/Users/Kumaran TS/Desktop/Jupyter prg/Tensile.xlsx') from sklearn.model_selection import train_test_split x=data['Hardness'].values.reshape(-1,1) y=data['Tensile strength'].values.reshape(-1,1) x_train,x_test,y_train,y_test = train_test_spilt(x,y,test_size=0.2,random_state=80)what is the purpose of "random_state=80" if i change the value and my output varies. Please explain. RE: Doubt in Linear Reg - "random_state" - buran - May-05-2020 check https://stackoverflow.com/a/28069274/4046632 |