el codigo actual:
#importacion de librerias y Red neuronal
import pandas as pd
import numpy as np
from sklearn.neural_network import MLPRegressor
#importacion de los datos para el pronostico
datos=pd.read_excel(r"C:\Users\ruben.LAPTOP-4DT1VFEH\Desktop\Escritorio\MII-I Semestre\0.-Tesis-RDL\Detailed_Production_History-por meses.xlsx",sheet_name=“data”)
x=np.array(‘Mes’)
y=np.array(“NP”)
X=x[:,np.newaxis]
#entrenamiento de datos y prueba
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y)
mlr=MLPRegressor(solver=“lbfgs”,alpha=1e-5, hidden_layer_sizes=(1,1),random_state=1)
mlr.fit(X_train,y_train)
print(mlr.score(X_train,y_train))
print(“Mes”,mlr.predict(10))
el error que me sale:
IndexError Traceback (most recent call last)
Input In [20], in <cell line: 11>()
8 x=np.array(‘Mes’)
9 y=np.array(“NP”)
—> 11 X=x[:,np.newaxis]
13 #entrenamiento de datos y prueba
15 from sklearn.model_selection import train_test_split
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed