Getting Different Result Each Time I Run A Linear Regression Using Scikit
Hi I have a linear regression model that i am trying to optimise. I am optimising the span of an exponential moving average and the number of lagged variables that I use in the reg
Solution 1:
The train_test_split
function from sklearn (see docs: http://scikit-learn.org/stable/modules/generated/sklearn.cross_validation.train_test_split.html) is random, so it is logical you get different results each time.
You can pass an argument to the random_state
keyword to have it the same each time.
Post a Comment for "Getting Different Result Each Time I Run A Linear Regression Using Scikit"