Just trying to execute the code as is and I'm getting the following error:
trainingScores = []
cvScores = []
predictionsBasedOnKFolds = pd.DataFrame(data=[], index=y_train.index, \
columns=['prediction'])
for train_index, cv_index in k_fold.split(np.zeros(len(X_train)), \
y_train.ravel()):
X_train_fold, X_cv_fold = X_train.iloc[train_index,:], \
X_train.iloc[cv_index,:]
y_train_fold, y_cv_fold = y_train.iloc[train_index], \
y_train.iloc[cv_index]
Hi, could you please install pip in your notebook using the following, !pip install lightgbm, and try again? Please let me know if you are getting the issue still.
Just trying to execute the code as is and I'm getting the following error: trainingScores = [] cvScores = [] predictionsBasedOnKFolds = pd.DataFrame(data=[], index=y_train.index, \ columns=['prediction'])
for train_index, cv_index in k_fold.split(np.zeros(len(X_train)), \ y_train.ravel()): X_train_fold, X_cv_fold = X_train.iloc[train_index,:], \ X_train.iloc[cv_index,:] y_train_fold, y_cv_fold = y_train.iloc[train_index], \ y_train.iloc[cv_index]
loglossLightGBMGradientBoosting = log_loss(y_train, \ predictionsBasedOnKFolds.loc[:,'prediction']) print('LightGBM Gradient Boosting Log Loss: ', \ loglossLightGBMGradientBoosting)
LightGBMError Traceback (most recent call last)