Add a cache to documentation check job (#3882)

* A first attempt at overhauling the documentation job with a cache.

* Actually remove files we don't need anymore.

* Fix output from local link checks to give it all at once.

* Add sparse matrices to the set of detected matrix types.

* Fix comparison condition.

* Make a pass to try and re-validate cached links that have not yet expired.

* Compile and link separately so that ccache can take effect.

* Be a little bit smarter about caching.

* Ensure libicu$SO is installed so 'stringi' can be used

Also collapse to remotes calls into one

* Fix style issues that cpplint 2 found (#3884)

* Try to workaround the libicu issue for now.

* Mention new dependency.

---------

Co-authored-by: Dirk Eddelbuettel <edd@debian.org>
This commit is contained in:
Ryan Curtin
2025-02-04 08:04:42 -05:00
committed by GitHub
co-authored by Dirk Eddelbuettel
parent d45a955a3c
commit 9fd815144d
25 changed files with 401 additions and 78 deletions
+12 -4
View File
@@ -50,7 +50,7 @@ jobs:
# this is the default but 'sccache' can be selected here
variant: ccache
- name: Prepare R for Ccache
- name: Prepare R for Ccache
run: |
mkdir -p ~/.R
cp -vax .github/etc/R_Makevars_${{ runner.os }} ~/.R/Makevars
@@ -58,7 +58,7 @@ jobs:
- name: Configure Ccache for R
run: |
ccache --set-config "sloppiness=include_file_ctime"
ccache --set-config "hash_dir=false"
ccache --set-config "hash_dir=false"
ccache --show-config
ccache --zero-stats
@@ -98,10 +98,18 @@ jobs:
- name: Install R-bindings dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("roxygen2")
remotes::install_cran("pkgbuild")
remotes::install_cran(c("roxygen2","pkgbuild"))
shell: Rscript {0}
# This appears to be needed to work around this issue:
# https://github.com/gagolews/stringi/issues/486
- name: "Work around stringi libicu issue"
if: inputs.lang == 'R' && runner.os == 'Linux'
shell: bash
run: |
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu70_70.1-2_amd64.deb
sudo dpkg -i libicu70_70.1-2_amd64.deb
- name: CMake
run: |
mkdir build
+1 -1
View File
@@ -49,7 +49,7 @@ project. A student should ideally be familiar with
mlpack codebase. Some examples of patterns that are often used inside of
mlpack are SFINAE ([example in mlpack, see std::enable_if usages](https://github.com/mlpack/mlpack/blob/565cfd3aad22deec0656b86e801052593a937723/src/mlpack/methods/mean_shift/mean_shift.hpp)),
[policy-based design](https://www.drdobbs.com/policy-based-design-in-the-real-world/184401861),
and [compile-time class traits](https://accu.org/index.php/journals/442).
and [compile-time class traits](https://accu.org/xaraya/journals/442.html).
Here are some [other useful resources](https://en.wikipedia.org/wiki/Template_metaprogramming)
for learning template metaprogramming, and some useful
[reference books](https://www.aristeia.com/books.html).
+1 -1
View File
@@ -174,7 +174,7 @@ these two examples have only shown a little bit of the functionality of mlpack.
Lots of other commands are available with different functionality. A full list
of commands and full documentation for each can be found on the following page:
- [CLI program documentation](https://www.mlpack.org/doc/stable/cli_documentation.html)
- [CLI program documentation](https://www.mlpack.org/doc/user/bindings/cli.html)
Also, mlpack is much more flexible from C++ and allows much greater
functionality. So, more complicated tasks are possible if you are willing to
+7 -7
View File
@@ -1300,7 +1300,7 @@ $ mlpack_kde --reference_file ref_data.csv --query_file qu_data.csv
- [mlpack_knn](#knn)
- [Kernel density estimation on Wikipedia](https://en.wikipedia.org/wiki/Kernel_density_estimation)
- [Tree-Independent Dual-Tree Algorithms](https://arxiv.org/pdf/1304.4327)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](http://papers.nips.cc/paper/3539-fast-high-dimensional-kernel-summations-using-the-monte-carlo-multipole-method.pdf)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](https://proceedings.neurips.cc/paper_files/paper/2008/file/39059724f73a9969845dfe4146c5660e-Paper.pdf)
- [KDE C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/kde/kde.hpp)
## mlpack_kernel_pca
@@ -1766,7 +1766,7 @@ $ mlpack_lmnn --input_file letter_recognition.csv --k 5 --update_interval 10
- [mlpack_nca](#nca)
- [Large margin nearest neighbor on Wikipedia](https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](http://papers.nips.cc/paper/2795-distance-metric-learning-for-large-margin-nearest-neighbor-classification.pdf)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](https://proceedings.neurips.cc/paper_files/paper/2005/file/a7f592cef8b130a6967a90617db5681b-Paper.pdf)
- [LMNN C++ class documentation](../../user/methods/lmnn.md)
## mlpack_local_coordinate_coding
@@ -1848,7 +1848,7 @@ $ mlpack_local_coordinate_coding --input_model_file lcc_model.bin --test_file
### See also
- [mlpack_sparse_coding](#sparse_coding)
- [Nonlinear learning using local coordinate coding (pdf)](https://papers.nips.cc/paper/3875-nonlinear-learning-using-local-coordinate-coding.pdf)
- [Nonlinear learning using local coordinate coding (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/2afe4567e1bf64d32a5527244d104cea-Paper.pdf)
- [LocalCoordinateCoding C++ class documentation](../../user/methods/local_coordinate_coding.md)
## mlpack_logistic_regression
@@ -2238,7 +2238,7 @@ By default, the SGD optimizer is used.
- [mlpack_lmnn](#lmnn)
- [Neighbourhood components analysis on Wikipedia](https://en.wikipedia.org/wiki/Neighbourhood_components_analysis)
- [Neighbourhood components analysis (pdf)](http://papers.nips.cc/paper/2566-neighbourhood-components-analysis.pdf)
- [Neighbourhood components analysis (pdf)](https://proceedings.neurips.cc/paper_files/paper/2004/file/42fe880812925e520249e808937738d2-Paper.pdf)
- [NCA C++ class documentation](../../user/methods/nca.md)
## mlpack_knn
@@ -2464,7 +2464,7 @@ $ mlpack_nmf --input_file V.csv --w_file W.csv --h_file H.csv --rank 10
- [mlpack_cf](#cf)
- [Non-negative matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Non-negative_matrix_factorization)
- [Algorithms for non-negative matrix factorization (pdf)](http://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-factorization.pdf)
- [Algorithms for non-negative matrix factorization (pdf)](https://proceedings.neurips.cc/paper_files/paper/2000/file/f9d1152547c0bde01830b7e8bd60024c-Paper.pdf)
- [NMF C++ class documentation](../../user/methods/nmf.md)
- [AMF C++ class documentation](../../user/methods/amf.md)
@@ -3181,7 +3181,7 @@ The output matrices are organized such that row i and column j in the neighbors
- [mlpack_knn](#knn)
- [mlpack_lsh](#lsh)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://papers.nips.cc/paper/3864-rank-approximate-nearest-neighbor-search-retaining-meaning-and-speed-in-high-dimensions.pdf)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/ddb30680a691d157187ee1cf9e896d03-Paper.pdf)
- [RASearch C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/rann/ra_search.hpp)
## mlpack_softmax_regression
@@ -3347,7 +3347,7 @@ $ mlpack_sparse_coding --input_model_file model.bin --test_file otherdata.csv
- [mlpack_local_coordinate_coding](#local_coordinate_coding)
- [Sparse dictionary learning on Wikipedia](https://en.wikipedia.org/wiki/Sparse_dictionary_learning)
- [Efficient sparse coding algorithms (pdf)](http://papers.nips.cc/paper/2979-efficient-sparse-coding-algorithms.pdf)
- [Efficient sparse coding algorithms (pdf)](https://proceedings.neurips.cc/paper_files/paper/2006/file/2d71b2ae158c7c5912cc0bbde2bb9d95-Paper.pdf)
- [Regularization and variable selection via the elastic net](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=46217f372a75dddc2254fdbc6b9418ba3554e453)
- [SparseCoding C++ class documentation](../../user/methods/sparse_coding.md)
+1 -1
View File
@@ -9,6 +9,7 @@
<li><details><summary>Classification</summary>
<ul>
<li><a href="LINKROOTuser/bindings/cli.html#decision_tree">mlpack_decision_tree</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#hoeffding_tree">mlpack_hoeffding_tree</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#linear_svm">mlpack_linear_svm</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#logistic_regression">mlpack_logistic_regression</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#nbc">mlpack_nbc</a></li>
@@ -35,7 +36,6 @@
<li><a href="LINKROOTuser/bindings/cli.html#gmm_train">mlpack_gmm_train</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#gmm_generate">mlpack_gmm_generate</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#gmm_probability">mlpack_gmm_probability</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#hoeffding_tree">mlpack_hoeffding_tree</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#kmeans">mlpack_kmeans</a></li>
<li><a href="LINKROOTuser/bindings/cli.html#mean_shift">mlpack_mean_shift</a></li>
</ul>
+7 -7
View File
@@ -1591,7 +1591,7 @@ _, out_data := mlpack.Kde(param)
- [Knn()](#knn)
- [Kernel density estimation on Wikipedia](https://en.wikipedia.org/wiki/Kernel_density_estimation)
- [Tree-Independent Dual-Tree Algorithms](https://arxiv.org/pdf/1304.4327)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](http://papers.nips.cc/paper/3539-fast-high-dimensional-kernel-summations-using-the-monte-carlo-multipole-method.pdf)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](https://proceedings.neurips.cc/paper_files/paper/2008/file/39059724f73a9969845dfe4146c5660e-Paper.pdf)
- [KDE C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/kde/kde.hpp)
## KernelPca()
@@ -2172,7 +2172,7 @@ _, output, _ := mlpack.Lmnn(letter_recognition, param)
- [Nca()](#nca)
- [Large margin nearest neighbor on Wikipedia](https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](http://papers.nips.cc/paper/2795-distance-metric-learning-for-large-margin-nearest-neighbor-classification.pdf)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](https://proceedings.neurips.cc/paper_files/paper/2005/file/a7f592cef8b130a6967a90617db5681b-Paper.pdf)
- [LMNN C++ class documentation](../../user/methods/lmnn.md)
## LocalCoordinateCoding()
@@ -2276,7 +2276,7 @@ new_codes, _, _ := mlpack.LocalCoordinateCoding(param)
### See also
- [SparseCoding()](#sparse_coding)
- [Nonlinear learning using local coordinate coding (pdf)](https://papers.nips.cc/paper/3875-nonlinear-learning-using-local-coordinate-coding.pdf)
- [Nonlinear learning using local coordinate coding (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/2afe4567e1bf64d32a5527244d104cea-Paper.pdf)
- [LocalCoordinateCoding C++ class documentation](../../user/methods/local_coordinate_coding.md)
## LogisticRegression()
@@ -2757,7 +2757,7 @@ By default, the SGD optimizer is used.
- [Lmnn()](#lmnn)
- [Neighbourhood components analysis on Wikipedia](https://en.wikipedia.org/wiki/Neighbourhood_components_analysis)
- [Neighbourhood components analysis (pdf)](http://papers.nips.cc/paper/2566-neighbourhood-components-analysis.pdf)
- [Neighbourhood components analysis (pdf)](https://proceedings.neurips.cc/paper_files/paper/2004/file/42fe880812925e520249e808937738d2-Paper.pdf)
- [NCA C++ class documentation](../../user/methods/nca.md)
## Knn()
@@ -3035,7 +3035,7 @@ H, W := mlpack.Nmf(V, 10, param)
- [Cf()](#cf)
- [Non-negative matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Non-negative_matrix_factorization)
- [Algorithms for non-negative matrix factorization (pdf)](http://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-factorization.pdf)
- [Algorithms for non-negative matrix factorization (pdf)](https://proceedings.neurips.cc/paper_files/paper/2000/file/f9d1152547c0bde01830b7e8bd60024c-Paper.pdf)
- [NMF C++ class documentation](../../user/methods/nmf.md)
- [AMF C++ class documentation](../../user/methods/amf.md)
@@ -3942,7 +3942,7 @@ The output matrices are organized such that row i and column j in the neighbors
- [Knn()](#knn)
- [Lsh()](#lsh)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://papers.nips.cc/paper/3864-rank-approximate-nearest-neighbor-search-retaining-meaning-and-speed-in-high-dimensions.pdf)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/ddb30680a691d157187ee1cf9e896d03-Paper.pdf)
- [RASearch C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/rann/ra_search.hpp)
## SoftmaxRegression()
@@ -4151,7 +4151,7 @@ codes, _, _ := mlpack.SparseCoding(param)
- [LocalCoordinateCoding()](#local_coordinate_coding)
- [Sparse dictionary learning on Wikipedia](https://en.wikipedia.org/wiki/Sparse_dictionary_learning)
- [Efficient sparse coding algorithms (pdf)](http://papers.nips.cc/paper/2979-efficient-sparse-coding-algorithms.pdf)
- [Efficient sparse coding algorithms (pdf)](https://proceedings.neurips.cc/paper_files/paper/2006/file/2d71b2ae158c7c5912cc0bbde2bb9d95-Paper.pdf)
- [Regularization and variable selection via the elastic net](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=46217f372a75dddc2254fdbc6b9418ba3554e453)
- [SparseCoding C++ class documentation](../../user/methods/sparse_coding.md)
+1 -1
View File
@@ -9,6 +9,7 @@
<li><details><summary>Classification</summary>
<ul>
<li><a href="LINKROOTuser/bindings/go.html#decision_tree">DecisionTree()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#hoeffding_tree">HoeffdingTree()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#linear_svm">LinearSvm()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#logistic_regression">LogisticRegression()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#nbc">Nbc()</a></li>
@@ -35,7 +36,6 @@
<li><a href="LINKROOTuser/bindings/go.html#gmm_train">GmmTrain()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#gmm_generate">GmmGenerate()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#gmm_probability">GmmProbability()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#hoeffding_tree">HoeffdingTree()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#kmeans">Kmeans()</a></li>
<li><a href="LINKROOTuser/bindings/go.html#mean_shift">MeanShift()</a></li>
</ul>
+7 -7
View File
@@ -1308,7 +1308,7 @@ julia> _, out_data = kde(bandwidth=0.2, initial_sample_size=200,
- [knn()](#knn)
- [Kernel density estimation on Wikipedia](https://en.wikipedia.org/wiki/Kernel_density_estimation)
- [Tree-Independent Dual-Tree Algorithms](https://arxiv.org/pdf/1304.4327)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](http://papers.nips.cc/paper/3539-fast-high-dimensional-kernel-summations-using-the-monte-carlo-multipole-method.pdf)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](https://proceedings.neurips.cc/paper_files/paper/2008/file/39059724f73a9969845dfe4146c5660e-Paper.pdf)
- [KDE C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/kde/kde.hpp)
## kernel_pca()
@@ -1787,7 +1787,7 @@ julia> _, output, _ = lmnn(letter_recognition; k=5,
- [nca()](#nca)
- [Large margin nearest neighbor on Wikipedia](https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](http://papers.nips.cc/paper/2795-distance-metric-learning-for-large-margin-nearest-neighbor-classification.pdf)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](https://proceedings.neurips.cc/paper_files/paper/2005/file/a7f592cef8b130a6967a90617db5681b-Paper.pdf)
- [LMNN C++ class documentation](../../user/methods/lmnn.md)
## local_coordinate_coding()
@@ -1870,7 +1870,7 @@ julia> new_codes, _, _ =
### See also
- [sparse_coding()](#sparse_coding)
- [Nonlinear learning using local coordinate coding (pdf)](https://papers.nips.cc/paper/3875-nonlinear-learning-using-local-coordinate-coding.pdf)
- [Nonlinear learning using local coordinate coding (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/2afe4567e1bf64d32a5527244d104cea-Paper.pdf)
- [LocalCoordinateCoding C++ class documentation](../../user/methods/local_coordinate_coding.md)
## logistic_regression()
@@ -2259,7 +2259,7 @@ By default, the SGD optimizer is used.
- [lmnn()](#lmnn)
- [Neighbourhood components analysis on Wikipedia](https://en.wikipedia.org/wiki/Neighbourhood_components_analysis)
- [Neighbourhood components analysis (pdf)](http://papers.nips.cc/paper/2566-neighbourhood-components-analysis.pdf)
- [Neighbourhood components analysis (pdf)](https://proceedings.neurips.cc/paper_files/paper/2004/file/42fe880812925e520249e808937738d2-Paper.pdf)
- [NCA C++ class documentation](../../user/methods/nca.md)
## knn()
@@ -2481,7 +2481,7 @@ julia> H, W = nmf(V, 10; update_rules="multdist")
- [cf()](#cf)
- [Non-negative matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Non-negative_matrix_factorization)
- [Algorithms for non-negative matrix factorization (pdf)](http://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-factorization.pdf)
- [Algorithms for non-negative matrix factorization (pdf)](https://proceedings.neurips.cc/paper_files/paper/2000/file/f9d1152547c0bde01830b7e8bd60024c-Paper.pdf)
- [NMF C++ class documentation](../../user/methods/nmf.md)
- [AMF C++ class documentation](../../user/methods/amf.md)
@@ -3214,7 +3214,7 @@ The output matrices are organized such that row i and column j in the neighbors
- [knn()](#knn)
- [lsh()](#lsh)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://papers.nips.cc/paper/3864-rank-approximate-nearest-neighbor-search-retaining-meaning-and-speed-in-high-dimensions.pdf)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/ddb30680a691d157187ee1cf9e896d03-Paper.pdf)
- [RASearch C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/rann/ra_search.hpp)
## softmax_regression()
@@ -3384,7 +3384,7 @@ julia> codes, _, _ = sparse_coding(input_model=model,
- [local_coordinate_coding()](#local_coordinate_coding)
- [Sparse dictionary learning on Wikipedia](https://en.wikipedia.org/wiki/Sparse_dictionary_learning)
- [Efficient sparse coding algorithms (pdf)](http://papers.nips.cc/paper/2979-efficient-sparse-coding-algorithms.pdf)
- [Efficient sparse coding algorithms (pdf)](https://proceedings.neurips.cc/paper_files/paper/2006/file/2d71b2ae158c7c5912cc0bbde2bb9d95-Paper.pdf)
- [Regularization and variable selection via the elastic net](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=46217f372a75dddc2254fdbc6b9418ba3554e453)
- [SparseCoding C++ class documentation](../../user/methods/sparse_coding.md)
+1 -1
View File
@@ -9,6 +9,7 @@
<li><details><summary>Classification</summary>
<ul>
<li><a href="LINKROOTuser/bindings/julia.html#decision_tree">decision_tree()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#hoeffding_tree">hoeffding_tree()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#linear_svm">linear_svm()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#logistic_regression">logistic_regression()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#nbc">nbc()</a></li>
@@ -35,7 +36,6 @@
<li><a href="LINKROOTuser/bindings/julia.html#gmm_train">gmm_train()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#gmm_generate">gmm_generate()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#gmm_probability">gmm_probability()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#hoeffding_tree">hoeffding_tree()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#kmeans">kmeans()</a></li>
<li><a href="LINKROOTuser/bindings/julia.html#mean_shift">mean_shift()</a></li>
</ul>
+7 -7
View File
@@ -1327,7 +1327,7 @@ In addition to the last program call, it is also possible to activate Monte Carl
- [knn()](#knn)
- [Kernel density estimation on Wikipedia](https://en.wikipedia.org/wiki/Kernel_density_estimation)
- [Tree-Independent Dual-Tree Algorithms](https://arxiv.org/pdf/1304.4327)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](http://papers.nips.cc/paper/3539-fast-high-dimensional-kernel-summations-using-the-monte-carlo-multipole-method.pdf)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](https://proceedings.neurips.cc/paper_files/paper/2008/file/39059724f73a9969845dfe4146c5660e-Paper.pdf)
- [KDE C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/kde/kde.hpp)
## kernel_pca()
@@ -1805,7 +1805,7 @@ Another program call making use of update interval & regularization parameter wi
- [nca()](#nca)
- [Large margin nearest neighbor on Wikipedia](https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](http://papers.nips.cc/paper/2795-distance-metric-learning-for-large-margin-nearest-neighbor-classification.pdf)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](https://proceedings.neurips.cc/paper_files/paper/2005/file/a7f592cef8b130a6967a90617db5681b-Paper.pdf)
- [LMNN C++ class documentation](../../user/methods/lmnn.md)
## local_coordinate_coding()
@@ -1890,7 +1890,7 @@ An LCC model may be saved using the `output_model` output parameter. Then, to e
### See also
- [sparse_coding()](#sparse_coding)
- [Nonlinear learning using local coordinate coding (pdf)](https://papers.nips.cc/paper/3875-nonlinear-learning-using-local-coordinate-coding.pdf)
- [Nonlinear learning using local coordinate coding (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/2afe4567e1bf64d32a5527244d104cea-Paper.pdf)
- [LocalCoordinateCoding C++ class documentation](../../user/methods/local_coordinate_coding.md)
## logistic_regression()
@@ -2290,7 +2290,7 @@ By default, the SGD optimizer is used.
- [lmnn()](#lmnn)
- [Neighbourhood components analysis on Wikipedia](https://en.wikipedia.org/wiki/Neighbourhood_components_analysis)
- [Neighbourhood components analysis (pdf)](http://papers.nips.cc/paper/2566-neighbourhood-components-analysis.pdf)
- [Neighbourhood components analysis (pdf)](https://proceedings.neurips.cc/paper_files/paper/2004/file/42fe880812925e520249e808937738d2-Paper.pdf)
- [NCA C++ class documentation](../../user/methods/nca.md)
## knn()
@@ -2523,7 +2523,7 @@ For example, to run NMF on the input matrix `'V'` using the 'multdist' update ru
- [cf()](#cf)
- [Non-negative matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Non-negative_matrix_factorization)
- [Algorithms for non-negative matrix factorization (pdf)](http://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-factorization.pdf)
- [Algorithms for non-negative matrix factorization (pdf)](https://proceedings.neurips.cc/paper_files/paper/2000/file/f9d1152547c0bde01830b7e8bd60024c-Paper.pdf)
- [NMF C++ class documentation](../../user/methods/nmf.md)
- [AMF C++ class documentation](../../user/methods/amf.md)
@@ -3264,7 +3264,7 @@ The output matrices are organized such that row i and column j in the neighbors
- [knn()](#knn)
- [lsh()](#lsh)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://papers.nips.cc/paper/3864-rank-approximate-nearest-neighbor-search-retaining-meaning-and-speed-in-high-dimensions.pdf)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/ddb30680a691d157187ee1cf9e896d03-Paper.pdf)
- [RASearch C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/rann/ra_search.hpp)
## softmax_regression()
@@ -3435,7 +3435,7 @@ Then, this model could be used to encode a new matrix, `'otherdata'`, and save t
- [local_coordinate_coding()](#local_coordinate_coding)
- [Sparse dictionary learning on Wikipedia](https://en.wikipedia.org/wiki/Sparse_dictionary_learning)
- [Efficient sparse coding algorithms (pdf)](http://papers.nips.cc/paper/2979-efficient-sparse-coding-algorithms.pdf)
- [Efficient sparse coding algorithms (pdf)](https://proceedings.neurips.cc/paper_files/paper/2006/file/2d71b2ae158c7c5912cc0bbde2bb9d95-Paper.pdf)
- [Regularization and variable selection via the elastic net](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=46217f372a75dddc2254fdbc6b9418ba3554e453)
- [SparseCoding C++ class documentation](../../user/methods/sparse_coding.md)
+1 -1
View File
@@ -9,6 +9,7 @@
<li><details><summary>Classification</summary>
<ul>
<li><a href="LINKROOTuser/bindings/python.html#decision_tree">decision_tree()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#hoeffding_tree">hoeffding_tree()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#linear_svm">linear_svm()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#logistic_regression">logistic_regression()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#nbc">nbc()</a></li>
@@ -35,7 +36,6 @@
<li><a href="LINKROOTuser/bindings/python.html#gmm_train">gmm_train()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#gmm_generate">gmm_generate()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#gmm_probability">gmm_probability()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#hoeffding_tree">hoeffding_tree()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#kmeans">kmeans()</a></li>
<li><a href="LINKROOTuser/bindings/python.html#mean_shift">mean_shift()</a></li>
</ul>
+7 -7
View File
@@ -1307,7 +1307,7 @@ R> out_data <- output$predictions
- [knn()](#knn)
- [Kernel density estimation on Wikipedia](https://en.wikipedia.org/wiki/Kernel_density_estimation)
- [Tree-Independent Dual-Tree Algorithms](https://arxiv.org/pdf/1304.4327)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](http://papers.nips.cc/paper/3539-fast-high-dimensional-kernel-summations-using-the-monte-carlo-multipole-method.pdf)
- [Fast High-dimensional Kernel Summations Using the Monte Carlo Multipole Method](https://proceedings.neurips.cc/paper_files/paper/2008/file/39059724f73a9969845dfe4146c5660e-Paper.pdf)
- [KDE C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/kde/kde.hpp)
## kernel_pca()
@@ -1779,7 +1779,7 @@ R> output <- output$output
- [nca()](#nca)
- [Large margin nearest neighbor on Wikipedia](https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](http://papers.nips.cc/paper/2795-distance-metric-learning-for-large-margin-nearest-neighbor-classification.pdf)
- [Distance metric learning for large margin nearest neighbor classification (pdf)](https://proceedings.neurips.cc/paper_files/paper/2005/file/a7f592cef8b130a6967a90617db5681b-Paper.pdf)
- [LMNN C++ class documentation](../../user/methods/lmnn.md)
## local_coordinate_coding()
@@ -1863,7 +1863,7 @@ R> new_codes <- output$codes
### See also
- [sparse_coding()](#sparse_coding)
- [Nonlinear learning using local coordinate coding (pdf)](https://papers.nips.cc/paper/3875-nonlinear-learning-using-local-coordinate-coding.pdf)
- [Nonlinear learning using local coordinate coding (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/2afe4567e1bf64d32a5527244d104cea-Paper.pdf)
- [LocalCoordinateCoding C++ class documentation](../../user/methods/local_coordinate_coding.md)
## logistic_regression()
@@ -2258,7 +2258,7 @@ By default, the SGD optimizer is used.
- [lmnn()](#lmnn)
- [Neighbourhood components analysis on Wikipedia](https://en.wikipedia.org/wiki/Neighbourhood_components_analysis)
- [Neighbourhood components analysis (pdf)](http://papers.nips.cc/paper/2566-neighbourhood-components-analysis.pdf)
- [Neighbourhood components analysis (pdf)](https://proceedings.neurips.cc/paper_files/paper/2004/file/42fe880812925e520249e808937738d2-Paper.pdf)
- [NCA C++ class documentation](../../user/methods/nca.md)
## knn()
@@ -2489,7 +2489,7 @@ R> H <- output$h
- [cf()](#cf)
- [Non-negative matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Non-negative_matrix_factorization)
- [Algorithms for non-negative matrix factorization (pdf)](http://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-factorization.pdf)
- [Algorithms for non-negative matrix factorization (pdf)](https://proceedings.neurips.cc/paper_files/paper/2000/file/f9d1152547c0bde01830b7e8bd60024c-Paper.pdf)
- [NMF C++ class documentation](../../user/methods/nmf.md)
- [AMF C++ class documentation](../../user/methods/amf.md)
@@ -3218,7 +3218,7 @@ The output matrices are organized such that row i and column j in the neighbors
- [knn()](#knn)
- [lsh()](#lsh)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://papers.nips.cc/paper/3864-rank-approximate-nearest-neighbor-search-retaining-meaning-and-speed-in-high-dimensions.pdf)
- [Rank-approximate nearest neighbor search: Retaining meaning and speed in high dimensions (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/ddb30680a691d157187ee1cf9e896d03-Paper.pdf)
- [RASearch C++ class documentation](https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/rann/ra_search.hpp)
## softmax_regression()
@@ -3385,7 +3385,7 @@ R> codes <- output$codes
- [local_coordinate_coding()](#local_coordinate_coding)
- [Sparse dictionary learning on Wikipedia](https://en.wikipedia.org/wiki/Sparse_dictionary_learning)
- [Efficient sparse coding algorithms (pdf)](http://papers.nips.cc/paper/2979-efficient-sparse-coding-algorithms.pdf)
- [Efficient sparse coding algorithms (pdf)](https://proceedings.neurips.cc/paper_files/paper/2006/file/2d71b2ae158c7c5912cc0bbde2bb9d95-Paper.pdf)
- [Regularization and variable selection via the elastic net](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=46217f372a75dddc2254fdbc6b9418ba3554e453)
- [SparseCoding C++ class documentation](../../user/methods/sparse_coding.md)
+1 -1
View File
@@ -9,6 +9,7 @@
<li><details><summary>Classification</summary>
<ul>
<li><a href="LINKROOTuser/bindings/r.html#decision_tree">decision_tree()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#hoeffding_tree">hoeffding_tree()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#linear_svm">linear_svm()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#logistic_regression">logistic_regression()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#nbc">nbc()</a></li>
@@ -35,7 +36,6 @@
<li><a href="LINKROOTuser/bindings/r.html#gmm_train">gmm_train()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#gmm_generate">gmm_generate()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#gmm_probability">gmm_probability()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#hoeffding_tree">hoeffding_tree()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#kmeans">kmeans()</a></li>
<li><a href="LINKROOTuser/bindings/r.html#mean_shift">mean_shift()</a></li>
</ul>
+2 -1
View File
@@ -9,7 +9,8 @@ This will convert all the Markdown documentation in `doc/` into HTML in
process but also can be run manually.
The `kramdown` parser with the `parser-gfm` and `rouge` extensions installed is
necessary, as are the `tidy` and `checklink` HTML checking packages.
necessary, as are the `tidy`, `checklink`, and `linkchecker` HTML checking
packages.
```sh
scripts/build-docs.sh
+306 -11
View File
@@ -1,13 +1,21 @@
#!/usr/bin/env bash
#
# Convert all the Markdown files in doc/ to HTML.
# This requires `kramdown` to be available on the path.
# `tidy` and `checklink` (from Debian's w3c-linkchecker package) are used to
# test the output and must also be available and on the path.
#
# This requires `kramdown` to be available on the path. `tidy` and
# `linkchecker` (the Python package) and `checklink` (from w3c-linkchecker on
# Debian) are used to test the output and must also be available and on the
# path. `sqlite3` must also be available.
#
# Run this from the root directory of the repository.
#
# The output directory can be specified as the first option.
#
# If the environment variable DISABLE_HTML_CHECKS is specified, then checks are
# skipped.
#
# If the environment variable LINK_CACHE_FILE is specified, then that file is
# used as a cache of already-valid links that will not be checked.
if [ "$#" -gt 1 ]; then
echo "Usage: $0 [output_dir/]";
@@ -34,13 +42,25 @@ if [ -z ${DISABLE_HTML_CHECKS+x} ];
then
if ! command -v tidy &>/dev/null
then
echo "tidy not installed! Cannot build documentation.";
echo "tidy not installed! Cannot check documentation.";
exit 1;
fi
if ! command -v checklink &>/dev/null
then
echo "checklink not installed! Cannot build documentation.";
echo "checklink not installed! Cannot check documentation.";
exit 1;
fi
if ! command -v linkchecker &>/dev/null
then
echo "linkchecker not installed! Cannot check documentation.";
exit 1;
fi
if ! command -v sqlite3 &> /dev/null
then
echo "sqlite3 not installed! Cannot check documentation.";
exit 1;
fi
fi
@@ -424,12 +444,12 @@ do
fi
done
# Now take a second pass to check all the links, if we need to.
# Now take a second pass to check all local links.
if [ -z ${DISABLE_HTML_CHECKS+x} ];
then
find "$output_dir" -iname '*.html' -print0 | while read -d $'\0' f
do
echo "Checking links in $f...";
echo "Checking local links and anchors in $f...";
# To run checklink we have to strip out some perl stderr warnings...
checklink -qs \
@@ -438,19 +458,292 @@ then
--suppress-broken 503 \
--suppress-broken 301 \
--suppress-broken 400 \
-X "https://eigen.tuxfamily.org/index.php\?title=Main_Page" \
-X "https://mlpack.slack.com/" "$f" 2>&1 |
-X "^http.*$" "$f" 2>&1 |
grep -v 'Use of uninitialized value' > checklink_out;
if [ -s checklink_out ];
then
cat checklink_out;
exit 1;
# Store up all failures to print them at once.
cat checklink_out >> overall_checklink_out;
fi
rm -f checklink_out;
done
# Check to see if there were any failures, all at once.
if [ -f overall_checklink_out ];
then
cat overall_checklink_out;
rm -f overall_checklink_out;
exit 1;
fi
# Check to see if there were any failures, all at once.
fi
# Utility script to create linkchecker result SQL table, with a bit of extra
# information.
cat > create.sql << EOF
create table linksdb (
urlname varchar(256) not null,
parentname varchar(256),
baseref varchar(256),
valid int,
result varchar(256),
warning varchar(512),
info varchar(512),
url varchar(256),
line int,
col int,
name varchar(256),
checktime int,
dltime int,
size int,
cached int,
level int not null,
modified int,
resulttime timestamp,
validdays int
);
EOF
# Finally, take a third pass to check external links.
if [ -z ${DISABLE_HTML_CHECKS+x} ];
then
# Create a basic config file for linkchecker. We will append domains to ignore
# to this as we go.
echo "[checking]" > "$output_dir/linkcheckerrc.in";
echo "maxrequestspersecond=2" >> "$output_dir/linkcheckerrc.in";
echo "" >> "$output_dir/linkcheckerrc.in";
echo "[filtering]" >> "$output_dir/linkcheckerrc.in";
echo "ignore=" >> "$output_dir/linkcheckerrc.in";
echo " ^(?!http).*$" >> "$output_dir/linkcheckerrc.in";
# Github issues/pull requests redirect to each other and we link to so many of
# them it's not worth checking them.
echo " ^https://github.com/mlpack/mlpack/issues/[0-9]*$" >> "$output_dir/linkcheckerrc.in";
echo " ^https://github.com/mlpack/mlpack/issues[?]q.*$" >> "$output_dir/linkcheckerrc.in";
echo " ^https://github.com/mlpack/mlpack/pulls[?]q.*$" >> "$output_dir/linkcheckerrc.in";
# Initialize our cache or take the current version of it.
if [ ! -z ${LINK_CACHE_FILE+x} ];
then
if [ -f ${LINK_CACHE_FILE} ];
then
cp "$LINK_CACHE_FILE" "$output_dir/all_links.db";
else
rm -f "$output_dir/all_links.db";
cat create.sql | sqlite3 "$output_dir/all_links.db";
fi
else
rm -f "$output_dir/all_links.db";
cat create.sql | sqlite3 "$output_dir/all_links.db";
fi
find "$output_dir" -iname '*.html' -print0 | while read -d $'\0' f
do
echo "Checking external links in $f...";
# Generate our config file for this file by appending all valid files that
# we have already seen. Note that we have to append $ to all the ignore
# patterns so that we don't accidentally match anchors that haven't been
# checked yet.
cp "$output_dir/linkcheckerrc.in" "$output_dir/linkcheckerrc";
echo "SELECT DISTINCT urlname FROM linksdb
WHERE valid = 1 AND
urlname LIKE 'http%' AND
julianday(datetime()) - julianday(resulttime) < validdays AND
(result LIKE '200%' OR
result = 'filtered' OR
result = 'syntax OK');" | sqlite3 "$output_dir/all_links.db" |\
sed 's/^/ /' |\
sed 's/?/\\?/g' |\
sed 's/$/$/' >> "$output_dir/linkcheckerrc";
# Run linkchecker, and make things a little bit prettier if there are
# failures.
rm -f links.sql;
linkchecker --check-extern \
--recursion-level=1 \
--threads=4 \
--verbose \
--no-status \
--output=failures \
--file-output=sql/ascii/links.sql \
--config="$output_dir/linkcheckerrc" \
$f |\
awk -F"', '" '{ print $2; }' |\
sed 's/'"'"')"$//' |\
sed 's/^/Failed: /' |\
sed 's/$/; will try again at the end of the run./';
# Print the number of links we checked and the number we filtered.
total_links=`cat links.sql | grep -v '^--' | grep 'http' | wc -l`;
filtered_links=`grep 'filtered' links.sql | grep -v '^--' | grep 'http' |\
wc -l`;
echo " $filtered_links of $total_links external links were cached.";
# Insert results into the database. We have to insert the timestamp and the
# number of days the result is valid for. For that, we use a random number
# of days, because we don't want *all* of our results to expire on the same
# CI run and have it take forever.
cat links.sql |\
sed 's/modified) values (/modified,resulttime,validdays) values (/' |\
sed "s/);$/, current_timestamp, random() % 10 + 25);/" |\
sqlite3 "$output_dir/all_links.db";
# Print any warnings too, because we will try them again later.
cat create.sql | sqlite3 tmp.db;
cat links.sql |\
sed 's/modified) values (/modified,resulttime,validdays) values (/' |\
sed "s/);$/, current_timestamp, random() % 10 + 25);/" |\
sqlite3 tmp.db;
echo "SELECT DISTINCT urlname, warning FROM linksdb
WHERE valid = 1 AND
warning IS NOT NULL AND
(result NOT LIKE '200%' AND
warning NOT LIKE '%307 Temporary Redirect%' AND
result <> 'filtered' AND
result <> 'syntax OK');" |\
sqlite3 tmp.db |\
awk -F'|' '{ print "Warning: "$1": "$2"; will try again at the end of the run."; }';
rm -f tmp.db;
done
# Second chance on errors and warnings: filter out any spurious failures.
echo "SELECT DISTINCT urlname FROM linksdb
WHERE valid = 0 OR
(warning IS NOT NULL AND
warning NOT LIKE '%307 Temporary Redirect%') OR
(result NOT LIKE '200%' AND
result <> 'filtered' AND
result <> 'syntax OK');" | sqlite3 "$output_dir/all_links.db" >\
links_to_check.txt;
num_links=`cat links_to_check.txt | wc -l`;
if [ $num_links -gt 0 ];
then
echo "Second check for the following URLs that failed the first time:";
cat links_to_check.txt | sed 's/^/ /';
# Slow down the process to try and fix any links that got rate limited.
cat "$output_dir/linkcheckerrc.in" |\
sed 's/maxrequestspersecond=.*$/maxrequestspersecond=1/' >\
"$output_dir/linkcheckerrc";
linkchecker --check-extern \
--recursion-level=0 \
--threads=1 \
--file-output=sql/ascii/links_failed.sql \
--no-status \
--verbose \
--config="$output_dir/linkcheckerrc" \
`cat links_to_check.txt | tr '\n' ' '`;
cat create.sql | sqlite3 tmp.db;
cat links_failed.sql |\
sed 's/modified) values (/modified,resulttime,validdays) values (/' |\
sed "s/);$/, current_timestamp, random() % 10 + 25);/" |\
sqlite3 tmp.db;
echo "SELECT DISTINCT urlname, result FROM linksdb
WHERE valid = 0" | sqlite3 tmp.db |\
awk -F'|' '{ print " "$1": "$2; }' > links_failed.txt;
echo "SELECT DISTINCT urlname, warning FROM linksdb
WHERE valid = 1 AND warning IS NOT NULL" | sqlite3 tmp.db |\
awk -F'|' '{ print " "$1": "$2; }' > links_warned.txt;
# Also add the second pass results to the global cache.
cat links_failed.sql |\
sed 's/modified) values (/modified,resulttime,validdays) values (/' |\
sed "s/);$/, current_timestamp, random() % 10 + 25);/" |\
sqlite3 "$output_dir/all_links.db";
total_links_failed=`cat links_failed.txt links_warned.txt | wc -l`;
if [ $total_links_failed -gt 0 ];
then
echo "The following links have failed:";
cat links_failed.txt links_warned.txt;
rm -f links_failed.sql tmp.db links_failed.txt links_warned.txt;
exitcode=1;
else
exitcode=0;
fi
rm -f tmp.db links_failed.sql;
else
exitcode=0;
fi
rm -f links_to_check.txt;
# Add to the global cache.
if [ ! -z ${LINK_CACHE_FILE+x} ];
then
mv "$output_dir/all_links.db" "${LINK_CACHE_FILE}";
echo "DELETE FROM linksdb
WHERE valid = 0 OR
warning IS NOT NULL OR
julianday(datetime()) - julianday(resulttime) >= validdays;" |\
sqlite3 "${LINK_CACHE_FILE}";
# Keep only the most recent entry for a given urlname, to keep the size of
# the cache as small as possible.
echo "CREATE TABLE tmp_linksdb AS SELECT * FROM linksdb
GROUP BY urlname HAVING MAX(resulttime) ORDER BY urlname;" |\
sqlite3 "${LINK_CACHE_FILE}";
echo "DROP TABLE linksdb;" | sqlite3 "${LINK_CACHE_FILE}";
echo "ALTER TABLE tmp_linksdb RENAME TO linksdb;" | sqlite3 "${LINK_CACHE_FILE}";
fi
# Pick all the links that are within a week of timing out and run them again,
# to see if we can "refresh" them. This is intended to handle situations
# where flaky URLs may not always work, but they will be tried a handful of
# times over the week before their last run expires. The hope is that one of
# those runs in the last week before they expire will succeed, preventing a
# documentation job from failing due to a bad link.
echo "SELECT DISTINCT urlname FROM linksdb
WHERE valid = 1 AND
urlname LIKE 'http%' AND
validdays -
(julianday(datetime()) - julianday(resulttime)) <= 7 AND
(result LIKE '200%' OR
result = 'filtered' OR
result = 'syntax OK');" |\
sqlite3 "$output_dir/all_links.db" > links_to_check.txt;
num_links=`cat links_to_check.txt | wc -l`;
if [ $num_links -gt 0 ];
then
echo "Checking $num_links links before their cache entry expires...";
linkchecker --check-extern \
--recursion-level=0 \
--threads=1 \
--file-output=sql/ascii/links_output.sql \
--output=failures \
--no-status \
--verbose \
--config="$output_dir/linkcheckerrc" \
`cat links_to_check.txt | tr '\n' ' '` |\
awk -F"', '" '{ print $2; }' |\
sed 's/'"'"')"$//' |\
sed 's/^/Warning: /' |\
sed 's/$/ failed, but cache entry not yet expired./';
cat links_output.sql |\
sed 's/modified) values (/modified,resulttime,validdays) values (/' |\
sed "s/);$/, current_timestamp, random() % 10 + 25);/" |\
sqlite3 "$output_dir/all_links.db";
# Filter out any bad links.
echo "DELETE FROM all_links WHERE valid = 0;" |\
sqlite3 "$output_dir/all_links.db";
fi
# Clean up unnecessary files.
rm -f "$output_dir/link_errors.csv" "$output_dir/all_links.csv" \
"$output_dir/linkcheckerrc.in" "$output_dir/linkcheckerrc";
rm -f links.csv links_failed.csv;
else
exitcode=0;
fi
# Remove temporary files.
rm -f create.sql;
if [ "a$del_header" == "a1" ];
then
rm -f "$template_html_header";
@@ -460,3 +753,5 @@ if [ "a$del_footer" == "a1" ];
then
rm -f "$template_html_footer";
fi
exit $exitcode;
+22 -4
View File
@@ -190,9 +190,10 @@ compile_code_blocks()
for f in $input_dir/*.cpp;
do
echo " Compiling $f...";
of=${f%.cpp};
of=${f/.cpp/.o};
lf=${f%.cpp};
if ! $CXX -std=c++17 -Isrc/ $CXXFLAGS -o $of $f $LDFLAGS -larmadillo 2>$of.tmp;
if ! $CXX -std=c++17 -Isrc/ $CXXFLAGS -c -o $of $f 2>$of.tmp;
then
echo "Compilation of the following program failed:";
echo "";
@@ -203,9 +204,26 @@ compile_code_blocks()
echo "";
echo "For full error output run either:";
echo " - less $of.tmp";
echo " - $CXX -std=c++17 -Isrc/ $CXXFLAGS -o $of $f $LDFLAGS -larmadillo";
echo " - $CXX -std=c++17 -Isrc/ $CXXFLAGS -c -o $of $f";
echo "";
echo "Did you set \$CXX, \$CXXFLAGS, and \$LDFLAGS correctly?"
echo "Did you set \$CXX and \$CXXFLAGS correctly?"
exit 1;
fi
if ! $CXX -o $lf $of $LDFLAGS -larmadillo 2>$lf.tmp;
then
echo "Linking of the following program failed:"
echo "";
cat $f;
echo "";
echo "First ten lines of error output:";
head $lf.tmp;
echo "";
echo "For full error output run either:";
echo " - less $lf.tmp";
echo " - $CXX -o $lf $of $LDFLAGS -larmadillo";
echo "";
echo "Did you set \$CXX and \$LDFLAGS correctly?"
exit 1;
fi
done
@@ -10,7 +10,7 @@ Each function inside the module performs a specific machine learning task.
For complete documentation of these functions, including example usage, see the
mlpack website's documentation for the Julia bindings:
https://www.mlpack.org/doc/stable/julia_documentation.html
https://www.mlpack.org/doc/user/bindings/julia.html
Each function also contains an equivalent docstring; the Julia REPL's help
functionality can be used to access the documentation that way.
+1 -1
View File
@@ -26,4 +26,4 @@ mlpack's techniques fall into a handful of categories:
For more documentation on each individual function that mlpack provides, see the
[Python binding
documentation](https://www.mlpack.org/doc/stable/python_documentation.html).
documentation](https://www.mlpack.org/doc/user/bindings/python.html).
+2 -2
View File
@@ -124,8 +124,8 @@ BINDING_SEE_ALSO("Kernel density estimation on Wikipedia",
BINDING_SEE_ALSO("Tree-Independent Dual-Tree Algorithms",
"https://arxiv.org/pdf/1304.4327");
BINDING_SEE_ALSO("Fast High-dimensional Kernel Summations Using the Monte Carlo"
" Multipole Method", "http://papers.nips.cc/paper/3539-fast-high-"
"dimensional-kernel-summations-using-the-monte-carlo-multipole-method.pdf");
" Multipole Method", "https://proceedings.neurips.cc/paper_files/"
"paper/2008/file/39059724f73a9969845dfe4146c5660e-Paper.pdf");
BINDING_SEE_ALSO("KDE C++ class documentation",
"@src/mlpack/methods/kde/kde.hpp");
+2 -2
View File
@@ -135,8 +135,8 @@ BINDING_SEE_ALSO("@nca", "#nca");
BINDING_SEE_ALSO("Large margin nearest neighbor on Wikipedia",
"https://en.wikipedia.org/wiki/Large_margin_nearest_neighbor");
BINDING_SEE_ALSO("Distance metric learning for large margin nearest neighbor "
"classification (pdf)", "http://papers.nips.cc/paper/2795-distance-metric-"
"learning-for-large-margin-nearest-neighbor-classification.pdf");
"classification (pdf)", "https://proceedings.neurips.cc/paper_files/"
"paper/2005/file/a7f592cef8b130a6967a90617db5681b-Paper.pdf");
BINDING_SEE_ALSO("LMNN C++ class documentation", "@doc/user/methods/lmnn.md");
PARAM_MATRIX_IN_REQ("input", "Input dataset to run LMNN on.", "i");
@@ -87,10 +87,10 @@ BINDING_EXAMPLE(
// See also...
BINDING_SEE_ALSO("@sparse_coding", "#sparse_coding");
BINDING_SEE_ALSO("Nonlinear learning using local coordinate coding (pdf)",
"https://papers.nips.cc/paper/3875-nonlinear-learning-using-local-"
"coordinate-coding.pdf");
"https://proceedings.neurips.cc/paper_files/paper/2009/file/"
"2afe4567e1bf64d32a5527244d104cea-Paper.pdf");
BINDING_SEE_ALSO("LocalCoordinateCoding C++ class documentation",
"@doc/user/methods/local_coordinate_coding.md");
"@doc/user/methods/local_coordinate_coding.md");
// Training parameters.
PARAM_MATRIX_IN("training", "Matrix of training data (X).", "t");
+2 -1
View File
@@ -97,7 +97,8 @@ BINDING_SEE_ALSO("@lmnn", "#lmnn");
BINDING_SEE_ALSO("Neighbourhood components analysis on Wikipedia",
"https://en.wikipedia.org/wiki/Neighbourhood_components_analysis");
BINDING_SEE_ALSO("Neighbourhood components analysis (pdf)",
"http://papers.nips.cc/paper/2566-neighbourhood-components-analysis.pdf");
"https://proceedings.neurips.cc/paper_files/paper/2004/file/"
"42fe880812925e520249e808937738d2-Paper.pdf");
BINDING_SEE_ALSO("NCA C++ class documentation", "@doc/user/methods/nca.md");
PARAM_MATRIX_IN_REQ("input", "Input dataset to run NCA on.", "i");
+2 -2
View File
@@ -73,8 +73,8 @@ BINDING_SEE_ALSO("@cf", "#cf");
BINDING_SEE_ALSO("Non-negative matrix factorization on Wikipedia",
"https://en.wikipedia.org/wiki/Non-negative_matrix_factorization");
BINDING_SEE_ALSO("Algorithms for non-negative matrix factorization (pdf)",
"http://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-"
"factorization.pdf");
"https://proceedings.neurips.cc/paper_files/paper/2000/file/"
"f9d1152547c0bde01830b7e8bd60024c-Paper.pdf");
BINDING_SEE_ALSO("NMF C++ class documentation", "@doc/user/methods/nmf.md");
BINDING_SEE_ALSO("AMF C++ class documentation", "@doc/user/methods/amf.md");
+2 -3
View File
@@ -70,9 +70,8 @@ BINDING_EXAMPLE(
BINDING_SEE_ALSO("@knn", "#knn");
BINDING_SEE_ALSO("@lsh", "#lsh");
BINDING_SEE_ALSO("Rank-approximate nearest neighbor search: Retaining meaning"
" and speed in high dimensions (pdf)", "https://papers.nips.cc/paper/3864-"
"rank-approximate-nearest-neighbor-search-retaining-meaning-and-speed-in-"
"high-dimensions.pdf");
" and speed in high dimensions (pdf)", "https://proceedings.neurips.cc/"
"paper_files/paper/2009/file/ddb30680a691d157187ee1cf9e896d03-Paper.pdf");
BINDING_SEE_ALSO("RASearch C++ class documentation",
"@src/mlpack/methods/rann/ra_search.hpp");
@@ -85,7 +85,8 @@ BINDING_SEE_ALSO("@local_coordinate_coding", "#local_coordinate_coding");
BINDING_SEE_ALSO("Sparse dictionary learning on Wikipedia",
"https://en.wikipedia.org/wiki/Sparse_dictionary_learning");
BINDING_SEE_ALSO("Efficient sparse coding algorithms (pdf)",
"http://papers.nips.cc/paper/2979-efficient-sparse-coding-algorithms.pdf");
"https://proceedings.neurips.cc/paper_files/paper/2006/file/"
"2d71b2ae158c7c5912cc0bbde2bb9d95-Paper.pdf");
BINDING_SEE_ALSO("Regularization and variable selection via the elastic net",
"https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf"
"&doi=46217f372a75dddc2254fdbc6b9418ba3554e453");