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

[SPARK-13338][ML] Allow setting 'degree' parameter to 1 for PolynomialExpansion #11216

Closed

Conversation

grzegorz-chilkiewicz
Copy link
Contributor

No description provided.

@yanboliang
Copy link
Contributor

LGTM pending test.
ping @mengxr @jkbradley
Could you add @grzegorz-chilkiewicz to white list?

@mengxr
Copy link
Contributor

mengxr commented Feb 18, 2016

ok to test

@SparkQA
Copy link

SparkQA commented Feb 18, 2016

Test build #51467 has finished for PR 11216 at commit c66d5e5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Feb 23, 2016

The implementation should work with degree 1, but we need to add a test to show that. @grzegorz-chilkiewicz Could you update this PR and add a test to show with degree 1 it is a no-op? Just testing the setter is not sufficient.

@grzegorz-chilkiewicz
Copy link
Contributor Author

OK, I'll prepare that test soon.

I've checked that with even degree 0, PolynomialExpansion works (and returns '0-length vector').
Does it make sense to extend range of legal parameters to gtEq(0) ?
(PolynomialExpansion works even for negative integers - and returns 0-length vector...)

@MLnick
Copy link
Contributor

MLnick commented Feb 23, 2016

@mengxr I could see value 1 being used in a cross-validation setup. But do we really want to allow <=0 param values? I don't think it makes a lot of sense to return a zero-length vector for a non-zero length input. There's no real use case for this.

@mengxr
Copy link
Contributor

mengxr commented Feb 23, 2016

No, it is not necessary to support 0 degree.

@SparkQA
Copy link

SparkQA commented Feb 23, 2016

Test build #51774 has finished for PR 11216 at commit 83f22a9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Feb 23, 2016

LGTM. Merged into master. Thanks!

@asfgit asfgit closed this in 5d69eaf Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants