Catadanna opened a new pull request #25032: Add root degree to PolynomialExpansion URL: https://github.com/apache/spark/pull/25032 To PolynomialExpansion I added expansion for root degrees. I created a pull request for the same problem in the file PolynomialExpansionGeneralized, I shall close it to avoid confusions. For example, for root degree 3, and basis vector (x,y) we have : (x, x^(1/2), x^(1/3), y, y^(1/2), y^(1/3) We can merge simple polynomial expansion with root polynomial expansion: for simple degree 2 and root degree 2: x, y, xy, x^2, y^2, x^(1/2), y^(1/2) I used java.lang.Math.pow, and there is a case in it : If the first argument is finite and less than zero and if the second argument is finite and not an integer,then the result is NaN For this case I raised a IllegalArgumentException; the user should normalize the features in order to have only positive features. The case of root degree polynomial expansion is mentioned in the Stanford Machine Learning course on Coursera. It helped myself to minimize error when performing Linear Regression. ## What changes were proposed in this pull request? To PolynomialExpansion I added expansion for root degrees. ## How was this patch tested? I did manual test on different numeric data (Integer, Double, positive, negative, zero, very large numbers, very small numbers) Please review https://spark.apache.org/contributing.html before opening a pull request.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
