dataset_total = concat((training_set['Milk'], test_set['Milk']), axis = 0)
inputs = dataset_total[len(dataset_total) - len(test_set) - 10:].values
inputs = inputs.reshape(-1,1)
inputs = sc.transform(inputs)
X_test = []
for i in range(10, 16):
X_test.append(inputs[i-10:i, 0])
X_test = np.array(X_test)
X_test = np.reshape(X_test, (X_test.shape[0], X_test.shape[1], 1))
predicted_stock_price = regressor.predict(X_test)
predicted_stock_price = sc.inverse_transform(predicted_stock_price)
Вот моя ошибка?
IndexError Traceback (most recent call last)
<ipython-input-26-93b179e798f0> in <module>
----> 1 dataset_total = concat((training_set['Milk'], test_set['Milk']),
axis = 0)
2 inputs = dataset_total[len(dataset_total) - len(test_set) -
10:].values
3 inputs = inputs.reshape(-1,1)
4 inputs = sc.transform(inputs)
5 X_test = []
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis
(`None`) and integer or boolean arrays are valid indices