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

Fix feature_names_in_ attribute for knn_transformer in exercise 4 #110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 7, 2023

  1. Fix feature_names_in_ attribute in exercise 4

    Originally, self.feature_names_in_ was assigned to have the same value
    as self.estimator.feature_names_in_ but I think this is incorrect
    because self.estimator is not yet fitted. The fitted estimator is
    self.estimator_, so self_feature_names_in_ should be equal to
    self.estimator_.feature_names_in_. (Note the added _)
    
    Attempting to access knn_transformer.feature_names_in_ with the
    original code, would result in an error stating that the attribute
    doesn't exist, but with my change it outputs ['latitude', 'longitude'],
    which is the excpected output
    OrtizNicola committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    3a0a06a View commit details
    Browse the repository at this point in the history