From 831b3a114dfbf8b096e9fccfb4514d6dc9aeeb5f Mon Sep 17 00:00:00 2001 From: Timothy Hunter Date: Wed, 18 Nov 2015 17:05:35 -0800 Subject: [PATCH 1/5] work --- R/pkg/DESCRIPTION | 5 +- docs/_data/menu-ml.yaml | 10 ++++ docs/_data/menu-mllib.yaml | 75 +++++++++++++++++++++++++ docs/_includes/nav-left-wrapper-ml.html | 6 ++ docs/_includes/nav-left.html | 17 ++++++ docs/_layouts/global.html | 5 ++ docs/css/main.css | 15 +++++ docs/mllib-guide.md | 2 + 8 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 docs/_data/menu-ml.yaml create mode 100644 docs/_data/menu-mllib.yaml create mode 100644 docs/_includes/nav-left-wrapper-ml.html create mode 100644 docs/_includes/nav-left.html diff --git a/R/pkg/DESCRIPTION b/R/pkg/DESCRIPTION index 369714f7b99c2..768c89c42a9d4 100644 --- a/R/pkg/DESCRIPTION +++ b/R/pkg/DESCRIPTION @@ -18,10 +18,10 @@ Collate: 'schema.R' 'generics.R' 'jobj.R' - 'RDD.R' - 'pairRDD.R' 'column.R' 'group.R' + 'RDD.R' + 'pairRDD.R' 'DataFrame.R' 'SQLContext.R' 'backend.R' @@ -36,3 +36,4 @@ Collate: 'stats.R' 'types.R' 'utils.R' +RoxygenNote: 5.0.1 diff --git a/docs/_data/menu-ml.yaml b/docs/_data/menu-ml.yaml new file mode 100644 index 0000000000000..d17bbb4d4e5cd --- /dev/null +++ b/docs/_data/menu-ml.yaml @@ -0,0 +1,10 @@ +- text: Feature extraction, transformation, and selection + url: ml-features.html +- text: Decision trees for classification and regression + url: ml-decision-tree.html +- text: Ensembles + url: ml-ensembles.html +- text: Linear methods with elastic net regularization + url: ml-linear-methods.html +- text: Multilayer perceptron classifier + url: ml-ann.html diff --git a/docs/_data/menu-mllib.yaml b/docs/_data/menu-mllib.yaml new file mode 100644 index 0000000000000..51915f5f445db --- /dev/null +++ b/docs/_data/menu-mllib.yaml @@ -0,0 +1,75 @@ +- text: Data types + url: /mllib-data-types.html +- text: Basic statistics + url: /mllib-statistics.html + subitems: + - text: Summary statistics + url: mllib-statistics.html#summary-statistics + - text: Correlations + url: mllib-statistics.html#correlations + - text: Stratified sampling + url: mllib-statistics.html#stratified-sampling + - text: Hypothesis testing + url: mllib-statistics.html#hypothesis-testing + - text: Random data generation + url: mllib-statistics.html#random-data-generation +- text: Classification and regression + url: mllib-classification-regression.html + subitems: + - text: Linear models (SVMs, logistic regression, linear regression) + url: mllib-linear-methods.html + - text: Naive Bayes + url: mllib-naive-bayes.html + - text: decision trees + url: mllib-decision-tree.html + - text: ensembles of trees (Random Forests and Gradient-Boosted Trees) + url: mllib-ensembles.html + - text: isotonic regression + url: mllib-isotonic-regression.html +- text: Collaborative filtering + url: mllib-collaborative-filtering.html + subitems: + - text: alternating least squares (ALS) + url: mllib-collaborative-filtering.html#collaborative-filtering +- text: Clustering + url: mllib-clustering.html + subitems: + - text: k-means + url: mllib-clustering.html#k-means + - text: Gaussian mixture + url: mllib-clustering.html#gaussian-mixture + - text: power iteration clustering (PIC) + url: mllib-clustering.html#power-iteration-clustering-pic + - text: latent Dirichlet allocation (LDA) + url: mllib-clustering.html#latent-dirichlet-allocation-lda + - text: streaming k-means + url: mllib-clustering.html#streaming-k-means +- text: Dimensionality reduction + url: mllib-dimensionality-reduction.html + subitems: + - text: singular value decomposition (SVD) + url: mllib-dimensionality-reduction.html#singular-value-decomposition-svd + - text: principal component analysis (PCA) + url: mllib-dimensionality-reduction.html#principal-component-analysis-pca +- text: Feature extraction and transformation + url: mllib-feature-extraction.html +- text: Frequent pattern mining + url: mllib-frequent-pattern-mining.html + subitems: + - text: FP-growth + url: mllib-frequent-pattern-mining.html#fp-growth + - text: association rules + url: mllib-frequent-pattern-mining.html#association-rules + - text: PrefixSpan + url: mllib-frequent-pattern-mining.html#prefix-span +- text: Evaluation metrics + url: mllib-evaluation-metrics.html +- text: PMML model export + url: mllib-pmml-model-export.html +- text: Optimization (developer) + url: mllib-optimization.html + subitems: + - text: stochastic gradient descent + url: mllib-optimization.html#stochastic-gradient-descent-sgd + - text: limited-memory BFGS (L-BFGS) + url: mllib-optimization.html#limited-memory-bfgs-l-bfgs diff --git a/docs/_includes/nav-left-wrapper-ml.html b/docs/_includes/nav-left-wrapper-ml.html new file mode 100644 index 0000000000000..a19cc1b3b2931 --- /dev/null +++ b/docs/_includes/nav-left-wrapper-ml.html @@ -0,0 +1,6 @@ +
+

ML

+ {% include nav-left.html nav=include.nav-ml %} +

MLlib

+ {% include nav-left.html nav=include.nav-mllib %} +
\ No newline at end of file diff --git a/docs/_includes/nav-left.html b/docs/_includes/nav-left.html new file mode 100644 index 0000000000000..73176f4132554 --- /dev/null +++ b/docs/_includes/nav-left.html @@ -0,0 +1,17 @@ +{% assign navurl = page.url | remove: 'index.html' %} + diff --git a/docs/_layouts/global.html b/docs/_layouts/global.html index 467ff7a03fb70..2c0959230c133 100755 --- a/docs/_layouts/global.html +++ b/docs/_layouts/global.html @@ -124,6 +124,11 @@ + {% if page.url contains "/ml" %} + {% include nav-left-wrapper-ml.html nav-mllib=site.data.menu-mllib nav-ml=site.data.menu-ml %} + {% endif %} + +
{% if page.displayTitle %}

{{ page.displayTitle }}

diff --git a/docs/css/main.css b/docs/css/main.css index d770173be1014..1894b431d9bc8 100755 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -155,3 +155,18 @@ ul.nav li.dropdown ul.dropdown-menu li.dropdown-submenu ul.dropdown-menu { * AnchorJS (anchor links when hovering over headers) */ a.anchorjs-link:hover { text-decoration: none; } + + +/** + * The left navigation bar. + */ +.left-menu { + max-width: 350px; + z-index: 100; + position: fixed; +} + +.left-menu h3 { + margin-left: 10px; + line-height: 30px; +} \ No newline at end of file diff --git a/docs/mllib-guide.md b/docs/mllib-guide.md index 91e50ccfecec4..8b34543ef8de4 100644 --- a/docs/mllib-guide.md +++ b/docs/mllib-guide.md @@ -18,6 +18,8 @@ It divides into two packages: * [`spark.ml`](ml-guide.html) provides higher-level API built on top of [DataFrames](sql-programming-guide.html#dataframes) for constructing ML pipelines. + + Using `spark.ml` is recommended because with DataFrames the API is more versatile and flexible. But we will keep supporting `spark.mllib` along with the development of `spark.ml`. Users should be comfortable using `spark.mllib` features and expect more features coming. From 38fd759258a5b3cf93f569db480aa66833ab1830 Mon Sep 17 00:00:00 2001 From: Timothy Hunter Date: Wed, 18 Nov 2015 17:06:02 -0800 Subject: [PATCH 2/5] clean --- R/pkg/DESCRIPTION | 5 ++--- docs/mllib-guide.md | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/R/pkg/DESCRIPTION b/R/pkg/DESCRIPTION index 768c89c42a9d4..369714f7b99c2 100644 --- a/R/pkg/DESCRIPTION +++ b/R/pkg/DESCRIPTION @@ -18,10 +18,10 @@ Collate: 'schema.R' 'generics.R' 'jobj.R' - 'column.R' - 'group.R' 'RDD.R' 'pairRDD.R' + 'column.R' + 'group.R' 'DataFrame.R' 'SQLContext.R' 'backend.R' @@ -36,4 +36,3 @@ Collate: 'stats.R' 'types.R' 'utils.R' -RoxygenNote: 5.0.1 diff --git a/docs/mllib-guide.md b/docs/mllib-guide.md index 8b34543ef8de4..91e50ccfecec4 100644 --- a/docs/mllib-guide.md +++ b/docs/mllib-guide.md @@ -18,8 +18,6 @@ It divides into two packages: * [`spark.ml`](ml-guide.html) provides higher-level API built on top of [DataFrames](sql-programming-guide.html#dataframes) for constructing ML pipelines. - - Using `spark.ml` is recommended because with DataFrames the API is more versatile and flexible. But we will keep supporting `spark.mllib` along with the development of `spark.ml`. Users should be comfortable using `spark.mllib` features and expect more features coming. From c8a7cb2cd5f5d207605d38e9eb042be293e1a291 Mon Sep 17 00:00:00 2001 From: Timothy Hunter Date: Thu, 19 Nov 2015 11:31:09 -0800 Subject: [PATCH 3/5] comments --- docs/_data/menu-ml.yaml | 2 +- docs/_data/menu-mllib.yaml | 4 ++-- docs/_includes/nav-left-wrapper-ml.html | 4 ++-- docs/_layouts/global.html | 27 ++++++++++++++----------- docs/css/main.css | 16 +++++++++++++-- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/docs/_data/menu-ml.yaml b/docs/_data/menu-ml.yaml index d17bbb4d4e5cd..dff3d33bf4ed1 100644 --- a/docs/_data/menu-ml.yaml +++ b/docs/_data/menu-ml.yaml @@ -4,7 +4,7 @@ url: ml-decision-tree.html - text: Ensembles url: ml-ensembles.html -- text: Linear methods with elastic net regularization +- text: Linear methods with elastic-net regularization url: ml-linear-methods.html - text: Multilayer perceptron classifier url: ml-ann.html diff --git a/docs/_data/menu-mllib.yaml b/docs/_data/menu-mllib.yaml index 51915f5f445db..12d22abd52826 100644 --- a/docs/_data/menu-mllib.yaml +++ b/docs/_data/menu-mllib.yaml @@ -1,7 +1,7 @@ - text: Data types - url: /mllib-data-types.html + url: mllib-data-types.html - text: Basic statistics - url: /mllib-statistics.html + url: mllib-statistics.html subitems: - text: Summary statistics url: mllib-statistics.html#summary-statistics diff --git a/docs/_includes/nav-left-wrapper-ml.html b/docs/_includes/nav-left-wrapper-ml.html index a19cc1b3b2931..fdfc3f63a6a8d 100644 --- a/docs/_includes/nav-left-wrapper-ml.html +++ b/docs/_includes/nav-left-wrapper-ml.html @@ -1,6 +1,6 @@
-

ML

+

spark.ml package

{% include nav-left.html nav=include.nav-ml %} -

MLlib

+

spark.mllib package

{% include nav-left.html nav=include.nav-mllib %}
\ No newline at end of file diff --git a/docs/_layouts/global.html b/docs/_layouts/global.html index 2c0959230c133..1b09e2221e173 100755 --- a/docs/_layouts/global.html +++ b/docs/_layouts/global.html @@ -124,21 +124,24 @@
- {% if page.url contains "/ml" %} - {% include nav-left-wrapper-ml.html nav-mllib=site.data.menu-mllib nav-ml=site.data.menu-ml %} - {% endif %} - +
+ + {% if page.url contains "/ml" %} + {% include nav-left-wrapper-ml.html nav-mllib=site.data.menu-mllib nav-ml=site.data.menu-ml %} + {% endif %} -
- {% if page.displayTitle %} -

{{ page.displayTitle }}

- {% else %} -

{{ page.title }}

- {% endif %} - {{ content }} +
+ {% if page.displayTitle %} +

{{ page.displayTitle }}

+ {% else %} +

{{ page.title }}

+ {% endif %} -
+ {{ content }} + +
+
diff --git a/docs/css/main.css b/docs/css/main.css index 1894b431d9bc8..19fbad9f1afd1 100755 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -39,8 +39,16 @@ margin-left: 10px; } +body .container-wrapper { + position: absolute; + width: 100%; + display: flex; +} + body #content { line-height: 1.6; /* Inspired by Github's wiki style */ + background-color: white; + padding-left: 15px; } .title { @@ -162,8 +170,12 @@ a.anchorjs-link:hover { text-decoration: none; } */ .left-menu { max-width: 350px; - z-index: 100; - position: fixed; + height: 100%; + + padding-right: 9.5px; + border: 1px solid rgba(0,0,0,0.15); + background-color: #e2f1f8; + border-radius: 4px; } .left-menu h3 { From c773f3f531089b47c460e7a2b544b61c286ba778 Mon Sep 17 00:00:00 2001 From: Timothy Hunter Date: Thu, 19 Nov 2015 15:08:29 -0800 Subject: [PATCH 4/5] comments --- docs/_includes/nav-left-wrapper-ml.html | 12 +++++++----- docs/css/main.css | 9 ++++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/_includes/nav-left-wrapper-ml.html b/docs/_includes/nav-left-wrapper-ml.html index fdfc3f63a6a8d..0103e890cc21a 100644 --- a/docs/_includes/nav-left-wrapper-ml.html +++ b/docs/_includes/nav-left-wrapper-ml.html @@ -1,6 +1,8 @@ -
-

spark.ml package

- {% include nav-left.html nav=include.nav-ml %} -

spark.mllib package

- {% include nav-left.html nav=include.nav-mllib %} +
+
+

spark.ml package

+ {% include nav-left.html nav=include.nav-ml %} +

spark.mllib package

+ {% include nav-left.html nav=include.nav-mllib %} +
\ No newline at end of file diff --git a/docs/css/main.css b/docs/css/main.css index 19fbad9f1afd1..6d92a29dc653b 100755 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -46,6 +46,8 @@ body .container-wrapper { } body #content { + position: relative; + line-height: 1.6; /* Inspired by Github's wiki style */ background-color: white; padding-left: 15px; @@ -168,9 +170,14 @@ a.anchorjs-link:hover { text-decoration: none; } /** * The left navigation bar. */ +.left-menu-wrapper { + position: absolute; + height: 100%; +} + .left-menu { + position: fixed; max-width: 350px; - height: 100%; padding-right: 9.5px; border: 1px solid rgba(0,0,0,0.15); From 0350265a487cac0046f06b58daac0495ddf635a2 Mon Sep 17 00:00:00 2001 From: Timothy Hunter Date: Fri, 20 Nov 2015 14:15:45 -0800 Subject: [PATCH 5/5] changes --- docs/css/main.css | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/css/main.css b/docs/css/main.css index 6d92a29dc653b..356b324d6303b 100755 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -172,17 +172,20 @@ a.anchorjs-link:hover { text-decoration: none; } */ .left-menu-wrapper { position: absolute; - height: 100%; + height: 100%; + + width: 256px; + margin-top: -20px; + padding-top: 20px; + background-color: #F0F8FC; } .left-menu { position: fixed; max-width: 350px; - padding-right: 9.5px; - border: 1px solid rgba(0,0,0,0.15); - background-color: #e2f1f8; - border-radius: 4px; + padding-right: 10px; + width: 256px; } .left-menu h3 {