[SPARK-11835] Adds a sidebar menu to MLlib's documentation
This PR adds a sidebar menu when browsing the user guide of MLlib. It uses a YAML file to describe the structure of the documentation. It should be trivial to adapt this to the other projects. ![screen shot 2015-11-18 at 4 46 12 pm](https://cloud.githubusercontent.com/assets/7594753/11259591/a55173f4-8e17-11e5-9340-0aed79d66262.png) Author: Timothy Hunter <timhunter@databricks.com> Closes #9826 from thunterdb/spark-11835.
This commit is contained in:
parent
a6fda0bfc1
commit
fc4b792d28
10
docs/_data/menu-ml.yaml
Normal file
10
docs/_data/menu-ml.yaml
Normal file
|
@ -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
|
75
docs/_data/menu-mllib.yaml
Normal file
75
docs/_data/menu-mllib.yaml
Normal file
|
@ -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
|
8
docs/_includes/nav-left-wrapper-ml.html
Normal file
8
docs/_includes/nav-left-wrapper-ml.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<div class="left-menu-wrapper">
|
||||||
|
<div class="left-menu">
|
||||||
|
<h3>spark.ml package</h3>
|
||||||
|
{% include nav-left.html nav=include.nav-ml %}
|
||||||
|
<h3>spark.mllib package</h3>
|
||||||
|
{% include nav-left.html nav=include.nav-mllib %}
|
||||||
|
</div>
|
||||||
|
</div>
|
17
docs/_includes/nav-left.html
Normal file
17
docs/_includes/nav-left.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{% assign navurl = page.url | remove: 'index.html' %}
|
||||||
|
<ul>
|
||||||
|
{% for item in include.nav %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ item.url }}">
|
||||||
|
{% if navurl contains item.url %}
|
||||||
|
<b>{{ item.text }}</b>
|
||||||
|
{% else %}
|
||||||
|
{{ item.text }}
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% if item.subitems and navurl contains item.url %}
|
||||||
|
{% include nav-left.html nav=item.subitems %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
|
@ -124,16 +124,24 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container" id="content">
|
<div class="container-wrapper">
|
||||||
{% if page.displayTitle %}
|
|
||||||
<h1 class="title">{{ page.displayTitle }}</h1>
|
|
||||||
{% else %}
|
|
||||||
<h1 class="title">{{ page.title }}</h1>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ content }}
|
{% if page.url contains "/ml" %}
|
||||||
|
{% include nav-left-wrapper-ml.html nav-mllib=site.data.menu-mllib nav-ml=site.data.menu-ml %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div> <!-- /container -->
|
|
||||||
|
<div class="container" id="content">
|
||||||
|
{% if page.displayTitle %}
|
||||||
|
<h1 class="title">{{ page.displayTitle }}</h1>
|
||||||
|
{% else %}
|
||||||
|
<h1 class="title">{{ page.title }}</h1>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ content }}
|
||||||
|
|
||||||
|
</div> <!-- /container -->
|
||||||
|
</div>
|
||||||
|
|
||||||
<script src="js/vendor/jquery-1.8.0.min.js"></script>
|
<script src="js/vendor/jquery-1.8.0.min.js"></script>
|
||||||
<script src="js/vendor/bootstrap.min.js"></script>
|
<script src="js/vendor/bootstrap.min.js"></script>
|
||||||
|
|
|
@ -39,8 +39,18 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body .container-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
body #content {
|
body #content {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
line-height: 1.6; /* Inspired by Github's wiki style */
|
line-height: 1.6; /* Inspired by Github's wiki style */
|
||||||
|
background-color: white;
|
||||||
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
@ -155,3 +165,30 @@ ul.nav li.dropdown ul.dropdown-menu li.dropdown-submenu ul.dropdown-menu {
|
||||||
* AnchorJS (anchor links when hovering over headers)
|
* AnchorJS (anchor links when hovering over headers)
|
||||||
*/
|
*/
|
||||||
a.anchorjs-link:hover { text-decoration: none; }
|
a.anchorjs-link:hover { text-decoration: none; }
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The left navigation bar.
|
||||||
|
*/
|
||||||
|
.left-menu-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
width: 256px;
|
||||||
|
margin-top: -20px;
|
||||||
|
padding-top: 20px;
|
||||||
|
background-color: #F0F8FC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-menu {
|
||||||
|
position: fixed;
|
||||||
|
max-width: 350px;
|
||||||
|
|
||||||
|
padding-right: 10px;
|
||||||
|
width: 256px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-menu h3 {
|
||||||
|
margin-left: 10px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
Loading…
Reference in a new issue