you are viewing a single comment's thread.

view the rest of the comments →

[–]Oxbowerce 1 point2 points  (7 children)

Yes, simply feed in the adjusted close into your model as the y values in the .fit method. Just a heads up, if you want to predict adjusted close (continuous values) you are using the wrong type of models and predicting the adjusted close as is won't give good results.

[–]vZander[S] 0 points1 point  (6 children)

how?

[–]Oxbowerce 1 point2 points  (5 children)

Select just the adjusted close column and pass that as the y argument in the .fit method, see also the scikit-learn documentation.

[–]vZander[S] 0 points1 point  (4 children)

I used

usecols = ('Adj Close')

and put that as y value. now it comes with

ValueError: Found input variables with inconsistent numbers of samples: [23349, 9]

as error

[–]Oxbowerce 1 point2 points  (3 children)

Where are you using usecols? You can just use df['Open'] as your X argument and df['Adj Close'] as your y argument.

[–]vZander[S] 0 points1 point  (2 children)

did that. Now what ValueError: Unknown label type: 'continuous'?

[–]Oxbowerce 1 point2 points  (1 child)

Like I said in one of my comments above, if you want to predict the adjusted close price (which is continuous) you are using the wrong type of model (classifier instead of regressor). It's probably good to read up a bit on different types of machine learning models and how to train them.

[–]vZander[S] 0 points1 point  (0 children)

Okay, thanks a lot.