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

AttributeError: 'NoneType' object has no attribute 'split' using anaconda #754

Closed
Selithrarion opened this issue Sep 10, 2023 · 6 comments
Closed

Comments

@Selithrarion
Copy link

needed to upgrade threadpoolctl to 3.2
pip install threadpoolctl --upgrade
to fix the error AttributeError: 'NoneType' object has no attribute 'split' in topic 3 on the line
knn_pred = knn.predict(X_holdout_scaled)
also it was in some previous topic but dont remember where

used anaconda so im suggesting to add a hint or smth to help other people if they face it

@Selithrarion
Copy link
Author

https://mlcourse.ai/book/topic03/assignment03_decision_trees_solution.html
line

plot_tree(
    dt, feature_names=df_train.columns, filled=True, class_names=["Won't go", "Will go"]
);

did throw an error cuz i provided an Index instead of a list so i was able to fix using df_train.columns.tolist()

@Selithrarion
Copy link
Author

is it should be like this? data_test[c].fillna(data_train[c].mode()[0], inplace=True)

# fill missing data

for c in categorical_columns:
    data_train[c].fillna(data_train[c].mode()[0], inplace=True)
    data_test[c].fillna(data_train[c].mode()[0], inplace=True)

for c in numerical_columns:
    data_train[c].fillna(data_train[c].median(), inplace=True)
    data_test[c].fillna(data_train[c].median(), inplace=True)

@Selithrarion
Copy link
Author

https://mlcourse.ai/book/topic06/topic6_feature_engineering_feature_selection.html#statistical-approaches - Statistical approaches section,
VarianceThreshold(0.7).fit_transform(x_data_generated).shape
and etc doesnt change the data shape

@Selithrarion
Copy link
Author

https://mlcourse.ai/book/topic08/assignment08_implement_sgd_regressor.html
Linear regression and Stochastic Gradient Descent section
image

@Selithrarion
Copy link
Author

https://mlcourse.ai/book/topic09/assignment09_time_series.html downloads an html file every time i refresh the page o_o

@Yorko Yorko mentioned this issue Aug 19, 2024
Yorko added a commit that referenced this issue Aug 19, 2024
* update poetry; rerun all notebooks

* update poetry; re-run all notebooksl fix minor issues from #754

---------

Co-authored-by: Yury Kashnitsky <kashnitsky@google.com>
@Yorko
Copy link
Owner

Yorko commented Aug 19, 2024

Better late than never.

knn_pred = knn.predict(X_holdout_scaled)

Doesn't reproduce, I'm providing all dependencies with Poetry, those should work.

plot_tree(
dt, feature_names=df_train.columns, filled=True, class_names=["Won't go", "Will go"]
);

Don't see issues here.

is it should be like this? data_test[c].fillna(data_train[c].mode()[0], inplace=True)

Yes, filling in data in the test set with statistics calculated with the training set.

VarianceThreshold(0.7).fit_transform(x_data_generated).shape
and etc doesnt change the data shape

No, it actually throws away one feature

Linear regression and Stochastic Gradient Descent section

fixed in #768

https://mlcourse.ai/book/topic09/assignment09_time_series.html downloads an html file every time i refresh the page o_o

no longer see the issue (another one with Prophet will be fixed later #767)

@Yorko Yorko closed this as completed Aug 19, 2024
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