diff options
author | Aaron Staple <aaron.staple@gmail.com> | 2014-09-25 16:11:00 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2014-09-25 16:11:00 -0700 |
commit | ff637c9380a6342fd0a4dde0710ec23856751dd4 (patch) | |
tree | f126756bb8adecd89014b5c18df60c4a6b44bf19 /sbin/slaves.sh | |
parent | 9b56e249e09d8da20f703b9381c5c3c8a1a1d4a9 (diff) | |
download | spark-ff637c9380a6342fd0a4dde0710ec23856751dd4.tar.gz spark-ff637c9380a6342fd0a4dde0710ec23856751dd4.tar.bz2 spark-ff637c9380a6342fd0a4dde0710ec23856751dd4.zip |
[SPARK-1484][MLLIB] Warn when running an iterative algorithm on uncached data.
Add warnings to KMeans, GeneralizedLinearAlgorithm, and computeSVD when called with input data that is not cached. KMeans is implemented iteratively, and I believe that GeneralizedLinearAlgorithm’s current optimizers are iterative and its future optimizers are also likely to be iterative. RowMatrix’s computeSVD is iterative against an RDD when run in DistARPACK mode. ALS and DecisionTree are iterative as well, but they implement RDD caching internally so do not require a warning.
I added a warning to GeneralizedLinearAlgorithm rather than inside its optimizers, where the iteration actually occurs, because internally GeneralizedLinearAlgorithm maps its input data to an uncached RDD before passing it to an optimizer. (In other words, the warning would be printed for every GeneralizedLinearAlgorithm run, regardless of whether its input is cached, if the warning were in GradientDescent or other optimizer.) I assume that use of an uncached RDD by GeneralizedLinearAlgorithm is intentional, and that the mapping there (adding label, intercepts and scaling) is a lightweight operation. Arguably a user calling an optimizer such as GradientDescent will be knowledgable enough to cache their data without needing a log warning, so lack of a warning in the optimizers may be ok.
Some of the documentation examples making use of these iterative algorithms did not cache their training RDDs (while others did). I updated the examples to always cache. I also fixed some (unrelated) minor errors in the documentation examples.
Author: Aaron Staple <aaron.staple@gmail.com>
Closes #2347 from staple/SPARK-1484 and squashes the following commits:
bd49701 [Aaron Staple] Address review comments.
ab2d4a4 [Aaron Staple] Disable warnings on python code path.
a7a0f99 [Aaron Staple] Change code comments per review comments.
7cca1dc [Aaron Staple] Change warning message text.
c77e939 [Aaron Staple] [SPARK-1484][MLLIB] Warn when running an iterative algorithm on uncached data.
3b6c511 [Aaron Staple] Minor doc example fixes.
Diffstat (limited to 'sbin/slaves.sh')
0 files changed, 0 insertions, 0 deletions