Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined variables errors #2

Open
tianhg28 opened this issue Mar 28, 2024 · 2 comments
Open

undefined variables errors #2

tianhg28 opened this issue Mar 28, 2024 · 2 comments
Assignees

Comments

@tianhg28
Copy link
Contributor

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

@spestana spestana self-assigned this Apr 5, 2024
@spestana
Copy link
Contributor

spestana commented Apr 5, 2024

@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 tianhg28 reopened this Apr 10, 2024
@tianhg28
Copy link
Contributor Author

tianhg28 commented Apr 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants