Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noob needing some help
#1
I am a new python user and I don't understand this error message. The code I have is:

import pandas as pd
import quandl, math
import numpy as np
from sklearn import preprocessing, cross_validation, svm
from sklearn.linear_model import LinearRegression

df = quandl.get("WIKI/GOOGL", authtoken="X5A1-ewy2UCfkFVfGKuW")
df = df[["Adj. Open","Adj. High","Adj. Low","Adj. Close","Adj. Volume",]]
df["HL_PCT"] = (df["Adj. High"] - df["Adj. Close"]) / df["Adj. Close"] * 100.0
df["PCT_change"] = (df["Adj. Close"] - df["Adj. Open"]) / df["Adj. Open"] * 100.0

df = df [["Adj. Close","HL_PCT","PCT_change","Adj. Volume"]]

forecast_col = "Adj. Close"
df.fillna(-99999, inplace=True)

forecast_out = int(math.ceil(0.01*len(df)))

df["label"] = df[forecast_col].shift(-forecast_out)
df.dropna(inplace=True)

x = np.array(df.drop(["label"],1))
y = np.array(df["label"])

x = preprocessing.scale(x)

x = x[:-forecast_out+1]
df.dropna(inplace=True)
y= np.array(df["label"])

print(len(x),len(y))
And the error I am getting is:

Error:
line 41 "This module will be removed in 0.20.", DeprecationWarning) DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
Reply


Messages In This Thread
Noob needing some help - by TheDovah7 - Mar-06-2018, 03:11 PM
RE: Noob needing some help - by nilamo - Mar-06-2018, 04:04 PM
RE: Noob needing some help - by buran - Mar-06-2018, 04:21 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020