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

Add function to convert NLP col to 3,4, or 5 numeric cols #4

Closed
levithatcher opened this issue Aug 12, 2016 · 0 comments
Closed

Add function to convert NLP col to 3,4, or 5 numeric cols #4

levithatcher opened this issue Aug 12, 2016 · 0 comments

Comments

@levithatcher
Copy link
Contributor

Based on PCA, we want to be able to convert text (using scikit-learn package) to a varying number of numeric columns.

Have an argument letting user specify which is the text col (since we'll expect a dataframe).

Two routes for this (and we can use an argument to specify which way the user wants):

  1. We have a method argument that specifies the number of resultant columns, and we just grab that many eigenvalues (from the large matrix that arises after vectorization)

  2. We have an argument such as percent.var.kept, which tells us how many columns (or eigenvectors) to grab that would make sure we get that much variance (from the super large matrix that, of course, contains all the variance).

So if percent.var.kept=10 and we grab three eigenvectors and have three cols in the resulting dataframe, then percent.var.kept=90 would pull back 30-40 columns. Of course, the number of columns will differ based on how much text is in the input text column.

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

No branches or pull requests

1 participant