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-13512] [ML] add example and doc for MaxAbsScaler #11392

Closed
wants to merge 5 commits into from

Conversation

hhbyyh
Copy link
Contributor

@hhbyyh hhbyyh commented Feb 26, 2016

What changes were proposed in this pull request?

jira: https://issues.apache.org/jira/browse/SPARK-13512
Add example and doc for ml.feature.MaxAbsScaler.

How was this patch tested?

unit tests

@SparkQA
Copy link

SparkQA commented Feb 26, 2016

Test build #52048 has finished for PR 11392 at commit 43c77e0.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • public class JavaMaxAbsScalerExample

@SparkQA
Copy link

SparkQA commented Feb 26, 2016

Test build #52049 has finished for PR 11392 at commit 391d52a.

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


import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.ml.feature.MaxAbsScaler;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have $example on$ here (to match the JavaMinMaxScalerExample), i.e.

// $example on$
import org.apache.spark.ml.feature.MaxAbsScaler;
import org.apache.spark.ml.feature.MaxAbsScalerModel;
import org.apache.spark.sql.DataFrame;
// $example off$

@MLnick
Copy link
Contributor

MLnick commented Mar 10, 2016

@hhbyyh ping

// Compute summary statistics and generate MaxAbsScalerModel
MaxAbsScalerModel scalerModel = scaler.fit(dataFrame);

// rescale each feature to range [min, max].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[min, max] should be [-1, 1].

@hhbyyh
Copy link
Contributor Author

hhbyyh commented Mar 10, 2016

@MLnick Thanks for helping review. Updated according to the comments.

@SparkQA
Copy link

SparkQA commented Mar 10, 2016

Test build #52836 has finished for PR 11392 at commit 9cf4ae4.

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

@MLnick
Copy link
Contributor

MLnick commented Mar 11, 2016

Thanks! Merging to master.

@asfgit asfgit closed this in 0b713e0 Mar 11, 2016
asfgit pushed a commit that referenced this pull request Mar 11, 2016
…xAbsScaler example

## What changes were proposed in this pull request?

Fix build failure introduced in #11392 (change `DataFrame` -> `Dataset<Row>`).

## How was this patch tested?

Existing build/unit tests

Author: Nick Pentreath <nick.pentreath@gmail.com>

Closes #11653 from MLnick/java-maxabs-example-fix.
roygao94 pushed a commit to roygao94/spark that referenced this pull request Mar 22, 2016
## What changes were proposed in this pull request?

jira: https://issues.apache.org/jira/browse/SPARK-13512
Add example and doc for ml.feature.MaxAbsScaler.

## How was this patch tested?
 unit tests

Author: Yuhao Yang <hhbyyh@gmail.com>

Closes apache#11392 from hhbyyh/maxabsdoc.
roygao94 pushed a commit to roygao94/spark that referenced this pull request Mar 22, 2016
…xAbsScaler example

## What changes were proposed in this pull request?

Fix build failure introduced in apache#11392 (change `DataFrame` -> `Dataset<Row>`).

## How was this patch tested?

Existing build/unit tests

Author: Nick Pentreath <nick.pentreath@gmail.com>

Closes apache#11653 from MLnick/java-maxabs-example-fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants