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

features vs feature #1

Open
sylnsr opened this issue Jun 13, 2023 · 0 comments
Open

features vs feature #1

sylnsr opened this issue Jun 13, 2023 · 0 comments

Comments

@sylnsr
Copy link

sylnsr commented Jun 13, 2023

# Fortunately, PySpark has functions for handling this built into the `pyspark.ml.features` submodule. You can create what are called `'one-hot vectors'` to represent the carrier and the destination of each flight. A one-hot vector is a way of representing a categorical feature where every observation has a vector in which all elements are zero except for at most one element, which has a value of one (1).

I think this is a typo. It should be pyspark.ml.feature (singular) instead of pyspark.ml.features (plural), as you can see in the source code of the relevant package

I too have made this error, which is how I found this code () when I searched for my error, which was No module named 'pyspark.ml.features' ... but fixed my error by using import pyspark.ml.feature instead.

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

1 participant