geo-smart / xai_sedimentation_use_case_book

This is the Jupyter book for the XAI use case in sedimentation.
https://geo-smart.github.io/xai_sedimentation_use_case_book/
MIT License
1 stars 1 forks source link

undefined variables errors #2

Open tianhg28 opened 5 months ago

tianhg28 commented 5 months ago

undefined variables in data_EC.ipynb, evaluation_EC.ipynb, methods_EC.ipynb, and training_EC.ipynb, key error in data_EC.ipynb

spestana commented 5 months ago

@tianhg28 @ For each error, could you let me know which part of the notebook had the error, and copy and paste the full error messages here. Thanks!

tianhg28 commented 5 months ago

evaluation_EC.ipynb

Code: shap_df = data[bestfeatures] Error: NameError: name 'data' is not defined The data variable needs to be loaded from a csv file, which I don't think exists in the repo.

Code: br.fit(shap_df, target) Error: br needs to be defined from linear_model.BaysianRidge() and target needs to be extracted from data

Code: gp.fit(shap_df, target) Error:
the Gausian Process model gp needs to be defined

methods_EC.ipynb

Code: olsr = linear_model.Ridge() br = linear_model.BayesianRidge() searcher = GridSearchCV(olsr, {'alpha': np.arange(1, 300, 2)}, scoring="neg_root_mean_squared_error") searcher.fit(data[['Tidal Amplitude (cm)', 'Avg. Flood Depth (cm)']], target) Error: linear_model, GridSearchCV, data, target need to be defined

Code: bestfeatures = backward_elimination(data=data, target=target, num_feats=10, significance_threshold=0.05) Error: NameError: name 'data' is not defined same problem as before, data needs to be loaded

Code: scores = cross_validate(gp, shap_df, target, cv=rcv, scoring=('r2', 'neg_mean_absolute_error'), return_train_score=True) Error: Need to create shape_db from panda DataFrame