-
- Downloads
[SPARK-16421][EXAMPLES][ML] Improve ML Example Outputs
## What changes were proposed in this pull request? Improve example outputs to better reflect the functionality that is being presented. This mostly consisted of modifying what was printed at the end of the example, such as calling show() with truncate=False, but sometimes required minor tweaks in the example data to get relevant output. Explicitly set parameters when they are used as part of the example. Fixed Java examples that failed to run because of using old-style MLlib Vectors or problem with schema. Synced examples between different APIs. ## How was this patch tested? Ran each example for Scala, Python, and Java and made sure output was legible on a terminal of width 100. Author: Bryan Cutler <cutlerb@gmail.com> Closes #14308 from BryanCutler/ml-examples-improve-output-SPARK-16260.
Showing
- data/mllib/lr-data/random.data 0 additions, 1000 deletionsdata/mllib/lr-data/random.data
- data/mllib/lr_data.txt 0 additions, 1000 deletionsdata/mllib/lr_data.txt
- data/mllib/sample_tree_data.csv 0 additions, 569 deletionsdata/mllib/sample_tree_data.csv
- examples/src/main/java/org/apache/spark/examples/JavaPageRank.java 5 additions, 0 deletions...src/main/java/org/apache/spark/examples/JavaPageRank.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaAFTSurvivalRegressionExample.java 3 additions, 2 deletions...e/spark/examples/ml/JavaAFTSurvivalRegressionExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaBinarizerExample.java 6 additions, 5 deletions...va/org/apache/spark/examples/ml/JavaBinarizerExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaBucketizerExample.java 6 additions, 1 deletion...a/org/apache/spark/examples/ml/JavaBucketizerExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaChiSqSelectorExample.java 4 additions, 0 deletions...rg/apache/spark/examples/ml/JavaChiSqSelectorExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaCountVectorizerExample.java 1 addition, 1 deletion.../apache/spark/examples/ml/JavaCountVectorizerExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaDCTExample.java 5 additions, 1 deletion...ain/java/org/apache/spark/examples/ml/JavaDCTExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaGaussianMixtureExample.java 2 additions, 2 deletions.../apache/spark/examples/ml/JavaGaussianMixtureExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaIndexToStringExample.java 14 additions, 1 deletion...rg/apache/spark/examples/ml/JavaIndexToStringExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaIsotonicRegressionExample.java 2 additions, 2 deletions...ache/spark/examples/ml/JavaIsotonicRegressionExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaMaxAbsScalerExample.java 23 additions, 5 deletions...org/apache/spark/examples/ml/JavaMaxAbsScalerExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaMinMaxScalerExample.java 25 additions, 5 deletions...org/apache/spark/examples/ml/JavaMinMaxScalerExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaMultilayerPerceptronClassifierExample.java 7 additions, 1 deletion...xamples/ml/JavaMultilayerPerceptronClassifierExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaNGramExample.java 7 additions, 11 deletions...n/java/org/apache/spark/examples/ml/JavaNGramExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaNaiveBayesExample.java 10 additions, 3 deletions...a/org/apache/spark/examples/ml/JavaNaiveBayesExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaNormalizerExample.java 21 additions, 2 deletions...a/org/apache/spark/examples/ml/JavaNormalizerExample.java
- examples/src/main/java/org/apache/spark/examples/ml/JavaOneHotEncoderExample.java 3 additions, 1 deletion...rg/apache/spark/examples/ml/JavaOneHotEncoderExample.java
Loading
Please register or sign in to comment