Overhaul documentation homepage (#3836)

* Add pipeline to documentation homepage.

* Fix for mobile devices.

* Add little pipelines to go at the top of each page.

* Overhaul index page.

* Overhaul README to remove redundant material.

* Add installation documentation.

* Update pipelines.

* Allow nesting of deeper details.

* Add a pipeline to the top of the load/save page.

* Add prerequisites link to main pipeline.

* Add better but not finished sidebar.

* Add a couple new documentation pages.

* Fix URLs in svg.

* Incremental checkin.

* Fix Youtube URLs.

* Incremental checkin.

* Minor fixes.

* Add first pass at evaluation/deployment pages.

* Minor spacing and link fixes.

* Flesh out a number of additional pages and write basic compilation documentation.

* Fix some minor issues, and add Docker deployment page (not totally finished yet).

* Add developer documentation landing page.

* Hopefully getting close to the final set of changes here.

* Remove this documentation for now.

* Fix a few links, and the size of the sidebar.

* Fix some additional links.

* Fix a bunch more links.

* Fix another link that now has a better place.

* Refactor test-docs.sh to handle documentation that is a standalone program.

* Fix file exclusions.

* Fully qualify typename.

* Update name of file.

* Fix syntax error.

* Remove files that are not meant to be compiled.

* Also skip the quickstart.

* Move quickstart entry to the top.

* Remove gray coloring of binding documentation.

* Update name of sidebar link.

* Update to working link.

* Fix Wikipedia anchor.
This commit is contained in:
Ryan Curtin
2024-12-20 13:36:12 -05:00
committed by GitHub
parent 69b296b8c5
commit c8eb3dceac
71 changed files with 2691 additions and 863 deletions
+20 -319
View File
@@ -44,7 +44,7 @@ programs, Python bindings, Julia bindings, Go bindings and R bindings.
- [mlpack homepage](https://www.mlpack.org/)
- [mlpack documentation](https://www.mlpack.org/doc/index.html)
- [Examples repository](https://github.com/mlpack/examples/)
- [Tutorials](doc/tutorials/README.md)
- [Tutorials](doc/user/tutorials.md)
- [Development Site (Github)](https://github.com/mlpack/mlpack/)
[//]: # (numfocus-fiscal-sponsor-attribution)
@@ -69,13 +69,9 @@ variety of other needs.
1. [Citation details](#1-citation-details)
2. [Dependencies](#2-dependencies)
3. [Installing and using mlpack in C++](#3-installing-and-using-mlpack-in-c)
4. [Building mlpack bindings to other languages](#4-building-mlpack-bindings-to-other-languages)
1. [Command-line programs](#4i-command-line-programs)
2. [Python bindings](#4ii-python-bindings)
3. [R bindings](#4iii-r-bindings)
4. [Julia bindings](#4iv-julia-bindings)
5. [Go bindings](#4v-go-bindings)
3. [Installation](#3-installation)
4. [Usage from C++](#4-usage-from-c)
1. [Reducing compile time](#41-reducing-compile-time)
5. [Building mlpack's test suite](#5-building-mlpacks-test-suite)
6. [Further resources](#6-further-resources)
@@ -107,6 +103,7 @@ Citations are beneficial for the growth and improvement of mlpack.
## 2. Dependencies
**mlpack** requires the following additional dependencies:
- C++17 compiler
- [Armadillo](https://arma.sourceforge.net)   >= 10.8
- [ensmallen](https://ensmallen.org)  >= 2.10.0
@@ -117,57 +114,12 @@ available.
If you are compiling Armadillo by hand, ensure that LAPACK and BLAS are enabled.
## 3. Installing and using mlpack in C++
## 3. Installation
*See also the [C++ quickstart](doc/quickstart/cpp.md).*
Detailed installation instructions can be found on the
[Installing mlpack](doc/user/install.md) page.
Since mlpack is a header-only library, installing just the headers for use in a
C++ application is trivial.
From the root of the sources, configure and install
in the standard CMake way:
```sh
mkdir build && cd build/
cmake ..
sudo make install
```
If the `cmake ..` command fails due to unavailable dependencies, consider either using the
`-DDOWNLOAD_DEPENDENCIES=ON` option as detailed in [the following
subsection](#31-additional-build-options), or ensure that mlpack's dependencies
are installed, e.g. using the system package manager. For example, on Debian
and Ubuntu, all relevant dependencies can be installed with `sudo apt-get
install libarmadillo-dev libensmallen-dev libcereal-dev libstb-dev g++ cmake`.
Alternatively, since CMake v3.14.0 the `cmake` command can create the build
folder itself, and so the above commands can be rewritten as follows:
```sh
cmake -S . -B build
sudo cmake --build build --target install
```
During configuration, CMake adjusts the file `mlpack/config.hpp` using the
details of the local system. This file can be modified by hand as necessary
before or after installation.
### 3.1. Additional build options
You can add a few arguments to the `cmake` command to control the behavior of
the configuration and build process. Simply add these to the `cmake` command.
Some options are given below:
- `-DDOWNLOAD_DEPENDENCIES=ON` will automatically download mlpack's
dependencies (ensmallen, Armadillo, and cereal). Installing Armadillo this
way is not recommended and it is better to use your system package manager
when possible (see [below](#31a-linking-with-autodownloaded-armadillo)).
- `-DCMAKE_INSTALL_PREFIX=/install/root/` will set the root of the install
directory to `/install/root` when `make install` is run.
- `-DDEBUG=ON` will enable debugging symbols in any compiled bindings or tests.
There are also options to enable building bindings to each language that mlpack
supports; those are detailed in the following sections.
## 4. Usage from C++
Once headers are installed with `make install`, using mlpack in an application
consists only of including it. So, your program should include mlpack:
@@ -189,44 +141,19 @@ add `#define MLPACK_ENABLE_ANN_SERIALIZATION` before including `<mlpack.hpp>`.
If you don't define `MLPACK_ENABLE_ANN_SERIALIZATION` and your code serializes a
neural network, a compilation error will occur.
See the [C++ quickstart](doc/quickstart/cpp.md) and the
[examples](https://github.com/mlpack/examples) repository for some examples
of mlpack applications in C++, with corresponding `Makefile`s.
See also:
#### 3.1.a. Linking with autodownloaded Armadillo
* the [test program compilation section](doc/user/install.md#compiling-a-test-program)
of the installation documentation,
* the [C++ quickstart](doc/quickstart/cpp.md), and
* the [examples repository](https://github.com/mlpack/examples) repository for
some examples of mlpack applications in C++, with corresponding `Makefile`s.
When the autodownloader is used to download Armadillo
(`-DDOWNLOAD_DEPENDENCIES=ON`), the Armadillo runtime library is not built and
Armadillo must be used in header-only mode. The autodownloader also does not
download dependencies of Armadillo such as OpenBLAS. For this reason, it is
recommended to instead install Armadillo using your system package manager,
which will also install the dependencies of Armadillo. For example, on Ubuntu
and Debian systems, Armadillo can be installed with
```sh
sudo apt-get install libarmadillo-dev
```
and other package managers such as `dnf` and `brew` and `pacman` also have
Armadillo packages available.
If the autodownloader is used to provide Armadillo, mlpack programs cannot be
linked with `-larmadillo`. Instead, you must link directly with the
dependencies of Armadillo. For example, on a system that has OpenBLAS
available, compilation can be done like this:
```sh
g++ -O3 -std=c++17 -o my_program my_program.cpp -lopenblas -fopenmp
```
See [the Armadillo documentation](https://arma.sourceforge.net/faq.html#linking)
for more information on linking Armadillo programs.
### 3.2. Reducing compile time
### 4.1. Reducing compile time
mlpack is a template-heavy library, and if care is not used, compilation time of
a project can be increased greatly. Fortunately, there are a number of ways to
reduce compilation time:
a project can be very high. Fortunately, there are a number of ways to reduce
compilation time:
* Include individual headers, like `<mlpack/methods/decision_tree.hpp>`, if you
are only using one component, instead of `<mlpack.hpp>`. This reduces the
@@ -248,241 +175,15 @@ reduce compilation time:
Other strategies exist too, such as precompiled headers, compiler options,
[`ccache`](https://ccache.dev), and others.
## 4. Building mlpack bindings to other languages
mlpack is not just a header-only library: it also comes with bindings to a
number of other languages, this allows flexible use of mlpack's efficient
implementations from languages that aren't C++.
In general, you should *not* need to build these by hand---they should be
provided by either your system package manager or your language's package
manager.
Building the bindings for a particular language is done by calling `cmake` with
different options; each example below shows how to configure an individual set
of bindings, but it is of course possible to combine the options and build
bindings for many languages at once.
### 4.i. Command-line programs
*See also the [command-line quickstart](doc/quickstart/cli.md).*
The command-line programs have no extra dependencies. The set of programs that
will be compiled is detailed and documented on the [command-line program
documentation page](doc/user/bindings/cli.md).
From the root of the mlpack sources, run the following commands to build and
install the command-line bindings:
```sh
mkdir build && cd build/
cmake -DBUILD_CLI_PROGRAMS=ON ../
make
sudo make install
```
You can use `make -j<N>`, where `N` is the number of cores on your machine, to
build in parallel; e.g., `make -j4` will use 4 cores to build.
### 4.ii. Python bindings
*See also the [Python quickstart](doc/quickstart/python.md).*
mlpack's Python bindings are available on
[PyPI](https://pypi.org/project/mlpack/) and
[conda-forge](https://anaconda.org/conda-forge/mlpack), and can be installed
with either `pip install mlpack` or `conda install -c conda-forge mlpack`.
These sources are recommended, as building the Python bindings by hand can be
complex.
With that in mind, if you would still like to manually build the mlpack Python
bindings, first make sure that the following Python packages are installed:
- setuptools
- wheel
- cython >= 0.24
- numpy
- pandas >= 0.15.0
Now, from the root of the mlpack sources, run the following commands to build
and install the Python bindings:
```sh
mkdir build && cd build/
cmake -DBUILD_PYTHON_BINDINGS=ON ../
make
sudo make install
```
You can use `make -j<N>`, where `N` is the number of cores on your machine, to
build in parallel; e.g., `make -j4` will use 4 cores to build. You can also
specify a custom Python interpreter with the CMake option
`-DPYTHON_EXECUTABLE=/path/to/python`.
### 4.iii. R bindings
*See also the [R quickstart](doc/quickstart/r.md).*
mlpack's R bindings are available as the R package
[mlpack](https://cran.r-project.org/web/packages/mlpack/index.html) on CRAN.
You can install the package by running `install.packages('mlpack')`, and this is
the recommended way of getting mlpack in R.
If you still wish to build the R bindings by hand, first make sure the following
dependencies are installed:
- R >= 4.0
- Rcpp >= 0.12.12
- RcppArmadillo >= 0.10.8.0
- RcppEnsmallen >= 0.2.10.0
- roxygen2
- testthat
- pkgbuild
These can be installed with `install.packages()` inside of your R environment.
Once the dependencies are available, you can configure mlpack and build the R
bindings by running the following commands from the root of the mlpack sources:
```sh
mkdir build && cd build/
cmake -DBUILD_R_BINDINGS=ON ../
make
sudo make install
```
You may need to specify the location of the R program in the `cmake` command
with the option `-DR_EXECUTABLE=/path/to/R`.
Once the build is complete, a tarball can be found under the build directory in
`src/mlpack/bindings/R/`, and then that can be installed into your R environment
with a command like `install.packages(mlpack_3.4.3.tar.gz, repos=NULL,
type='source')`.
### 4.iv. Julia bindings
*See also the [Julia quickstart](doc/quickstart/julia.md).*
mlpack's Julia bindings are available by installing the
[mlpack.jl](https://github.com/mlpack/mlpack.jl) package using
`Pkg.add("mlpack.jl")`. The process of building, packaging, and distributing
mlpack's Julia bindings is very nontrivial, so it is recommended to simply use
the version available in `Pkg`, but if you want to build the bindings by hand
anyway, you can configure and build them by running the following commands from
the root of the mlpack sources:
```sh
mkdir build && cd build/
cmake -DBUILD_JULIA_BINDINGS=ON ../
make
```
If CMake cannot find your Julia installation, you can add
`-DJULIA_EXECUTABLE=/path/to/julia` to the CMake configuration step.
Note that the `make install` step is not done above, since the Julia binding
build system was not meant to be installed directly. Instead, to use handbuilt
bindings (for instance, to test them), one option is to start Julia with
`JULIA_PROJECT` set as an environment variable:
```sh
cd build/src/mlpack/bindings/julia/mlpack/
JULIA_PROJECT=$PWD julia
```
and then `using mlpack` should work.
### 4.v. Go bindings
*See also the [Go quickstart](doc/quickstart/go.md).*
To build mlpack's Go bindings, ensure that Go >= 1.11.0 is installed, and that
the Gonum package is available. You can use `go get` to install mlpack as a
module in a Go project:
```sh
go get -u mlpack.org/v1/mlpack
```
The Go bindings themselves will then need to be compiled. Find the mlpack
directory under `$GOMODCACHE/mlpack.org/v1/mlpack` and run these commands:
```sh
make
sudo make install
```
Then, `go run my_code.go` will be able to correctly link against mlpack's Go
bindings and run.
The process of building the Go bindings by hand is a little tedious, so
following the steps above is recommended. However, if you wish to build the Go
bindings by hand anyway, you can do this by running the following commands from
the root of the mlpack sources:
```sh
mkdir build && cd build/
cmake -DBUILD_GO_BINDINGS=ON ../
make
sudo make install
```
## 5. Building mlpack's test suite
mlpack contains an extensive test suite that exercises every part of the
codebase. It is easy to build and run the tests with CMake and CTest, as below:
```sh
mkdir build && cd build/
cmake -DBUILD_TESTS=ON ../
make
ctest .
```
If you want to test the bindings, too, you will have to adapt the CMake
configuration command to turn on the language bindings that you want to
test---see the previous sections for details.
See the [installation instruction section](doc/user/install.md#build-tests).
## 6. Further Resources
More documentation is available for both users and developers.
***User documentation***:
- [Matrices in mlpack](doc/user/matrices.md)
- [Loading and saving mlpack objects](doc/user/load_save.md)
- [Cross-Validation](doc/user/cv.md)
- [Hyper-parameter Tuning](doc/user/hpt.md)
- [Building mlpack from source on Windows](doc/user/build_windows.md)
- [Sample C++ ML App for Windows](doc/user/sample_ml_app.md)
- [mlpack core library documentation](doc/user/core.md)
- [Examples repository](https://github.com/mlpack/examples/)
***Tutorials:***
- [Alternating Matrix Factorization (AMF)](doc/tutorials/amf.md)
- [Artificial Neural Networks (ANN)](doc/tutorials/ann.md)
- [Approximate k-Furthest Neighbor Search (`approx_kfn`)](doc/tutorials/approx_kfn.md)
- [Collaborative Filtering (CF)](doc/tutorials/cf.md)
- [DatasetMapper](doc/tutorials/datasetmapper.md)
- [Density Estimation Trees (DET)](doc/tutorials/det.md)
- [Euclidean Minimum Spanning Trees (EMST)](doc/tutorials/emst.md)
- [Fast Max-Kernel Search (FastMKS)](doc/tutorials/fastmks.md)
- [Image Utilities](doc/tutorials/image.md)
- [k-Means Clustering](doc/tutorials/kmeans.md)
- [Linear Regression](doc/tutorials/linear_regression.md)
- [Neighbor Search (k-Nearest-Neighbors)](doc/tutorials/neighbor_search.md)
- [Range Search](doc/tutorials/range_search.md)
- [Reinforcement Learning](doc/tutorials/reinforcement_learning.md)
***Developer documentation***:
- [Writing an mlpack binding](doc/developer/iodoc.md)
- [mlpack Timers](doc/developer/timer.md)
- [mlpack automatic bindings to other languages](doc/developer/bindings.md)
- [The ElemType policy in mlpack](doc/developer/elemtype.md)
- [The KernelType policy in mlpack](doc/developer/kernels.md)
- [The DistanceType policy in mlpack](doc/developer/distances.md)
- [The TreeType policy in mlpack](doc/developer/trees.md)
* [Documentation homepage](https://www.mlpack.org/doc/index.html)
To learn about the development goals of mlpack in the short- and medium-term
future, see the [vision document](https://www.mlpack.org/papers/vision.pdf).
+1 -1
View File
@@ -43,7 +43,7 @@ internal design.
library](https://joss.theoj.org/papers/10.21105/joss.00726) (2018)
* [mlpack open-source machine learning library and
community](http://kurg.org/pub/pdf/2018mlossmlpack.pdf) (2018)
community](https://openreview.net/pdf?id=rJxx0Y6NhX) (2018)
* [Designing and building the mlpack open-source machine learning
library](https://arxiv.org/abs/1708.05279) (2017)
+19 -7
View File
@@ -21,8 +21,8 @@ body {
div#content {
padding-top: 10px;
padding-bottom: 10px;
padding: 30px;
max-width: 920px;
padding: 10px;
max-width: 880px;
margin: auto;
}
@@ -1060,9 +1060,9 @@ div#sidebar {
float: left;
position: fixed;
top: 55px;
min-width: calc(50% - 460px);
min-width: calc(50% - 450px);
font-size: 90%;
max-width: calc(50% - 460px);
max-width: calc(50% - 450px);
overflow-y: scroll;
bottom: 0;
}
@@ -1071,7 +1071,7 @@ div#sidebar ul {
border-top: 2px solid #ccc;
padding: 0.5em;
list-style-type: none;
padding-left: 0.5em;
padding-right: 0em;
margin-bottom: 0px;
}
@@ -1120,6 +1120,17 @@ div#sidebar details[open] details[open] summary::after {
content: " [-]";
}
div#sidebar details[open] details[open] details summary::after {
content: " [+]";
}
div#sidebar details[open] details[open] details[open] summary::after {
content: " [-]";
}
object#pipeline-wide { display: block; }
object#pipeline-narrow { display: none; }
@media screen and (max-width: 1140px) {
div#sidebar {
display: none;
@@ -1150,6 +1161,7 @@ a.textlink {
color: #333;
}
ul#binding_sidebar {
background: #eee;
@media screen and (max-width: 980px) {
object#pipeline-wide { display: none; }
object#pipeline-narrow { display: block; width: 100%; max-width: 400px; margin: auto; }
}
+156
View File
@@ -0,0 +1,156 @@
# mlpack continuous integration (CI) systems
Every pull request submitted to mlpack goes through a number of automated checks
to make sure that all unit tests pass, all code matches the desired style guide,
documentation does not contain any broken links, and so on and so forth.
In general, all CI checks need to pass for PRs to be merged, but like any
complex project, there are occasionally spurious failures or other unrelated
problems.
* [Basic compilation and test jobs](#basic-compilation-and-test-jobs)
* [R build](#r-build)
* [Documentation build and test](#documentation-build-and-test)
* [Style checks](#style-checks)
* [Cross-compilation checks](#cross-compilation-checks)
* [Static code analysis checks](#static-code-analysis-checks)
Also you can see the [list of CI infrastructure](#list-of-ci-infrastructure).
## Basic compilation and test jobs
Basic compilation and testing is done on Azure Pipelines.
We use Azure Pipelines primarily because of the large number of resources that
an mlpack build takes; our own [internal resources](#list-of-ci-infrastructure)
are thus preserved for more specific usage.
Link: [***mlpack on Azure Pipelines***](https://dev.azure.com/mlpack/mlpack/_build/)
* Builds and tests mlpack for Linux, OS X, and Windows.
* Also builds and tests bindings on Linux and OS X.
* Configurations for these jobs can be found in the mlpack repository under the
`.ci/` directory.
* *These jobs are most of what's shown in the jobs in a PR.*
***If your build is failing on Azure Pipelines:***
* Take a look at the build log to identify the issue.
* If the failure is during `mlpack_test`, look through the test output to find
where the actual failed test is.
- If the failed test is related to your code, you probably have a bug to fix.
:)
- If the failed test does not seem related at all, it could be a spurious
error in another test.
- You can run the test locally with `bin/mlpack_test NameOfTest`.
- If the test seems like a random failure, try different random seeds:
`bin/mlpack_test --rng-seed=X NameOfTest`.
## R build
The R build uses Github Actions (not for any particular reason).
Link: [***mlpack R build actions***](https://github.com/mlpack/mlpack/actions/workflows/main.yml)
* Job configuration is found in `.github/workflows/main.yml`
* The job produces 1 artifact, which is the tarball that can be uploaded to
[CRAN](https://cran.r-project.org/).
* When this job fails, it is usually because of:
- An intermittent problem downloading dependencies or setting up the
environment.
- A test failure which can probably be more easily debugged or reproduced via
the main [Azure Pipelines build jobs](#basic-compilation-and-test-jobs).
## Documentation build and test
The 'documentation build and test' job builds and tests *all* documentation,
checking:
* that all Markdown pages build and render properly;
* that all HTML is valid;
* that all links referenced in the documentation are valid;
* that all code examples compile and run.
All of the scripts to perform these builds are located in the `scripts/`
directory, so that they can be run locally.
* `./scripts/build-docs.sh`
- Builds all documentation in `doc/` with the output directory `doc/html/`.
- If you browse to `doc/html/index.html` you can browse locally-built
documentation.
- Checks all HTML links and anchors.
* `./scripts/test-docs.sh doc/`
* `./scripts/test-docs.sh doc/path/to/file.md`
- Extracts code blocks from documentation and compiles and runs them.
- Can be run on either all the documentation (with `doc/` or directory
argument), or a single file.
- May require `CXX`, `CXXFLAGS`, and `LDFLAGS` environment variables to be
set. See the script itself for more details.
- If run on an individual file, the output of each compiled code snippet will
be printed.
When writing new documentation, be sure to test it locally---going back and
forth with the
[job on Jenkins](http://ci.mlpack.org/job/pull-request%20documentation%20build%20and%20test/)
can be very tedious.
## Style checks
The [style checker job](http://ci.mlpack.org/job/pull-requests%20mlpack%20style%20checks/) runs on Jenkins.
* The [`lint.sh` script](https://github.com/mlpack/jenkins-conf/blob/master/linter/lint.sh) to check for C++ style issues.
* If your job failed this check, look at the "Style-Check Warnings" tab in the
Jenkins job.
* See also the
[style guidelines for mlpack](https://github.com/mlpack/mlpack/wiki/DesignGuidelines).
## Cross-compilation checks
The [cross-compilation checks](http://ci.mlpack.org/job/CrossCompile-mlpack-for-embedded-aarch64/)
run on Jenkins.
* The job builds mlpack in a
[cross-compilation environment](../embedded/supported_boards.md).
* Any failures seen here *that are not seen in other jobs* will probably be
failures specific to the cross-compilation environment.
## Static code analysis checks
The [static code analysis checks](http://ci.mlpack.org/job/pull-requests-mlpack-static-code-analysis/)
use a few C++ code analysis tools to try and report issues with the codebase.
Currently, most of the output by this job is not actionable---there are too many
false positives or spurious issues---and therefore should be used only as
informational output.
Configuration can be found in the
[`jenkins-conf` repository](https://github.com/mlpack/jenkins-conf).
## List of CI infrastructure
Many physical systems are involved with testing mlpack and are hooked up to
Jenkins.
Link: [***Jenkins (`ci.mlpack.org`)***](http://ci.mlpack.org)
* The 'specialized' build system.
* Various Jenkins configuration related resources are found in the
[`jenkins-conf` repository](https://github.com/mlpack/jenkins-conf/).
* The list of workers (individual systems) can be found
[here](http://ci.mlpack.org/computer/).
* Adding or modifying jobs requires privileges; you can either ask an mlpack
maintainer to make changes, or if you are on the Contributors team but still
don't have access, ask somewhere and someone will give you access. (Probably
`#mlpack:matrix.org` is the best bet!)
+7 -9
View File
@@ -18,7 +18,7 @@ via issues on GitHub, or via chat:
## Real-time chat
* #mlpack:matrix.org on [Matrix](https://www.matrix.org/)
* `#mlpack:matrix.org` on [Matrix](https://www.matrix.org/)
* [mlpack Slack workspace](https://mlpack.slack.com/)
- You will need to request an invite from the
[auto-inviter](http://slack-inviter.mlpack.org:4000).
@@ -27,11 +27,10 @@ via issues on GitHub, or via chat:
## Video meetup
On the first and third Friday of every month, at ***1700 UTC*** on Fridays, we
have *casual video meetups* with no particular agenda. Feel free to join up!
We often talk about code changes that we are working on, issues that people are
having with mlpack, general design direction, and whatever else might be on our
mind.
On the first Monday of every month, at ***1530 UTC***, we have *casual video
meetups* with no particular agenda. Feel free to join up! We often talk about
code changes that we are working on, issues that people are having with mlpack,
general design direction, and whatever else might be on our mind.
We use [this Zoom room](https://zoom.us/j/3820896170). For security, we use a
password for the meeting to keep malicious bots out. The password is simple:
@@ -55,9 +54,8 @@ contains many examples you can build and play around with.
Once you have an idea of what's included in mlpack and how a user might use it,
then a good next step would be to set up a development environment. Once you
have that set up, you can
[build mlpack from source](../README.md#3-installing-and-using-mlpack-in-c),
and explore the codebase to see how it's organized.
have that set up, you can [build mlpack from source](../user/install.md), and
explore the codebase to see how it's organized.
Try making small changes to the code, or adding new tests to the test suite, and
then rebuild to see how your changes work.
+29
View File
@@ -0,0 +1,29 @@
# Developers
If you want to contribute to mlpack, or if you already are a regular contributor
to mlpack or a maintainer, the following pages may serve as useful documentation
about internal development processes, guidelines, and systems:
* [Community](community.md): details of how the mlpack community operates and
communicates, including *how to get involved*.
* [Google Summer of Code](gsoc.md): advice on applying to mlpack for Google
Summer of Code.
* [CI/CD](ci.md): systems and servers involved in mlpack's continuous
integration pipeline.
* [Timers](timer.md): interface for timing bindings and other mlpack programs.
* [Automatic binding system](bindings.md): design details and operation of
mlpack's automatic binding generator, including how to add a new language.
* [Writing a binding](iodoc.md): a tutorial on writing an mlpack binding that
will automatically be compiled to any language mlpack has bindings for.
* [Template policies](policies.md): documentation for standardized class
interfaces used by mlpack algorithms.
- [The ElemType policy](elemtype.md)
- [The DistanceType policy](distances.md)
- [The KernelType policy](kernels.md)
- [The TreeType policy](trees.md)
+5 -6
View File
@@ -35,12 +35,11 @@ project. A student should ideally be familiar with
- *using the development toolchain on your computer*: you should be able to
download and compile mlpack, make changes to the code, and recompile with the
new changes. There is a
[section in the README](../README.md#3-installing-and-using-mlpack-in-c)
for how to build mlpack and would be a great place to get started. If youre
on Windows, then the [Windows build guide](../user/build_windows.md) could be
very useful. See also the [Community page](community.md) for more information
on getting started.
new changes. There is a [guide](../user/install.md) for how to build mlpack
and that would be a great place to get started. If youre on Windows, then
the [Windows build guide](../user/build_windows.md) could be very useful. See
also the [Community page](community.md) for more information on getting
started.
- *at least intermediate C++ knowledge*: mlpack uses lots of different C++
paradigms including template metaprogramming, C++ features like rvalue
+9
View File
@@ -0,0 +1,9 @@
# Template policies
mlpack has a number of common template policy patterns that are used in various
algorithms.
* [The ElemType policy](elemtype.md)
* [The DistanceType policy](distances.md)
* [The KernelType policy](kernels.md)
* [The TreeType policy](trees.md)
+1 -1
View File
@@ -87,7 +87,7 @@ the target.
In this tutorial we use the autodownloader since it automates the entire
process, including the cross-compilation of OpenBLAS. The first step is to
create a build directory, just like the
[regular build process](../../README.md#3-installing-and-using-mlpack-in-c):
[regular build process](../user/install.md#install-from-source):
```sh
cd mlpack/
+3
View File
@@ -0,0 +1,3 @@
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" transform="scale(64)" fill="#1B1F23"/>
</svg>

After

Width:  |  Height:  |  Size: 968 B

+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="401.98px" height="559.472px" viewBox="0 0 401.98 559.472" enable-background="new 0 0 401.98 559.472" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M10.634,300.493c0.764,15.751,16.499,8.463,23.626,3.539c6.765-4.675,8.743-0.789,9.337-10.015 c0.389-6.064,1.088-12.128,0.744-18.216c-10.23-0.927-21.357,1.509-29.744,7.602C10.277,286.542,2.177,296.561,10.634,300.493"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C6B198" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M10.634,300.493c2.29-0.852,4.717-1.457,6.271-3.528"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#6AD7E5" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M46.997,112.853C-13.3,95.897,31.536,19.189,79.956,50.74L46.997,112.853z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#6AD7E5" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M314.895,44.984c47.727-33.523,90.856,42.111,35.388,61.141L314.895,44.984z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M325.161,494.343c12.123,7.501,34.282,30.182,16.096,41.18c-17.474,15.999-27.254-17.561-42.591-22.211 C305.271,504.342,313.643,496.163,325.161,494.343z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M341.257,535.522c-2.696-5.361-3.601-11.618-8.102-15.939"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M108.579,519.975c-14.229,2.202-22.238,15.039-34.1,21.558c-11.178,6.665-15.454-2.134-16.461-3.92 c-1.752-0.799-1.605,0.744-4.309-1.979c-10.362-16.354,10.797-28.308,21.815-36.432C90.87,496.1,100.487,509.404,108.579,519.975z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M58.019,537.612c0.542-6.233,5.484-10.407,7.838-15.677"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.513,91.667c-7.955-4.208-13.791-9.923-8.925-19.124 c4.505-8.518,12.874-7.593,20.83-3.385L49.513,91.667z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M337.716,83.667c7.955-4.208,13.791-9.923,8.925-19.124 c-4.505-8.518-12.874-7.593-20.83-3.385L337.716,83.667z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M392.475,298.493c-0.764,15.751-16.499,8.463-23.626,3.539c-6.765-4.675-8.743-0.789-9.337-10.015 c-0.389-6.064-1.088-12.128-0.744-18.216c10.23-0.927,21.357,1.509,29.744,7.602C392.831,284.542,400.932,294.561,392.475,298.493"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C6B198" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M392.475,298.493c-2.29-0.852-4.717-1.457-6.271-3.528"/>
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#6AD7E5" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M195.512,13.124c60.365,0,116.953,8.633,146.452,66.629c26.478,65.006,17.062,135.104,21.1,203.806 c3.468,58.992,11.157,127.145-16.21,181.812c-28.79,57.514-100.73,71.982-160,69.863c-46.555-1.666-102.794-16.854-129.069-59.389 c-30.826-49.9-16.232-124.098-13.993-179.622c2.652-65.771-17.815-131.742,3.792-196.101 C69.999,33.359,130.451,18.271,195.512,13.124"/>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" stroke="#000000" stroke-width="2.9081" stroke-linecap="round" d=" M206.169,94.16c10.838,63.003,113.822,46.345,99.03-17.197C291.935,19.983,202.567,35.755,206.169,94.16"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" stroke="#000000" stroke-width="2.8214" stroke-linecap="round" d=" M83.103,104.35c14.047,54.85,101.864,40.807,98.554-14.213C177.691,24.242,69.673,36.957,83.103,104.35"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M218.594,169.762c0.046,8.191,1.861,17.387,0.312,26.101c-2.091,3.952-6.193,4.37-9.729,5.967c-4.89-0.767-9.002-3.978-10.963-8.552 c-1.255-9.946,0.468-19.576,0.785-29.526L218.594,169.762z"/>
<g>
<ellipse fill-rule="evenodd" clip-rule="evenodd" cx="107.324" cy="95.404" rx="14.829" ry="16.062"/>
<ellipse fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" cx="114.069" cy="99.029" rx="3.496" ry="4.082"/>
</g>
<g>
<ellipse fill-rule="evenodd" clip-rule="evenodd" cx="231.571" cy="91.404" rx="14.582" ry="16.062"/>
<ellipse fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" cx="238.204" cy="95.029" rx="3.438" ry="4.082"/>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" stroke="#000000" stroke-width="3" stroke-linecap="round" d=" M176.217,168.87c-6.47,15.68,3.608,47.035,21.163,23.908c-1.255-9.946,0.468-19.576,0.785-29.526L176.217,168.87z"/>
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" stroke="#231F20" stroke-width="3" stroke-linecap="round" d=" M178.431,138.673c-12.059,1.028-21.916,15.366-15.646,26.709c8.303,15.024,26.836-1.329,38.379,0.203 c13.285,0.272,24.17,14.047,34.84,2.49c11.867-12.854-5.109-25.373-18.377-30.97L178.431,138.673z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M176.913,138.045c-0.893-20.891,38.938-23.503,43.642-6.016 C225.247,149.475,178.874,153.527,176.913,138.045C175.348,125.682,176.913,138.045,176.913,138.045z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="2500" height="2500" viewBox="-0.006 2.335 64.006 59.33"><path d="M14.518 61.665C6.493 61.656-.006 55.144 0 47.12s6.515-14.526 14.54-14.523 14.53 6.51 14.53 14.534c-.01 8.03-6.52 14.534-14.55 14.534z" fill="#ca3c32"/><path d="M49.45 61.665c-8.025-.01-14.524-6.52-14.518-14.545s6.515-14.526 14.54-14.523S64 39.105 64 47.13c-.01 8.03-6.52 14.534-14.55 14.534z" fill="#9259a3"/><path d="M31.992 31.404c-8.027 0-14.534-6.507-14.534-14.534S23.965 2.335 31.992 2.335 46.526 8.843 46.526 16.87a14.52 14.52 0 0 1-14.534 14.534z" fill="#399746"/></svg>

After

Width:  |  Height:  |  Size: 589 B

+289
View File
@@ -0,0 +1,289 @@
<svg width="280" height="1440" viewBox="0 0 280 1440" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #aaa; stroke: black; stroke-width: 1.5; }
g.elem:hover rect { fill: #ccc; }
g.pipeline_elem rect { fill: #ddd; stroke: black; stroke-width: 1.5; }
g.pipeline_elem:hover rect { fill: #fff; }
line { stroke: black; stroke-width: 1.5; }
a text { fill: #0366b6; }
a text:hover { text-decoration: underline; }
text.header { font-weight: bold; }
a text.header { fill: #031676; }
text { font-family: Helvetica, arial, sans-serif; font-size: 14px;
fill: #333; }
</style>
<!-- Prerequisites -->
<g class="elem">
<rect x="10" y="10" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/prerequisites.html" target="_top">
<text x="140" y="30" text-anchor="middle" class="header">Prerequisites</text>
</a>
<a xlink:href="../user/install.html" target="_top">
<text x="140" y="55" text-anchor="middle">Installing mlpack</text>
</a>
<a xlink:href="../embedded/supported_boards.html" target="_top">
<text x="140" y="70" text-anchor="middle">Cross-compilation setup</text>
</a>
<a xlink:href="quickstart/cpp.html" target="_top">
<text x="140" y="85" text-anchor="middle">Quickstart</text>
</a>
<a xlink:href="user/matrices.html" target="_top">
<text x="140" y="100" text-anchor="middle">Matrices and data</text>
</a>
</g>
<!-- Tutorials and Examples -->
<g class="elem">
<rect x="10" y="120" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/tutorials.html" target="_top">
<text x="140" y="140" text-anchor="middle" class="header">Tutorials and Examples</text>
</a>
<a xlink:href="https://github.com/mlpack/examples" target="_top">
<image x="30" y="162" width="14" height="14" href="github.svg" />
<text x="140" y="174" text-anchor="middle">mlpack examples repository</text>
</a>
<a xlink:href="https://www.youtube.com/@mlpack/videos" target="_top">
<image x="30" y="180" width="15" height="15" href="youtube.svg" />
<text x="140" y="192" text-anchor="middle">mlpack Youtube channel</text>
</a>
<a xlink:href="https://github.com/mlpack/models" target="_top">
<image x="30" y="198" width="14" height="14" href="github.svg" />
<text x="140" y="210" text-anchor="middle">mlpack models repository</text>
</a>
</g>
<!-- Utility classes -->
<g class="elem">
<a xlink:href="../user/core.html" target="_top">
<rect x="10" y="230" rx="20" ry="20" width="260" height="100" />
<text x="140" y="250" text-anchor="middle" class="header">Utility Classes</text>
<text x="80" y="278" text-anchor="middle">Math</text>
<text x="200" y="278" text-anchor="middle">Distances</text>
<text x="80" y="296" text-anchor="middle">Distributions</text>
<text x="200" y="296" text-anchor="middle">Kernels</text>
<!-- TODO: add metrics -->
<text x="140" y="314" text-anchor="middle">Trees</text>
</a>
</g>
<line x1="20" y1="350" x2="260" y2="350" style="stroke:black;stroke-dasharray:4;stroke-width:4" />
<text x="140" y="375" text-anchor="middle" style="font-weight:bold;font-size:125%">The Data Science Pipeline</text>
<text x="140" y="395" text-anchor="middle" style="font-weight:bold;font-size:125%">with mlpack</text>
<line x1="20" y1="405" x2="260" y2="405" style="stroke:black;stroke-dasharray:4;stroke-width:4" />
<!-- The pipeline -->
<g class="pipeline">
<!-- Data loading and I/O -->
<g class="pipeline_elem">
<rect x="10" y="430" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/load_save.html" target="_top">
<text x="140" y="450" text-anchor="middle" class="header">Data loading and I/O</text>
</a>
<a xlink:href="../user/load_save.html#numeric-data" target="_top">
<text x="140" y="475" text-anchor="middle">Numeric data</text>
</a>
<a xlink:href="../user/load_save.html#mixed-categorical-data" target="_top">
<text x="140" y="490" text-anchor="middle">Mixed categorical data</text>
</a>
<a xlink:href="../user/load_save.html#image-data" target="_top">
<text x="140" y="505" text-anchor="middle">Image data</text>
</a>
<a xlink:href="../user/load_save.html#mlpack-objects" target="_top">
<text x="140" y="520" text-anchor="middle">mlpack models and objects</text>
</a>
</g>
<line x1="140" y1="530" x2="140" y2="560" />
<line x1="140" y1="560" x2="130" y2="550" />
<line x1="140" y1="560" x2="150" y2="550" />
<!-- Preprocessing / feature extraction -->
<g class="pipeline_elem">
<rect x="10" y="560" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/preprocessing.html" target="_top">
<text x="140" y="580" text-anchor="middle" class="header">Preprocessing / feature extraction</text>
</a>
<a xlink:href="../user/core/normalizing_labels.html" target="_top">
<text x="140" y="615" text-anchor="middle">Normalizing labels</text>
</a>
<a xlink:href="../user/core/split.html" target="_top">
<text x="140" y="630" text-anchor="middle">Dataset splitting</text>
</a>
</g>
<line x1="140" y1="660" x2="140" y2="690" />
<line x1="140" y1="690" x2="130" y2="680" />
<line x1="140" y1="690" x2="150" y2="680" />
<g class="pipeline_elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="10" y="690" rx="20" ry="20" width="260" height="100" />
<text x="140" y="710" text-anchor="middle" class="header">Transformations</text>
</a>
<a xlink:href="../user/methods/amf.html" target="_top">
<text x="50" y="740" text-anchor="middle">AMF</text>
</a>
<a xlink:href="../user/methods/local_coordinate_coding.html" target="_top">
<text x="170" y="740" text-anchor="middle">LocalCoordinateCoding</text>
</a>
<a xlink:href="../user/methods/lmnn.html" target="_top">
<text x="50" y="755" text-anchor="middle">LMNN</text>
</a>
<a xlink:href="../user/methods/nca.html" target="_top">
<text x="120" y="755" text-anchor="middle">NCA</text>
</a>
<a xlink:href="../user/methods/nmf.html" target="_top">
<text x="210" y="755" text-anchor="middle">NMF</text>
</a>
<a xlink:href="../user/methods/pca.html" target="_top">
<text x="50" y="770" text-anchor="middle">PCA</text>
</a>
<a xlink:href="../user/methods/radical.html" target="_top">
<text x="120" y="770" text-anchor="middle">RADICAL</text>
</a>
<a xlink:href="../user/methods/sparse_coding.html" target="_top">
<text x="210" y="770" text-anchor="middle">SparseCoding</text>
</a>
</g>
<line x1="140" y1="790" x2="140" y2="820" />
<line x1="140" y1="820" x2="130" y2="810" />
<line x1="140" y1="820" x2="150" y2="810" />
<g class="pipeline_elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="10" y="820" rx="20" ry="20" width="260" height="100" />
<text x="140" y="840" text-anchor="middle" class="header">Modeling</text>
</a>
<a xlink:href="../user/modeling.html#classification" target="_top">
<text x="140" y="865" text-anchor="middle">Classification</text>
</a>
<a xlink:href="../user/modeling.html#regression" target="_top">
<text x="140" y="880" text-anchor="middle">Regression</text>
</a>
<a xlink:href="../user/modeling.html#clustering" target="_top">
<text x="140" y="895" text-anchor="middle">Clustering</text>
</a>
<a xlink:href="../user/modeling.html#geometric-algorithms" target="_top">
<text x="140" y="910" text-anchor="middle">Geometric algorithms</text>
</a>
</g>
<line x1="140" y1="920" x2="140" y2="950" />
<line x1="140" y1="950" x2="130" y2="940" />
<line x1="140" y1="950" x2="150" y2="940" />
<g class="pipeline_elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="10" y="950" rx="20" ry="20" width="260" height="100" />
<text x="140" y="970" text-anchor="middle" class="header">Evaluation</text>
</a>
<!-- TODO: metrics? -->
<a xlink:href="../user/cv.html" target="_top">
<text x="140" y="1005" text-anchor="middle">Cross-validation</text>
</a>
<a xlink:href="../user/hpt.html" target="_top">
<text x="140" y="1020" text-anchor="middle">Hyperparameter tuning</text>
</a>
</g>
<line x1="140" y1="1050" x2="140" y2="1080" />
<line x1="140" y1="1080" x2="130" y2="1070" />
<line x1="140" y1="1080" x2="150" y2="1070" />
<g class="pipeline_elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="10" y="1080" rx="20" ry="20" width="260" height="100" />
<text x="140" y="1100" text-anchor="middle" class="header">Deployment</text>
</a>
<a xlink:href="../user/compile.html" target="_top">
<text x="140" y="1130" text-anchor="middle">Compile an mlpack program</text>
</a>
<!--
<text x="140" y="1145" text-anchor="middle">Deploy to a Docker container</text>
-->
<a xlink:href="../embedded/crosscompile_armv7.html" target="_top">
<text x="140" y="1145" text-anchor="middle">Cross-compile to a Raspberry
Pi </text>
<a xlink:href="../user/deploy_windows.html" target="_top">
<text x="140" y="1160" text-anchor="middle">Deploy mlpack on Windows</text>
</a>
</a>
</g>
</g>
<line x1="20" y1="1200" x2="260" y2="1200" style="stroke:black;stroke-dasharray:4;stroke-width:4;" />
<!-- final pieces -->
<g class="bottom">
<g class="elem">
<a xlink:href="../user/bindings.html" target="_top">
<rect x="10" y="1220" rx="20" ry="20" width="260" height="100" />
<text x="140" y="1240" text-anchor="middle" class="header">Bindings</text>
</a>
<a xlink:href="../bindings/python.html" target="_top">
<image x="45" y="1253" width="15" height="15" href="python.svg" />
<text x="90" y="1265" text-anchor="middle">Python</text>
</a>
<a xlink:href="../bindings/julia.html" target="_top">
<image x="215" y="1253" width="15" height="15" href="julia.svg" />
<text x="190" y="1265" text-anchor="middle">Julia</text>
</a>
<a xlink:href="../bindings/cli.html" target="_top">
<image x="45" y="1268" width="15" height="15" href="terminal.svg" />
<text x="90" y="1280" text-anchor="middle">CLI</text>
</a>
<a xlink:href="../bindings/r.html" target="_top">
<image x="215" y="1268" width="15" height="15" href="r.svg" />
<text x="190" y="1280" text-anchor="middle">R</text>
</a>
<a xlink:href="../bindings/go.html" target="_top">
<image x="45" y="1283" width="15" height="15" href="gopher.svg" />
<text x="90" y="1295" text-anchor="middle">Go</text>
</a>
</g>
<g class="elem">
<a xlink:href="../developer/developers.html" target="_top">
<rect x="10" y="1330" rx="20" ry="20" width="260" height="100" />
<text x="140" y="1350" text-anchor="middle" class="header">Developer documentation</text>
</a>
<a xlink:href="../developer/community.html" target="_top">
<text x="80" y="1375" text-anchor="middle">Community</text>
</a>
<a xlink:href="../developer/gsoc.html" target="_top">
<text x="200" y="1375" text-anchor="middle">GSoC</text>
</a>
<a xlink:href="../developer/ci.html" target="_top">
<text x="80" y="1390" text-anchor="middle">CI/CD</text>
</a>
<a xlink:href="../developer/timer.html" target="_top">
<text x="200" y="1390" text-anchor="middle">Timing</text>
</a>
<a xlink:href="../developer/bindings.html" target="_top">
<text x="80" y="1405" text-anchor="middle">Binding system</text>
</a>
<a xlink:href="../developer/iodoc.html" target="_top">
<text x="200" y="1405" text-anchor="middle">Writing a binding</text>
</a>
<a xlink:href="../developer/template_policies.html" target="_top">
<text x="140" y="1420" text-anchor="middle">Template policies</text>
</a>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

+81
View File
@@ -0,0 +1,81 @@
<svg width="860" height="75" viewBox="0 0 860 75" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #bbb; stroke: black; stroke-width: 1.5; }
g.elem a:hover rect { fill: #ddd; }
g.elem_active rect { fill: #fff; stroke: black; stroke-width: 1.5; }
g.elem_active text { fill: #333; }
line { stroke: black; stroke-width: 1.5; }
text { font-family: Helvetica, arial, sans-serif; font-size: 85%; fill: #0366b6; font-weight: bold; };
a text:hover { text-decoration: underline; }
</style>
<!-- Header -->
<line x1="25" y1="5" x2="300" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="25" y1="5" x2="25" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<text x="430" y="10" text-anchor="middle" style="fill: #333">The Data Science Pipeline with mlpack</text>
<line x1="570" y1="5" x2="845" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="845" y1="5" x2="845" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<!-- Data loading and I/O (active) -->
<g class="elem_active">
<rect x="25" y="20" rx="10" ry="10" width="120" height="40" />
<text x="85" y="37" text-anchor="middle">Data loading</text>
<text x="85" y="52" text-anchor="middle">and I/O</text>
</g>
<line x1="145" y1="40" x2="164" y2="40" />
<line x1="164" y1="40" x2="159" y2="35" />
<line x1="164" y1="40" x2="159" y2="45" />
<g class="elem">
<a xlink:href="../user/preprocessing.html" target="_top">
<rect x="165" y="20" rx="10" ry="10" width="120" height="40" />
<text x="225" y="37" text-anchor="middle">Preprocessing /</text>
<text x="225" y="52" text-anchor="middle">feature extraction</text>
</a>
</g>
<line x1="285" y1="40" x2="304" y2="40" />
<line x1="304" y1="40" x2="299" y2="35" />
<line x1="304" y1="40" x2="299" y2="45" />
<g class="elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="305" y="20" rx="10" ry="10" width="120" height="40" />
<text x="365" y="44" text-anchor="middle">Transformations</text>
</a>
</g>
<line x1="425" y1="40" x2="444" y2="40" />
<line x1="444" y1="40" x2="439" y2="35" />
<line x1="444" y1="40" x2="439" y2="45" />
<g class="elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="445" y="20" rx="10" ry="10" width="120" height="40" />
<text x="505" y="44" text-anchor="middle">Modeling</text>
</a>
</g>
<line x1="565" y1="40" x2="584" y2="40" />
<line x1="584" y1="40" x2="579" y2="35" />
<line x1="584" y1="40" x2="579" y2="45" />
<g class="elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="585" y="20" rx="10" ry="10" width="120" height="40" />
<text x="645" y="44" text-anchor="middle">Evaluation</text>
</a>
</g>
<line x1="705" y1="40" x2="724" y2="40" />
<line x1="724" y1="40" x2="719" y2="35" />
<line x1="724" y1="40" x2="719" y2="45" />
<g class="elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="725" y="20" rx="10" ry="10" width="120" height="40" />
<text x="785" y="44" text-anchor="middle">Deployment</text>
</a>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+81
View File
@@ -0,0 +1,81 @@
<svg width="860" height="75" viewBox="0 0 860 75" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #bbb; stroke: black; stroke-width: 1.5; }
g.elem a:hover rect { fill: #ddd; }
g.elem_active rect { fill: #fff; stroke: black; stroke-width: 1.5; }
g.elem_active text { fill: #333; }
line { stroke: black; stroke-width: 1.5; }
text { font-family: Helvetica, arial, sans-serif; font-size: 85%; fill: #0366b6; font-weight: bold; };
a text:hover { text-decoration: underline; }
</style>
<!-- Header -->
<line x1="25" y1="5" x2="300" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="25" y1="5" x2="25" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<text x="430" y="10" text-anchor="middle" style="fill: #333">The Data Science Pipeline with mlpack</text>
<line x1="570" y1="5" x2="845" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="845" y1="5" x2="845" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<!-- Data loading and I/O (active) -->
<g class="elem">
<a xlink:href="../user/load_save.html" target="_top">
<rect x="25" y="20" rx="10" ry="10" width="120" height="40" />
<text x="85" y="37" text-anchor="middle">Data loading</text>
<text x="85" y="52" text-anchor="middle">and I/O</text>
</a>
</g>
<line x1="145" y1="40" x2="164" y2="40" />
<line x1="164" y1="40" x2="159" y2="35" />
<line x1="164" y1="40" x2="159" y2="45" />
<g class="elem_active">
<rect x="165" y="20" rx="10" ry="10" width="120" height="40" />
<text x="225" y="37" text-anchor="middle">Preprocessing /</text>
<text x="225" y="52" text-anchor="middle">feature extraction</text>
</g>
<line x1="285" y1="40" x2="304" y2="40" />
<line x1="304" y1="40" x2="299" y2="35" />
<line x1="304" y1="40" x2="299" y2="45" />
<g class="elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="305" y="20" rx="10" ry="10" width="120" height="40" />
<text x="365" y="44" text-anchor="middle">Transformations</text>
</a>
</g>
<line x1="425" y1="40" x2="444" y2="40" />
<line x1="444" y1="40" x2="439" y2="35" />
<line x1="444" y1="40" x2="439" y2="45" />
<g class="elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="445" y="20" rx="10" ry="10" width="120" height="40" />
<text x="505" y="44" text-anchor="middle">Modeling</text>
</a>
</g>
<line x1="565" y1="40" x2="584" y2="40" />
<line x1="584" y1="40" x2="579" y2="35" />
<line x1="584" y1="40" x2="579" y2="45" />
<g class="elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="585" y="20" rx="10" ry="10" width="120" height="40" />
<text x="645" y="44" text-anchor="middle">Evaluation</text>
</a>
</g>
<line x1="705" y1="40" x2="724" y2="40" />
<line x1="724" y1="40" x2="719" y2="35" />
<line x1="724" y1="40" x2="719" y2="45" />
<g class="elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="725" y="20" rx="10" ry="10" width="120" height="40" />
<text x="785" y="44" text-anchor="middle">Deployment</text>
</a>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+81
View File
@@ -0,0 +1,81 @@
<svg width="860" height="75" viewBox="0 0 860 75" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #bbb; stroke: black; stroke-width: 1.5; }
g.elem a:hover rect { fill: #ddd; }
g.elem_active rect { fill: #fff; stroke: black; stroke-width: 1.5; }
g.elem_active text { fill: #333; }
line { stroke: black; stroke-width: 1.5; }
text { font-family: Helvetica, arial, sans-serif; font-size: 85%; fill: #0366b6; font-weight: bold; };
a text:hover { text-decoration: underline; }
</style>
<!-- Header -->
<line x1="25" y1="5" x2="300" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="25" y1="5" x2="25" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<text x="430" y="10" text-anchor="middle" style="fill: #333">The Data Science Pipeline with mlpack</text>
<line x1="570" y1="5" x2="845" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="845" y1="5" x2="845" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<!-- Data loading and I/O (active) -->
<g class="elem">
<a xlink:href="../user/load_save.html" target="_top">
<rect x="25" y="20" rx="10" ry="10" width="120" height="40" />
<text x="85" y="37" text-anchor="middle">Data loading</text>
<text x="85" y="52" text-anchor="middle">and I/O</text>
</a>
</g>
<line x1="145" y1="40" x2="164" y2="40" />
<line x1="164" y1="40" x2="159" y2="35" />
<line x1="164" y1="40" x2="159" y2="45" />
<g class="elem">
<a xlink:href="../user/preprocessing.html" target="_top">
<rect x="165" y="20" rx="10" ry="10" width="120" height="40" />
<text x="225" y="37" text-anchor="middle">Preprocessing /</text>
<text x="225" y="52" text-anchor="middle">feature extraction</text>
</a>
</g>
<line x1="285" y1="40" x2="304" y2="40" />
<line x1="304" y1="40" x2="299" y2="35" />
<line x1="304" y1="40" x2="299" y2="45" />
<g class="elem_active">
<rect x="305" y="20" rx="10" ry="10" width="120" height="40" />
<text x="365" y="44" text-anchor="middle">Transformations</text>
</g>
<line x1="425" y1="40" x2="444" y2="40" />
<line x1="444" y1="40" x2="439" y2="35" />
<line x1="444" y1="40" x2="439" y2="45" />
<g class="elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="445" y="20" rx="10" ry="10" width="120" height="40" />
<text x="505" y="44" text-anchor="middle">Modeling</text>
</a>
</g>
<line x1="565" y1="40" x2="584" y2="40" />
<line x1="584" y1="40" x2="579" y2="35" />
<line x1="584" y1="40" x2="579" y2="45" />
<g class="elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="585" y="20" rx="10" ry="10" width="120" height="40" />
<text x="645" y="44" text-anchor="middle">Evaluation</text>
</a>
</g>
<line x1="705" y1="40" x2="724" y2="40" />
<line x1="724" y1="40" x2="719" y2="35" />
<line x1="724" y1="40" x2="719" y2="45" />
<g class="elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="725" y="20" rx="10" ry="10" width="120" height="40" />
<text x="785" y="44" text-anchor="middle">Deployment</text>
</a>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+81
View File
@@ -0,0 +1,81 @@
<svg width="860" height="75" viewBox="0 0 860 75" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #bbb; stroke: black; stroke-width: 1.5; }
g.elem a:hover rect { fill: #ddd; }
g.elem_active rect { fill: #fff; stroke: black; stroke-width: 1.5; }
g.elem_active text { fill: #333; }
line { stroke: black; stroke-width: 1.5; }
text { font-family: Helvetica, arial, sans-serif; font-size: 85%; fill: #0366b6; font-weight: bold; };
a text:hover { text-decoration: underline; }
</style>
<!-- Header -->
<line x1="25" y1="5" x2="300" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="25" y1="5" x2="25" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<text x="430" y="10" text-anchor="middle" style="fill: #333">The Data Science Pipeline with mlpack</text>
<line x1="570" y1="5" x2="845" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="845" y1="5" x2="845" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<!-- Data loading and I/O (active) -->
<g class="elem">
<a xlink:href="../user/load_save.html" target="_top">
<rect x="25" y="20" rx="10" ry="10" width="120" height="40" />
<text x="85" y="37" text-anchor="middle">Data loading</text>
<text x="85" y="52" text-anchor="middle">and I/O</text>
</a>
</g>
<line x1="145" y1="40" x2="164" y2="40" />
<line x1="164" y1="40" x2="159" y2="35" />
<line x1="164" y1="40" x2="159" y2="45" />
<g class="elem">
<a xlink:href="../user/preprocessing.html" target="_top">
<rect x="165" y="20" rx="10" ry="10" width="120" height="40" />
<text x="225" y="37" text-anchor="middle">Preprocessing /</text>
<text x="225" y="52" text-anchor="middle">feature extraction</text>
</a>
</g>
<line x1="285" y1="40" x2="304" y2="40" />
<line x1="304" y1="40" x2="299" y2="35" />
<line x1="304" y1="40" x2="299" y2="45" />
<g class="elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="305" y="20" rx="10" ry="10" width="120" height="40" />
<text x="365" y="44" text-anchor="middle">Transformations</text>
</a>
</g>
<line x1="425" y1="40" x2="444" y2="40" />
<line x1="444" y1="40" x2="439" y2="35" />
<line x1="444" y1="40" x2="439" y2="45" />
<g class="elem_active">
<rect x="445" y="20" rx="10" ry="10" width="120" height="40" />
<text x="505" y="44" text-anchor="middle">Modeling</text>
</g>
<line x1="565" y1="40" x2="584" y2="40" />
<line x1="584" y1="40" x2="579" y2="35" />
<line x1="584" y1="40" x2="579" y2="45" />
<g class="elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="585" y="20" rx="10" ry="10" width="120" height="40" />
<text x="645" y="44" text-anchor="middle">Evaluation</text>
</a>
</g>
<line x1="705" y1="40" x2="724" y2="40" />
<line x1="724" y1="40" x2="719" y2="35" />
<line x1="724" y1="40" x2="719" y2="45" />
<g class="elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="725" y="20" rx="10" ry="10" width="120" height="40" />
<text x="785" y="44" text-anchor="middle">Deployment</text>
</a>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+81
View File
@@ -0,0 +1,81 @@
<svg width="860" height="75" viewBox="0 0 860 75" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #bbb; stroke: black; stroke-width: 1.5; }
g.elem a:hover rect { fill: #ddd; }
g.elem_active rect { fill: #fff; stroke: black; stroke-width: 1.5; }
g.elem_active text { fill: #333; }
line { stroke: black; stroke-width: 1.5; }
text { font-family: Helvetica, arial, sans-serif; font-size: 85%; fill: #0366b6; font-weight: bold; };
a text:hover { text-decoration: underline; }
</style>
<!-- Header -->
<line x1="25" y1="5" x2="300" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="25" y1="5" x2="25" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<text x="430" y="10" text-anchor="middle" style="fill: #333">The Data Science Pipeline with mlpack</text>
<line x1="570" y1="5" x2="845" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="845" y1="5" x2="845" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<!-- Data loading and I/O (active) -->
<g class="elem">
<a xlink:href="../user/load_save.html" target="_top">
<rect x="25" y="20" rx="10" ry="10" width="120" height="40" />
<text x="85" y="37" text-anchor="middle">Data loading</text>
<text x="85" y="52" text-anchor="middle">and I/O</text>
</a>
</g>
<line x1="145" y1="40" x2="164" y2="40" />
<line x1="164" y1="40" x2="159" y2="35" />
<line x1="164" y1="40" x2="159" y2="45" />
<g class="elem">
<a xlink:href="../user/preprocessing.html" target="_top">
<rect x="165" y="20" rx="10" ry="10" width="120" height="40" />
<text x="225" y="37" text-anchor="middle">Preprocessing /</text>
<text x="225" y="52" text-anchor="middle">feature extraction</text>
</a>
</g>
<line x1="285" y1="40" x2="304" y2="40" />
<line x1="304" y1="40" x2="299" y2="35" />
<line x1="304" y1="40" x2="299" y2="45" />
<g class="elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="305" y="20" rx="10" ry="10" width="120" height="40" />
<text x="365" y="44" text-anchor="middle">Transformations</text>
</a>
</g>
<line x1="425" y1="40" x2="444" y2="40" />
<line x1="444" y1="40" x2="439" y2="35" />
<line x1="444" y1="40" x2="439" y2="45" />
<g class="elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="445" y="20" rx="10" ry="10" width="120" height="40" />
<text x="505" y="44" text-anchor="middle">Modeling</text>
</a>
</g>
<line x1="565" y1="40" x2="584" y2="40" />
<line x1="584" y1="40" x2="579" y2="35" />
<line x1="584" y1="40" x2="579" y2="45" />
<g class="elem_active">
<rect x="585" y="20" rx="10" ry="10" width="120" height="40" />
<text x="645" y="44" text-anchor="middle">Evaluation</text>
</g>
<line x1="705" y1="40" x2="724" y2="40" />
<line x1="724" y1="40" x2="719" y2="35" />
<line x1="724" y1="40" x2="719" y2="45" />
<g class="elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="725" y="20" rx="10" ry="10" width="120" height="40" />
<text x="785" y="44" text-anchor="middle">Deployment</text>
</a>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+81
View File
@@ -0,0 +1,81 @@
<svg width="860" height="75" viewBox="0 0 860 75" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #bbb; stroke: black; stroke-width: 1.5; }
g.elem a:hover rect { fill: #ddd; }
g.elem_active rect { fill: #fff; stroke: black; stroke-width: 1.5; }
g.elem_active text { fill: #333; }
line { stroke: black; stroke-width: 1.5; }
text { font-family: Helvetica, arial, sans-serif; font-size: 85%; fill: #0366b6; font-weight: bold; };
a text:hover { text-decoration: underline; }
</style>
<!-- Header -->
<line x1="25" y1="5" x2="300" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="25" y1="5" x2="25" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<text x="430" y="10" text-anchor="middle" style="fill: #333">The Data Science Pipeline with mlpack</text>
<line x1="570" y1="5" x2="845" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="845" y1="5" x2="845" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<!-- Data loading and I/O (active) -->
<g class="elem">
<a xlink:href="../user/load_save.html" target="_top">
<rect x="25" y="20" rx="10" ry="10" width="120" height="40" />
<text x="85" y="37" text-anchor="middle">Data loading</text>
<text x="85" y="52" text-anchor="middle">and I/O</text>
</a>
</g>
<line x1="145" y1="40" x2="164" y2="40" />
<line x1="164" y1="40" x2="159" y2="35" />
<line x1="164" y1="40" x2="159" y2="45" />
<g class="elem">
<a xlink:href="../user/preprocessing.html" target="_top">
<rect x="165" y="20" rx="10" ry="10" width="120" height="40" />
<text x="225" y="37" text-anchor="middle">Preprocessing /</text>
<text x="225" y="52" text-anchor="middle">feature extraction</text>
</a>
</g>
<line x1="285" y1="40" x2="304" y2="40" />
<line x1="304" y1="40" x2="299" y2="35" />
<line x1="304" y1="40" x2="299" y2="45" />
<g class="elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="305" y="20" rx="10" ry="10" width="120" height="40" />
<text x="365" y="44" text-anchor="middle">Transformations</text>
</a>
</g>
<line x1="425" y1="40" x2="444" y2="40" />
<line x1="444" y1="40" x2="439" y2="35" />
<line x1="444" y1="40" x2="439" y2="45" />
<g class="elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="445" y="20" rx="10" ry="10" width="120" height="40" />
<text x="505" y="44" text-anchor="middle">Modeling</text>
</a>
</g>
<line x1="565" y1="40" x2="584" y2="40" />
<line x1="584" y1="40" x2="579" y2="35" />
<line x1="584" y1="40" x2="579" y2="45" />
<g class="elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="585" y="20" rx="10" ry="10" width="120" height="40" />
<text x="645" y="44" text-anchor="middle">Evaluation</text>
</a>
</g>
<line x1="705" y1="40" x2="724" y2="40" />
<line x1="724" y1="40" x2="719" y2="35" />
<line x1="724" y1="40" x2="719" y2="45" />
<g class="elem_active">
<rect x="725" y="20" rx="10" ry="10" width="120" height="40" />
<text x="785" y="44" text-anchor="middle">Deployment</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+83
View File
@@ -0,0 +1,83 @@
<svg width="860" height="75" viewBox="0 0 860 75" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #bbb; stroke: black; stroke-width: 1.5; }
g.elem a:hover rect { fill: #ddd; }
g.elem_active rect { fill: #fff; stroke: black; stroke-width: 1.5; }
g.elem_active text { fill: #333; }
line { stroke: black; stroke-width: 1.5; }
text { font-family: Helvetica, arial, sans-serif; font-size: 85%; fill: #0366b6; font-weight: bold; };
a text:hover { text-decoration: underline; }
</style>
<!-- Header -->
<line x1="25" y1="5" x2="300" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="25" y1="5" x2="25" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<text x="430" y="10" text-anchor="middle" style="fill: #333">The Data Science Pipeline with mlpack</text>
<line x1="570" y1="5" x2="845" y2="5" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<line x1="845" y1="5" x2="845" y2="15" style="stroke:black;stroke-dasharray:6;stroke-width:1;" />
<!-- Data loading and I/O (active) -->
<g class="elem">
<a xlink:href="../user/load_save.html" target="_top">
<rect x="25" y="20" rx="10" ry="10" width="120" height="40" />
<text x="85" y="37" text-anchor="middle">Data loading</text>
<text x="85" y="52" text-anchor="middle">and I/O</text>
</a>
</g>
<line x1="145" y1="40" x2="164" y2="40" />
<line x1="164" y1="40" x2="159" y2="35" />
<line x1="164" y1="40" x2="159" y2="45" />
<g class="elem">
<a xlink:href="../user/preprocessing.html" target="_top">
<rect x="165" y="20" rx="10" ry="10" width="120" height="40" />
<text x="225" y="37" text-anchor="middle">Preprocessing /</text>
<text x="225" y="52" text-anchor="middle">feature extraction</text>
</a>
</g>
<line x1="285" y1="40" x2="304" y2="40" />
<line x1="304" y1="40" x2="299" y2="35" />
<line x1="304" y1="40" x2="299" y2="45" />
<g class="elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="305" y="20" rx="10" ry="10" width="120" height="40" />
<text x="365" y="44" text-anchor="middle">Transformations</text>
</a>
</g>
<line x1="425" y1="40" x2="444" y2="40" />
<line x1="444" y1="40" x2="439" y2="35" />
<line x1="444" y1="40" x2="439" y2="45" />
<g class="elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="445" y="20" rx="10" ry="10" width="120" height="40" />
<text x="505" y="44" text-anchor="middle">Modeling</text>
</a>
</g>
<line x1="565" y1="40" x2="584" y2="40" />
<line x1="584" y1="40" x2="579" y2="35" />
<line x1="584" y1="40" x2="579" y2="45" />
<g class="elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="585" y="20" rx="10" ry="10" width="120" height="40" />
<text x="645" y="44" text-anchor="middle">Evaluation</text>
</a>
</g>
<line x1="705" y1="40" x2="724" y2="40" />
<line x1="724" y1="40" x2="719" y2="35" />
<line x1="724" y1="40" x2="719" y2="45" />
<g class="elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="725" y="20" rx="10" ry="10" width="120" height="40" />
<text x="785" y="44" text-anchor="middle">Deployment</text>
</a>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

+290
View File
@@ -0,0 +1,290 @@
<svg width="860" height="582" viewBox="0 0 860 582" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
g.elem rect { fill: #aaa; stroke: black; stroke-width: 1.5; }
g.elem:hover rect { fill: #ccc; }
g.pipeline_elem rect { fill: #ddd; stroke: black; stroke-width: 1.5; }
g.pipeline_elem:hover rect { fill: #fff; }
line { stroke: black; stroke-width: 1.5; }
a text { fill: #0366b6; }
a text:hover { text-decoration: underline; }
text.header { font-weight: bold; }
a text.header { fill: #031676; }
text { font-family: Helvetica, arial, sans-serif; font-size: 14px;
fill: #333; }
</style>
<!-- Prerequisites -->
<g class="elem">
<rect x="10" y="10" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/prerequisites.html" target="_top">
<text x="140" y="30" text-anchor="middle" class="header">Prerequisites</text>
</a>
<a xlink:href="../user/install.html" target="_top">
<text x="140" y="55" text-anchor="middle">Installing mlpack</text>
</a>
<a xlink:href="../embedded/supported_boards.html" target="_top">
<text x="140" y="70" text-anchor="middle">Cross-compilation setup</text>
</a>
<a xlink:href="../quickstart/cpp.html" target="_top">
<text x="140" y="85" text-anchor="middle">Quickstart</text>
</a>
<a xlink:href="../user/matrices.html" target="_top">
<text x="140" y="100" text-anchor="middle">Matrices and data</text>
</a>
</g>
<!-- Tutorials and Examples -->
<g class="elem">
<rect x="300" y="10" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/tutorials.html" target="_top">
<text x="430" y="30" text-anchor="middle" class="header">Tutorials and Examples</text>
</a>
<a xlink:href="https://github.com/mlpack/examples" target="_top">
<image x="320" y="49" width="14" height="14" href="github.svg" />
<text x="430" y="61" text-anchor="middle">mlpack examples repository</text>
</a>
<a xlink:href="https://www.youtube.com/@mlpack/videos" target="_top">
<image x="320" y="66" width="15" height="15" href="youtube.svg" />
<text x="430" y="79" text-anchor="middle">mlpack Youtube channel</text>
</a>
<a xlink:href="https://github.com/mlpack/models" target="_top">
<image x="320" y="85" width="14" height="14" href="github.svg" />
<text x="430" y="97" text-anchor="middle">mlpack models repository</text>
</a>
</g>
<!-- Utility classes -->
<g class="elem">
<a xlink:href="../user/core.html" target="_top">
<rect x="590" y="10" rx="20" ry="20" width="260" height="100" />
<text x="720" y="30" text-anchor="middle" class="header">Utility Classes</text>
<text x="660" y="62" text-anchor="middle">Math</text>
<text x="780" y="62" text-anchor="middle">Distances</text>
<text x="660" y="80" text-anchor="middle">Distributions</text>
<text x="780" y="80" text-anchor="middle">Kernels</text>
<!-- TODO: add metrics -->
<text x="720" y="98" text-anchor="middle">Trees</text>
</a>
</g>
<line x1="30" y1="130" x2="830" y2="130" style="stroke:black;stroke-dasharray:4;stroke-width:4" />
<text x="430" y="155" text-anchor="middle" style="font-weight:bold;font-size:125%">The Data Science Pipeline with mlpack</text>
<!-- The pipeline -->
<g class="pipeline">
<!-- Data loading and I/O -->
<g class="pipeline_elem">
<rect x="10" y="170" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/load_save.html" target="_top">
<text x="140" y="190" text-anchor="middle" class="header">Data loading and I/O</text>
</a>
<a xlink:href="../user/load_save.html#numeric-data" target="_top">
<text x="140" y="215" text-anchor="middle">Numeric data</text>
</a>
<a xlink:href="../user/load_save.html#mixed-categorical-data" target="_top">
<text x="140" y="230" text-anchor="middle">Mixed categorical data</text>
</a>
<a xlink:href="../user/load_save.html#image-data" target="_top">
<text x="140" y="245" text-anchor="middle">Image data</text>
</a>
<a xlink:href="../user/load_save.html#mlpack-objects" target="_top">
<text x="140" y="260" text-anchor="middle">mlpack models and objects</text>
</a>
</g>
<line x1="270" y1="220" x2="300" y2="220" />
<line x1="298" y1="220" x2="288" y2="210" />
<line x1="298" y1="220" x2="288" y2="230" />
<!-- Preprocessing / feature extraction -->
<g class="pipeline_elem">
<rect x="300" y="170" rx="20" ry="20" width="260" height="100" />
<a xlink:href="../user/preprocessing.html" target="_top">
<text x="430" y="190" text-anchor="middle" class="header">Preprocessing / feature extraction</text>
</a>
<a xlink:href="../user/core/normalizing_labels.html" target="_top">
<text x="430" y="215" text-anchor="middle">Normalizing labels</text>
</a>
<a xlink:href="../user/core/split.html" target="_top">
<text x="430" y="230" text-anchor="middle">Dataset splitting</text>
</a>
</g>
<line x1="560" y1="220" x2="590" y2="220" />
<line x1="588" y1="220" x2="578" y2="210" />
<line x1="588" y1="220" x2="578" y2="230" />
<g class="pipeline_elem">
<a xlink:href="../user/transformations.html" target="_top">
<rect x="590" y="170" rx="20" ry="20" width="260" height="100" />
<text x="720" y="190" text-anchor="middle" class="header">Transformations</text>
</a>
<a xlink:href="../user/methods/amf.html" target="_top">
<text x="630" y="215" text-anchor="middle">AMF</text>
</a>
<a xlink:href="../user/methods/local_coordinate_coding.html" target="_top">
<text x="750" y="215" text-anchor="middle">LocalCoordinateCoding</text>
</a>
<a xlink:href="../user/methods/lmnn.html" target="_top">
<text x="630" y="230" text-anchor="middle">LMNN</text>
</a>
<a xlink:href="../user/methods/nca.html" target="_top">
<text x="700" y="230" text-anchor="middle">NCA</text>
</a>
<a xlink:href="../user/methods/nmf.html" target="_top">
<text x="790" y="230" text-anchor="middle">NMF</text>
</a>
<a xlink:href="../user/methods/pca.html" target="_top">
<text x="630" y="245" text-anchor="middle">PCA</text>
</a>
<a xlink:href="../user/methods/radical.html" target="_top">
<text x="700" y="245" text-anchor="middle">RADICAL</text>
</a>
<a xlink:href="../user/methods/sparse_coding.html" target="_top">
<text x="790" y="245" text-anchor="middle">SparseCoding</text>
</a>
</g>
<line x1="720" y1="270" x2="720" y2="295" />
<line x1="720" y1="295" x2="140" y2="295" />
<line x1="140" y1="295" x2="140" y2="320" />
<line x1="140" y1="318" x2="130" y2="308" />
<line x1="140" y1="318" x2="150" y2="308" />
<g class="pipeline_elem">
<a xlink:href="../user/modeling.html" target="_top">
<rect x="10" y="320" rx="20" ry="20" width="260" height="100" />
<text x="140" y="340" text-anchor="middle" class="header">Modeling</text>
</a>
<a xlink:href="../user/modeling.html#classification" target="_top">
<text x="140" y="365" text-anchor="middle">Classification</text>
</a>
<a xlink:href="../user/modeling.html#regression" target="_top">
<text x="140" y="380" text-anchor="middle">Regression</text>
</a>
<a xlink:href="../user/modeling.html#clustering" target="_top">
<text x="140" y="395" text-anchor="middle">Clustering</text>
</a>
<a xlink:href="../user/modeling.html#geometric-algorithms" target="_top">
<text x="140" y="410" text-anchor="middle">Geometric algorithms</text>
</a>
</g>
<line x1="270" y1="370" x2="300" y2="370" />
<line x1="298" y1="370" x2="288" y2="360" />
<line x1="298" y1="370" x2="288" y2="380" />
<g class="pipeline_elem">
<a xlink:href="../user/evaluation.html" target="_top">
<rect x="300" y="320" rx="20" ry="20" width="260" height="100" />
<text x="430" y="340" text-anchor="middle" class="header">Evaluation</text>
</a>
<!-- TODO: metrics? -->
<a xlink:href="../user/cv.html" target="_top">
<text x="430" y="365" text-anchor="middle">Cross-validation</text>
</a>
<a xlink:href="../user/hpt.html" target="_top">
<text x="430" y="380" text-anchor="middle">Hyperparameter tuning</text>
</a>
</g>
<line x1="560" y1="370" x2="590" y2="370" />
<line x1="588" y1="370" x2="578" y2="360" />
<line x1="588" y1="370" x2="578" y2="380" />
<g class="pipeline_elem">
<a xlink:href="../user/deployment.html" target="_top">
<rect x="590" y="320" rx="20" ry="20" width="260" height="100" />
<text x="720" y="340" text-anchor="middle" class="header">Deployment</text>
</a>
<a xlink:href="../user/compile.html" target="_top">
<text x="720" y="365" text-anchor="middle">Compile an mlpack program</text>
</a>
<!--
<a xlink:href="../user/deploy_docker.html" target="_top">
<text x="720" y="380" text-anchor="middle">Deploy to a Docker container</text>
</a>
-->
<a xlink:href="../embedded/crosscompile_armv7.html" target="_top">
<text x="720" y="380" text-anchor="middle">Cross-compile to a Raspberry
Pi</text>
</a>
<a xlink:href="../user/deploy_windows.html" target="_top">
<text x="720" y="395" text-anchor="middle">Deploy mlpack on Windows</text>
</a>
</g>
</g>
<line x1="30" y1="450" x2="830" y2="450" style="stroke:black;stroke-dasharray:4;stroke-width:4;" />
<!-- final pieces -->
<g class="bottom">
<g class="elem">
<a xlink:href="../user/bindings.html" target="_top">
<rect x="155" y="480" rx="20" ry="20" width="260" height="100" />
<text x="285" y="500" text-anchor="middle" class="header">Bindings</text>
</a>
<a xlink:href="../bindings/python.html" target="_top">
<image x="190" y="513" width="15" height="15" href="python.svg" />
<text x="235" y="525" text-anchor="middle">Python</text>
</a>
<a xlink:href="../bindings/julia.html" target="_top">
<image x="360" y="513" width="15" height="15" href="julia.svg" />
<text x="335" y="525" text-anchor="middle">Julia</text>
</a>
<a xlink:href="../bindings/cli.html" target="_top">
<image x="190" y="528" width="15" height="15" href="terminal.svg" />
<text x="235" y="540" text-anchor="middle">CLI</text>
</a>
<a xlink:href="../bindings/r.html" target="_top">
<image x="360" y="528" width="15" height="15" href="r.svg" />
<text x="335" y="540" text-anchor="middle">R</text>
</a>
<a xlink:href="../bindings/go.html" target="_top">
<image x="190" y="543" width="15" height="15" href="gopher.svg" />
<text x="235" y="555" text-anchor="middle">Go</text>
</a>
</g>
<g class="elem">
<a xlink:href="../developer/developers.html" target="_top">
<rect x="445" y="480" rx="20" ry="20" width="260" height="100" />
<text x="575" y="500" text-anchor="middle" class="header">Developer documentation</text>
</a>
<a xlink:href="../developer/community.html" target="_top">
<text x="515" y="525" text-anchor="middle">Community</text>
</a>
<a xlink:href="../developer/gsoc.html" target="_top">
<text x="635" y="525" text-anchor="middle">GSoC</text>
</a>
<a xlink:href="../developer/ci.html" target="_top">
<text x="515" y="540" text-anchor="middle">CI/CD</text>
</a>
<a xlink:href="../developer/timer.html" target="_top">
<text x="635" y="540" text-anchor="middle">Timing</text>
</a>
<a xlink:href="../developer/bindings.html" target="_top">
<text x="515" y="555" text-anchor="middle">Binding system</text>
</a>
<a xlink:href="../developer/iodoc.html" target="_top">
<text x="635" y="555" text-anchor="middle">Writing a binding</text>
</a>
<a xlink:href="../developer/template_policies.html" target="_top">
<text x="575" y="570" text-anchor="middle">Template policies</text>
</a>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

+54
View File
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg version="1.0" id="svg2" sodipodi:version="0.32" inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)" sodipodi:docname="python-logo-only.svg" width="92.070236pt" height="101.00108pt" inkscape:export-filename="python-logo-only.png" inkscape:export-xdpi="232.44" inkscape:export-ydpi="232.44" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata id="metadata371">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview inkscape:window-height="2080" inkscape:window-width="1976" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="2.1461642" inkscape:cx="91.558698" inkscape:cy="47.9926" inkscape:window-x="1092" inkscape:window-y="72" inkscape:current-layer="svg2" width="210mm" height="40mm" units="mm" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" inkscape:document-units="pt" showgrid="false" inkscape:window-maximized="0"/>
<defs id="defs4">
<linearGradient id="linearGradient2795">
<stop style="stop-color:#b8b8b8;stop-opacity:0.49803922;" offset="0" id="stop2797"/>
<stop style="stop-color:#7f7f7f;stop-opacity:0;" offset="1" id="stop2799"/>
</linearGradient>
<linearGradient id="linearGradient2787">
<stop style="stop-color:#7f7f7f;stop-opacity:0.5;" offset="0" id="stop2789"/>
<stop style="stop-color:#7f7f7f;stop-opacity:0;" offset="1" id="stop2791"/>
</linearGradient>
<linearGradient id="linearGradient3676">
<stop style="stop-color:#b2b2b2;stop-opacity:0.5;" offset="0" id="stop3678"/>
<stop style="stop-color:#b3b3b3;stop-opacity:0;" offset="1" id="stop3680"/>
</linearGradient>
<linearGradient id="linearGradient3236">
<stop style="stop-color:#f4f4f4;stop-opacity:1" offset="0" id="stop3244"/>
<stop style="stop-color:white;stop-opacity:1" offset="1" id="stop3240"/>
</linearGradient>
<linearGradient id="linearGradient4671">
<stop style="stop-color:#ffd43b;stop-opacity:1;" offset="0" id="stop4673"/>
<stop style="stop-color:#ffe873;stop-opacity:1" offset="1" id="stop4675"/>
</linearGradient>
<linearGradient id="linearGradient4689">
<stop style="stop-color:#5a9fd4;stop-opacity:1;" offset="0" id="stop4691"/>
<stop style="stop-color:#306998;stop-opacity:1;" offset="1" id="stop4693"/>
</linearGradient>
<linearGradient x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717" id="linearGradient2987" xlink:href="#linearGradient4671" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)"/>
<linearGradient x1="172.94208" y1="77.475983" x2="26.670298" y2="76.313133" id="linearGradient2990" xlink:href="#linearGradient4689" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient2587" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="172.94208" y1="77.475983" x2="26.670298" y2="76.313133"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient2589" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient2248" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="172.94208" y1="77.475983" x2="26.670298" y2="76.313133"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient2250" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient2255" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)" x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient2258" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)" x1="172.94208" y1="76.176224" x2="26.670298" y2="76.313133"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient2795" id="radialGradient2801" cx="61.518883" cy="132.28575" fx="61.518883" fy="132.28575" r="29.036913" gradientTransform="matrix(1,0,0,0.177966,0,108.7434)" gradientUnits="userSpaceOnUse"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient1475" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-14.99112,-11.702371)" x1="150.96111" y1="192.35176" x2="112.03144" y2="137.27299"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient1478" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-14.99112,-11.702371)" x1="26.648937" y1="20.603781" x2="135.66525" y2="114.39767"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient2795" id="radialGradient1480" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.7490565e-8,-0.23994696,1.054668,3.7915457e-7,-83.7008,142.46201)" cx="61.518883" cy="132.28575" fx="61.518883" fy="132.28575" r="29.036913"/>
</defs>
<path style="fill:url(#linearGradient1478);fill-opacity:1" d="M 54.918785,9.1927389e-4 C 50.335132,0.02221727 45.957846,0.41313697 42.106285,1.0946693 30.760069,3.0991731 28.700036,7.2947714 28.700035,15.032169 v 10.21875 h 26.8125 v 3.40625 h -26.8125 -10.0625 c -7.792459,0 -14.6157588,4.683717 -16.7499998,13.59375 -2.46181998,10.212966 -2.57101508,16.586023 0,27.25 1.9059283,7.937852 6.4575432,13.593748 14.2499998,13.59375 h 9.21875 v -12.25 c 0,-8.849902 7.657144,-16.656248 16.75,-16.65625 h 26.78125 c 7.454951,0 13.406253,-6.138164 13.40625,-13.625 v -25.53125 c 0,-7.2663386 -6.12998,-12.7247771 -13.40625,-13.9374997 C 64.281548,0.32794397 59.502438,-0.02037903 54.918785,9.1927389e-4 Z m -14.5,8.21875012611 c 2.769547,0 5.03125,2.2986456 5.03125,5.1249996 -2e-6,2.816336 -2.261703,5.09375 -5.03125,5.09375 -2.779476,-1e-6 -5.03125,-2.277415 -5.03125,-5.09375 -10e-7,-2.826353 2.251774,-5.1249996 5.03125,-5.1249996 z" id="path1948"/>
<path style="fill:url(#linearGradient1475);fill-opacity:1" d="m 85.637535,28.657169 v 11.90625 c 0,9.230755 -7.825895,16.999999 -16.75,17 h -26.78125 c -7.335833,0 -13.406249,6.278483 -13.40625,13.625 v 25.531247 c 0,7.266344 6.318588,11.540324 13.40625,13.625004 8.487331,2.49561 16.626237,2.94663 26.78125,0 6.750155,-1.95439 13.406253,-5.88761 13.40625,-13.625004 V 86.500919 h -26.78125 v -3.40625 h 26.78125 13.406254 c 7.792461,0 10.696251,-5.435408 13.406241,-13.59375 2.79933,-8.398886 2.68022,-16.475776 0,-27.25 -1.92578,-7.757441 -5.60387,-13.59375 -13.406241,-13.59375 z m -15.0625,64.65625 c 2.779478,3e-6 5.03125,2.277417 5.03125,5.093747 -2e-6,2.826354 -2.251775,5.125004 -5.03125,5.125004 -2.76955,0 -5.03125,-2.29865 -5.03125,-5.125004 2e-6,-2.81633 2.261697,-5.093747 5.03125,-5.093747 z" id="path1950"/>
<ellipse style="opacity:0.44382;fill:url(#radialGradient1480);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:15.4174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1894" cx="55.816761" cy="127.70079" rx="35.930977" ry="6.9673119"/>
</svg>

After

Width:  |  Height:  |  Size: 8.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="724" height="561"><defs><linearGradient id="g" x1="0" x2="1" y1="0" y2="1" gradientUnits="objectBoundingBox" spreadMethod="pad"><stop offset="0" stop-color="#cbced0" stop-opacity="1"/><stop offset="1" stop-color="#84838b" stop-opacity="1"/></linearGradient><linearGradient id="b" x1="0" x2="1" y1="0" y2="1" gradientUnits="objectBoundingBox" spreadMethod="pad"><stop offset="0" stop-color="#276dc3" stop-opacity="1"/><stop offset="1" stop-color="#165caa" stop-opacity="1"/></linearGradient></defs><path d="M361.453,485.937 C162.329,485.937 0.906,377.828 0.906,244.469 C0.906,111.109 162.329,3.000 361.453,3.000 C560.578,3.000 722.000,111.109 722.000,244.469 C722.000,377.828 560.578,485.937 361.453,485.937 ZM416.641,97.406 C265.289,97.406 142.594,171.314 142.594,262.484 C142.594,353.654 265.289,427.562 416.641,427.562 C567.992,427.562 679.687,377.033 679.687,262.484 C679.687,147.971 567.992,97.406 416.641,97.406 Z" fill="url(#g)" fill-rule="evenodd"/><path d="M550.000,377.000 C550.000,377.000 571.822,383.585 584.500,390.000 C588.899,392.226 596.510,396.668 602.000,402.500 C607.378,408.212 610.000,414.000 610.000,414.000 L696.000,559.000 L557.000,559.062 L492.000,437.000 C492.000,437.000 478.690,414.131 470.500,407.500 C463.668,401.969 460.755,400.000 454.000,400.000 C449.298,400.000 420.974,400.000 420.974,400.000 L421.000,558.974 L298.000,559.026 L298.000,152.938 L545.000,152.938 C545.000,152.938 657.500,154.967 657.500,262.000 C657.500,369.033 550.000,377.000 550.000,377.000 ZM496.500,241.024 L422.037,240.976 L422.000,310.026 L496.500,310.002 C496.500,310.002 531.000,309.895 531.000,274.877 C531.000,239.155 496.500,241.024 496.500,241.024 Z" fill="url(#b" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

+3
View File
@@ -0,0 +1,3 @@
<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg">
<path d="M831 127H63c-35.35 0-64 28.65-64 64v640c0 35.35 28.65 64 64 64h768c35.35 0 64-28.65 64-64V191C895 155.64999999999998 866.35 127 831 127zM127 575l128-128L127 319l64-64 192 192L191 639 127 575zM639 639H383v-64h256V639z"/>
</svg>

After

Width:  |  Height:  |  Size: 304 B

+8
View File
@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" class="external-icon" viewBox="0 0 28.57 20" focusable="false" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<svg viewBox="0 0 28.57 20" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="M27.9727 3.12324C27.6435 1.89323 26.6768 0.926623 25.4468 0.597366C23.2197 2.24288e-07 14.285 0 14.285 0C14.285 0 5.35042 2.24288e-07 3.12323 0.597366C1.89323 0.926623 0.926623 1.89323 0.597366 3.12324C2.24288e-07 5.35042 0 10 0 10C0 10 2.24288e-07 14.6496 0.597366 16.8768C0.926623 18.1068 1.89323 19.0734 3.12323 19.4026C5.35042 20 14.285 20 14.285 20C14.285 20 23.2197 20 25.4468 19.4026C26.6768 19.0734 27.6435 18.1068 27.9727 16.8768C28.5701 14.6496 28.5701 10 28.5701 10C28.5701 10 28.5677 5.35042 27.9727 3.12324Z" fill="#FF0000"/>
<path d="M11.4253 14.2854L18.8477 10.0004L11.4253 5.71533V14.2854Z" fill="white"/>
</g>
</svg>
</svg>

After

Width:  |  Height:  |  Size: 955 B

+18 -208
View File
@@ -2,19 +2,19 @@
<!--
This file contains the landing page for mlpack documentation. Note that if you
change any section headers, or add any new algorithms, the sidebar in
sidebar.html will need to be manually modified!
add new documentation, the sidebar in sidebar.html will need to be manually
modified! In addition, you should modify the pipeline SVGs (see the comment
below.)
-->
## A fast, flexible machine learning library
mlpack is an intuitive, fast, and flexible header-only C++ machine learning
library with bindings to other languages. It aims to provide fast, lightweight
implementations of both common and cutting-edge machine learning algorithms.
mlpack's lightweight C++ implementation makes it ideal for deployment, and it
can also be used for interactive prototyping via C++ notebooks (these can be
seen in action on mlpack's [homepage](https://www.mlpack.org/)).
can also be used for interactive prototyping via C++ notebooks (see
[here](https://mybinder.org/v2/gh/mlpack/examples/HEAD) for a BinderHub instance
on the [examples repository](https://github.com/mlpack/examples/)).
In addition to its [powerful C++ interface](quickstart/cpp.md), mlpack also
provides [command-line programs](quickstart/cli.md), and bindings to the
@@ -23,209 +23,19 @@ provides [command-line programs](quickstart/cli.md), and bindings to the
_If you use mlpack, please [cite the software](citation.md)._
## mlpack basics
---
Installing mlpack can be done using the
[instructions in the README](README.md#3-installing-and-using-mlpack-in-c);
or the [Windows build guide](user/build_windows.md).
The following basic guides are *highly recommended* before using mlpack.
* ***First steps***:
- [mlpack C++ quickstart](quickstart/cpp.md): create a couple simple C++
programs that use mlpack
- [Sample Windows mlpack C++ application](user/sample_ml_app.md): create a
working mlpack Windows program using Visual Studio
* ***Basics of matrices and data in mlpack***:
- [Matrices and data in mlpack](user/matrices.md)
- [Loading and saving mlpack objects](user/load_save.md)
* ***Reference for mlpack core classes***:
- [Core mlpack documentation](user/core.md)
* [Core math utilities](user/core/math.md)
* [Distances](user/core/distances.md)
* [Distributions](user/core/distributions.md)
* [Kernels](user/core/kernels.md)
* ***Using mlpack natively with our extensions in Python, R, CLI, Julia, and Go***:
- [Links to quickstarts and references](#bindings-to-other-languages)
## mlpack algorithm documentation
Documentation for each machine learning algorithm that mlpack implements is
detailed in the sections below.
* [Classification algorithms](#classification-algorithms): classify points as
discrete labels (`0`, `1`, `2`, ...).
* [Regression algorithms](#regression-algorithms): predict continuous values.
* [Clustering algorithms](#clustering-algorithms): group points into clusters.
* [Geometric algorithms](#geometric-algorithms): computations based on distance
metrics (nearest neighbors, kernel density estimation, etc.).
* [Preprocessing utilities](#preprocessing-utilities): prepare data for machine
learning algorithms.
* [Transformations](#transformations): transform data from one space to
another (principal components analysis, etc.).
* [Modeling utilities](#modeling-utilities): cross-validation, hyperparameter
tuning, etc.
### Classification algorithms
Classify points as discrete labels (`0`, `1`, `2`, ...).
* [`AdaBoost`](user/methods/adaboost.md): Adaptive Boosting
* [`DecisionTree`](user/methods/decision_tree.md): ID3-style decision tree
classifier
* [`HoeffdingTree`](user/methods/hoeffding_tree.md): streaming/incremental
decision tree classifier
* [`LinearSVM`](user/methods/linear_svm.md): simple linear support vector
machine classifier
* [`LogisticRegression`](user/methods/logistic_regression.md): L2-regularized
logistic regression (two-class only)
* [`NaiveBayesClassifier`](user/methods/naive_bayes_classifier.md): simple
multi-class naive Bayes classifier
* [`Perceptron`](user/methods/perceptron.md): simple Perceptron classifier
* [`RandomForest`](user/methods/random_forest.md): parallelized random forest
classifier
* [`SoftmaxRegression`](user/methods/softmax_regression.md): L2-regularized
softmax regression (i.e. multi-class logistic regression)
### Regression algorithms
Predict continuous values.
* [`BayesianLinearRegression`](user/methods/bayesian_linear_regression.md):
Bayesian L2-penalized linear regression
* [`DecisionTreeRegressor`](user/methods/decision_tree_regressor.md): ID3-style
decision tree regressor
* [`LARS`](user/methods/lars.md): Least Angle Regression (LARS), L1-regularized
and L2-regularized
* [`LinearRegression`](user/methods/linear_regression.md): L2-regularized
linear regression (ridge regression)
### Clustering algorithms
***NOTE:*** this documentation is still under construction and so some
algorithms that mlpack implements are not yet listed here. For now, see
[the mlpack/methods directory](https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods)
for a full list of algorithms.
Group points into clusters.
* [`MeanShift`](user/methods/mean_shift.md): clustering with the density-based
mean shift algorithm
### Geometric algorithms
***NOTE:*** this documentation is still under construction and so no geometric
algorithms in mlpack are documented yet. For now, see
[the mlpack/methods directory](https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods)
for a full list of algorithms.
Computations based on distance metrics.
<!-- TODO: add some -->
### Preprocessing utilities
Prepare data for machine learning algorithms.
* [Normalizing labels](user/core/normalizing_labels.md): map labels to and from
the range `[0, numClasses - 1]`.
* [Dataset splitting](user/core/split.md): split a dataset into a
training set and a test set.
***NOTE:*** this documentation is still under construction and so not all
preprocessing utilities in mlpack are documented yet. See also
[the mlpack/methods/preprocess directory](https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods)
for a full list of algorithms.
### Transformations
***NOTE:*** this documentation is still under construction and so some
algorithms that mlpack implements are not yet listed here. For now, see
[the mlpack/methods directory](https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods)
for a full list of algorithms.
Transform data from one space to another.
* [`AMF`](user/methods/amf.md): alternating matrix factorization
* [`LocalCoordinateCoding`](user/methods/local_coordinate_coding.md): local
coordinate coding with dictionary learning
* [`LMNN`](user/methods/lmnn.md): large margin nearest neighbor (distance
metric learning)
* [`NCA`](user/methods/nca.md): neighborhood components analysis (distance
metric learning)
* [`NMF`](user/methods/nmf.md): non-negative matrix factorization
* [`PCA`](user/methods/pca.md): principal components analysis
* [`RADICAL`](user/methods/radical.md): robust, accurate, direct independent
components analysis (ICA) algorithm
* [`SparseCoding`](user/methods/sparse_coding.md): sparse coding with
dictionary learning
### Modeling utilities
Tools for assembling a full data science pipeline.
* [Cross-validation](user/cv.md): k-fold cross-validation tools for any mlpack
algorithm
* [Hyperparameter tuning](user/hpt.md): generic hyperparameter tuner to find
good hyperparameters for any mlpack algorithm
## Bindings to other languages
mlpack's bindings to other languages have less complete functionality than
mlpack in C++, but almost all the same algorithms are available.
| ***Python*** | -- | [quickstart](quickstart/python.md) | -- | [reference](user/bindings/python.md) |
| ***Julia*** | -- | [quickstart](quickstart/julia.md) | -- | [reference](user/bindings/julia.md) |
| ***R*** | -- | [quickstart](quickstart/r.md) | -- | [reference](user/bindings/r.md)
| ***Command-line programs*** | -- | [quickstart](quickstart/cli.md) | -- | [reference](user/bindings/cli.md) |
| ***Go*** | -- | [quickstart](quickstart/go.md) | -- | [reference](user/bindings/go.md) |
## mlpack on embedded systems
mlpack is well suited for embedded systems due to the fact that it is written
in C++ and it is header-only with minimal dependencies. In the following, we are
adding a set of tutorials to allow you to experiment mlpack on various types of
these systems.
* [cross-compile and run k-NN on a Raspberry Pi 2 (armv7)](embedded/crosscompile_armv7.md)
## Examples and further documentation
* [mlpack examples repository](https://github.com/mlpack/examples/): numerous
fully-working example applications of mlpack, in C++ and other languages.
* [mlpack models repository](https://github.com/mlpack/models/): complex models
in C++ built with mlpack
For additional documentation beyond what is covered in all the resources above,
the source code should be consulted. Each method is fully documented.
## Developer documentation
The following general documentation can be useful if you are interested in
contributing to mlpack:
* [The mlpack community](developer/community.md)
* [mlpack and Google Summer of Code](developer/gsoc.md)
Throughout the codebase, mlpack uses some common template parameter policies.
These are documented below.
* [The `ElemType` policy](developer/elemtype.md): element types for data
* [The `DistanceType` policy](developer/distances.md): distance metrics
* [The `KernelType` policy](developer/kernels.md): kernel functions
* [The `TreeType` policy](developer/trees.md): space trees (ball trees,
KD-trees, etc.)
In addition, the following documentation may be useful when developing bindings
for other languages:
* [Timers](developer/timer.md): timing parts of bindings
* [Writing an mlpack binding](developer/iodoc.md): simple examples of mlpack
bindings
* [Automatic bindings](developer/bindings.md): details on mlpack's automatic
binding generator system.
<!-- NOTE: If you are updating the pipeline image, make sure to update *both*
the wide and narrow versions. Yes, it is tedious, but we are limited
by what HTML allows us. -->
<object data="img/pipeline-wide.svg" type="image/svg+xml" id="pipeline-wide">
(Your browser does not support inline SVG objects. Browse the mlpack
pipeline using the navigation sidebar instead.)
</object>
<object data="img/pipeline-narrow.svg" type="image/svg+xml" id="pipeline-narrow">
(Your browser does not support inline SVG objects. Browse the mlpack
pipeline using the navigation sidebar instead.)
</object>
## Changelog
+3 -2
View File
@@ -32,8 +32,9 @@ docker run -it mlpack/mlpack /bin/bash
This Docker image has mlpack's command-line bindings already built and
installed.
If you prefer to build mlpack from scratch, see the
[main README](../../README.md).
If you prefer to build the command-line programs from scratch, follow the
instructions in the
[installation guide](../user/install.md#compile-bindings-manually).
## Simple quickstart example
+4 -1
View File
@@ -24,9 +24,12 @@ make
sudo make install
```
After this, `go run my_code.go` will be able to correctly link against mlpack's
Go bindings and run.
Building the Go bindings from scratch is a little more in-depth, though. For
information on that, follow the instructions in the
[main README](../../README.md).
[installation guide](../user/install.md#compile-bindings-manually).
## Simple mlpack quickstart example
+1 -1
View File
@@ -18,7 +18,7 @@ Pkg.add("mlpack")
Building the Julia bindings from scratch is a little more in-depth, though. For
information on that, follow the instructions in the
[main README](../../README.md).
[installation guide](../user/install.md#compile-bindings-manually).
## Simple quickstart example
+3 -2
View File
@@ -26,8 +26,9 @@ Python bindings pre-installed:
docker run -it mlpack/mlpack /bin/bash
```
Otherwise, you can build the Python bindings from scratch using the
documentation in the [main README](../../README.md).
Building the Python bindings from scratch is a little more in-depth, though.
For information on that, follow the instructions in the
[installation guide](../user/install.md#compile-bindings-manually).
## Simple mlpack quickstart example
+1 -1
View File
@@ -17,7 +17,7 @@ install.packages('mlpack')
Building the R bindings from scratch is a little more in-depth, though. For
information on that, follow the instructions in the
[main README](../../README.md).
[installation guide](../user/install.md#compile-bindings-manually).
## Simple mlpack quickstart example
+314 -182
View File
@@ -20,15 +20,18 @@ when the sidebar is built for each page.
</summary>
<ul>
<!-- General "getting started" documentation -->
<!-- The "Prerequisites" section stays expanded at the top level. -->
<li>
<a href="LINKROOTquickstart/cpp.html">Quickstart</a>
</li>
<li>
<a href="LINKROOTuser/matrices.html">Matrices and data</a>
<a href="LINKROOTuser/install.html">Installing mlpack</a>
</li>
<li>
<a href="LINKROOTuser/load_save.html">Loading and saving</a>
<a href="LINKROOTembedded/supported_boards.html">Cross-compilation setup</a>
</li>
<li>
<a href="LINKROOTuser/matrices.html">Data representation in mlpack</a>
</li>
<li class="bottom-space">
<a href="LINKROOTcitation.html">Citation</a>
@@ -36,16 +39,42 @@ when the sidebar is built for each page.
<!-- Documentation for library core functions -->
<li>
<details>
<summary>
<a href="LINKROOTuser/tutorials.html">
Tutorials and Examples
</a>
</summary>
<ul>
<li>
<a href="https://github.com/mlpack/examples/">
mlpack examples repository
</a>
</li>
<li>
<a href="https://www.youtube.com/@mlpack">
mlpack Youtube channel
</a>
</li>
<li>
<a href="https://github.com/mlpack/models/">
mlpack models repository
</a>
</li>
</ul>
</details>
</li>
<li class="bottom-space">
<details>
<summary>
<a href="LINKROOTuser/core.html">
Core functionality
Utility classes
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/core/math.html">
Core math utilities
Math
</a>
</li>
<li>
@@ -63,190 +92,105 @@ when the sidebar is built for each page.
Kernels
</a>
</li>
<li>
<details>
<summary>
<a href="LINKROOTuser/core/trees.html">
Trees
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/core/trees/kdtree.html">
<code>KDTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/mean_split_kdtree.html">
<code>MeanSplitKDTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/ball_tree.html">
<code>BallTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/mean_split_ball_tree.html">
<code>MeanSplitBallTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/vptree.html">
<code>VPTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/rp_tree.html">
<code>RPTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/max_rp_tree.html">
<code>MaxRPTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/ub_tree.html">
<code>UBTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/binary_space_tree.html">
<code>BinarySpaceTree</code>
</a>
</li>
</ul>
</details>
</li>
</ul>
</details>
</li>
<!-- Trees -->
<!-- Data loading and I/O -->
<li>
<details>
<summary>
<a href="LINKROOTuser/core/trees.html">
Trees
<a href="LINKROOTuser/load_save.html">
Data loading and I/O
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/core/trees/kdtree.html">
<code>KDTree</code>
<a href="LINKROOTuser/load_save.html#numeric-data">
Numeric data
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/mean_split_kdtree.html">
<code>MeanSplitKDTree</code>
<a href="LINKROOTuser/load_save.html#mixed-categorical-data">
Mixed categorical data
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/ball_tree.html">
<code>BallTree</code>
<a href="LINKROOTuser/load_save.html#image-data">
Image data
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/mean_split_ball_tree.html">
<code>MeanSplitBallTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/vptree.html">
<code>VPTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/rp_tree.html">
<code>RPTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/max_rp_tree.html">
<code>MaxRPTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/ub_tree.html">
<code>UBTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/core/trees/binary_space_tree.html">
<code>BinarySpaceTree</code>
<a href="LINKROOTuser/load_save.html#mlpack-objects">
mlpack models and objects
</a>
</li>
</ul>
</details>
</li>
<!-- Classification algorithms -->
<!-- Preprocessing / feature extraction -->
<li>
<details>
<summary>
<a href="LINKROOTindex.html#classification-algorithms">
Classification
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/methods/adaboost.html">
<code>AdaBoost</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/decision_tree.html">
<code>DecisionTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/hoeffding_tree.html">
<code>HoeffdingTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/linear_svm.html">
<code>LinearSVM</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/logistic_regression.html">
<code>LogisticRegression</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/naive_bayes_classifier.html">
<code>NaiveBayesClassifier</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/perceptron.html">
<code>Perceptron</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/random_forest.html">
<code>RandomForest</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/softmax_regression.html">
<code>SoftmaxRegression</code>
</a>
</li>
</ul>
</details>
</li>
<!-- Regression algorithms -->
<li>
<details>
<summary>
<a href="LINKROOTindex.html#regression-algorithms">
Regression
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/methods/bayesian_linear_regression.html">
<code>BayesianLinearRegression</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/decision_tree_regressor.html">
<code>DecisionTreeRegressor</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/lars.html">
<code>LARS</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/linear_regression.html">
<code>LinearRegression</code>
</a>
</li>
</ul>
</details>
</li>
<!-- Clustering algorithms -->
<li>
<details>
<summary>
<a href="LINKROOTindex.html#clustering-algorithms">
Clustering
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/methods/mean_shift.html">
<code>MeanShift</code>
</a>
</li>
</ul>
</details>
</li>
<!-- Geometric algorithms -->
<li>
<a href="LINKROOTindex.html#geometric-algorithms">
Geometry
</a>
</li>
<!-- Preprocessing utilities -->
<li>
<details>
<summary>
<a href="LINKROOTindex.html#preprocessing-utilities">
Preprocessing
<a href="LINKROOTuser/preprocessing.html">
Preprocessing/feature extraction
</a>
</summary>
<ul>
@@ -268,7 +212,7 @@ when the sidebar is built for each page.
<li>
<details>
<summary>
<a href="LINKROOTindex.html#transformations">
<a href="LINKROOTuser/transformations.html">
Transformations
</a>
</summary>
@@ -317,14 +261,135 @@ when the sidebar is built for each page.
</details>
</li>
<!-- Modeling utilities -->
<li class="bottom-space">
<!-- Classification algorithms -->
<li>
<details>
<summary>
<a href="LINKROOTindex.html#modeling-utilities">
<a href="LINKROOTuser/modeling.html">
Modeling
</a>
</summary>
<ul>
<li>
<details>
<summary>
<a href="LINKROOTuser/modeling.html#classification">
Classification
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/methods/adaboost.html">
<code>AdaBoost</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/decision_tree.html">
<code>DecisionTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/hoeffding_tree.html">
<code>HoeffdingTree</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/linear_svm.html">
<code>LinearSVM</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/logistic_regression.html">
<code>LogisticRegression</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/naive_bayes_classifier.html">
<code>NaiveBayesClassifier</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/perceptron.html">
<code>Perceptron</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/random_forest.html">
<code>RandomForest</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/softmax_regression.html">
<code>SoftmaxRegression</code>
</a>
</li>
</ul>
</details>
</li>
<li>
<details>
<summary>
<a href="LINKROOTuser/modeling.html#regression">
Regression
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/methods/bayesian_linear_regression.html">
<code>BayesianLinearRegression</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/decision_tree_regressor.html">
<code>DecisionTreeRegressor</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/lars.html">
<code>LARS</code>
</a>
</li>
<li>
<a href="LINKROOTuser/methods/linear_regression.html">
<code>LinearRegression</code>
</a>
</li>
</ul>
</details>
</li>
<li>
<details>
<summary>
<a href="LINKROOTuser/modeling.html#clustering">
Clustering
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/methods/mean_shift.html">
<code>MeanShift</code>
</a>
</li>
</ul>
</details>
</li>
<li>
<a href="LINKROOTuser/modeling.html#geometric-algorithms">
Geometric algorithms
</a>
</li>
</ul>
</details>
</li>
<!-- Evaluation -->
<li>
<details>
<summary>
<a href="LINKROOTuser/evaluation.html">
Evaluation
</a>
</summary>
<ul>
<li>
<a href="LINKROOTuser/cv.html">
@@ -339,39 +404,106 @@ when the sidebar is built for each page.
</ul>
</details>
</li>
<!-- Deployment -->
<li>
<details>
<summary>
<a href="LINKROOTindex.html#mlpack-on-embedded-systems">
Embedded Applications
<a href="LINKROOTuser/deployment.html">
Deployment
</a>
</summary>
<ul>
<li>
<a href="LINKROOTembedded/crosscompile_armv7.html">
cross-compile and run k-NN on a Raspberry Pi 2 (armv7)
<a href="LINKROOTuser/compile.html">
Compilation
</a>
</li>
<li>
<a href="LINKROOTembedded/supported_boards.html">
Setting up an mlpack cross-compilation environment
<a href="LINKROOTembedded/crosscompile_armv7.html">
Cross-compile to RPi2
</a>
</li>
<li>
<a href="LINKROOTuser/deploy_windows.html">
Deploying mlpack on Windows
</a>
</li>
</ul>
</details>
</details>
</li>
<li>
<a href="LINKROOTindex.html#examples-and-further-documentation">
Examples
</a>
</li>
<li>
<a href="LINKROOTindex.html#developer-documentation">
Developers
</a>
<details>
<summary>
<a href="LINKROOTdeveloper/developers.html">
Developers
</a>
</summary>
<ul>
<li>
<a href="LINKROOTdeveloper/community.html">
Community
</a>
</li>
<li>
<a href="LINKROOTdeveloper/gsoc.html">
GSoC
</a>
</li>
<li>
<a href="LINKROOTdeveloper/ci.html">
CI/CD
</a>
</li>
<li>
<a href="LINKROOTdeveloper/timer.html">
Timers
</a>
</li>
<li>
<a href="LINKROOTdeveloper/bindings.html">
Binding system
</a>
</li>
<li>
<a href="LINKROOTdeveloper/iodoc.html">
Writing a binding
</a>
</li>
<li>
<details>
<summary>
<a href="LINKROOTdeveloper/policies.html">
Template policies
</a>
</summary>
<ul>
<li>
<a href="LINKROOTdeveloper/elemtype.html">
ElemType
</a>
</li>
<li>
<a href="LINKROOTdeveloper/distances.html">
DistanceType
</a>
</li>
<li>
<a href="LINKROOTdeveloper/kernels.html">
KernelType
</a>
</li>
<li>
<a href="LINKROOTdeveloper/trees.html">
TreeType
</a>
</li>
</ul>
</details>
</li>
</ul>
</details>
</li>
</ul>
</details>
@@ -382,7 +514,7 @@ when the sidebar is built for each page.
<li>
<details> <!-- default closed for non-binding pages -->
<summary>
<a href="LINKROOTindex.html#bindings-to-other-languages" class="textlink"><b>Binding API</b></a>
<a href="LINKROOTuser/bindings.html" class="textlink"><b>Binding API</b></a>
</summary>
<ul>
+54
View File
@@ -0,0 +1,54 @@
# Bindings to Other Languages
In addition to the [main C++ interface](../index.md), mlpack also provides
bindings via a simplified API to a number of other languages. This binding API
is consistent across all languages, allowing for easy transition of mlpack code
between languages,
***Note:*** the binding API is not as flexible or general as the C++ interface;
to get the most out of mlpack, C++ is likely the better route to go.
## CLI (Command-line programs)
<center>
<img src="../img/terminal.svg" width="50" alt="a terminal" />
</center>
- [CLI quickstart](../quickstart/cli.md)
- [CLI API reference](bindings/cli.md)
## Python
<center>
<img src="../img/python.svg" width="50" alt="the Python logo" />
</center>
- [Python quickstart](../quickstart/python.md)
- [Python API reference](bindings/python.md)
## Julia
<center>
<img src="../img/julia.svg" width="50" alt="the Julia logo" />
</center>
- [Julia quickstart](../quickstart/julia.md)
- [Julia API reference](bindings/julia.md)
## R
<center>
<img src="../img/r.svg" width="50" alt="the R logo" />
</center>
- [R quickstart](../quickstart/r.md)
- [R API reference](bindings/r.md)
## Go
<center>
<img src="../img/gopher.svg" width="50" alt="the Go gopher" />
</center>
- [Go quickstart](../quickstart/go.md)
- [Go API reference](bindings/go.md)
+2 -2
View File
@@ -155,8 +155,8 @@ manually download ensmallen from http://ensmallen.org/ and extract it to
`C:\mlpack\mlpack\build\Debug` (or `C:\mlpack\mlpack\build\Release` if you
changed to Release mode)
You are ready to create your first application; take a look at the
[Sample C++ ML App](sample_ml_app.md).
You are ready to create your first application; take a look at
[Deploying mlpack on Windows](deploy_windows.md).
## Building mlpack with Visual Studio's CMake integration
+154
View File
@@ -0,0 +1,154 @@
# Compile an mlpack program
Once an mlpack application has been developed, it is easy to compile it into a
standalone program. On this page, compilation is performed via the command-line
on a standard Linux or OS X system; if this is not your environment, see also:
* [Cross-compile to a Raspberry Pi 2](../embedded/crosscompile_armv7.md)
* [Deploy mlpack on Windows](deploy_windows.md)
## Simple command-line compilation
Assuming that mlpack and its dependencies are [installed on the
system](install.md), an mlpack program can be compiled just like any other C++
program:
```sh
g++ -std=c++17 -O3 -o mlpack_program mlpack_program.cpp -larmadillo -fopenmp
```
The command above uses [gcc](https://gcc.gnu.org/) to compile the program
`mlpack_program.cpp` in C++17 mode with optimizations, using OpenMP for
parallelization. It is expected that `mlpack_program.cpp` has the `int main()`
function defined.
For more complex applications that have multiple source files, it can often be
easier to develop a simple [`Makefile`](https://www.gnu.org/software/make/manual/html_node/Simple-Makefile.html).
The [examples repository](https://github.com/mlpack/examples) contains several
standalone C++ projects, each of which have `Makefile`s. These can be adapted
for any project, and are especially useful if any extra include directories or
library directories need to be specified. (This might be the case if, for
instance, mlpack or any dependencies are not installed to standard locations.)
* [Example adaptable `Makefile`](https://github.com/mlpack/examples/blob/master/cpp/neural_networks/mnist_cnn/Makefile)
A full list of compiler options to configure the build is beyond the scope of
this simple documentation, but
[this simple list](https://gist.github.com/g-berthiaume/74f0485fbba5cc3249eee458c1d0d386)
has a handful of commonly-used gcc/clang options.
### Configuring mlpack with compile-time definitions
Several compilation options can control the behavior of an mlpack program.
These can be specified directly on the command line, or at the top of the
program (before including mlpack or Armadillo!).
| ***Command-line option*** | ***Code option*** | ***Meaning*** |
|---------------------------|-------------------|---------------|
|*Speed and debugging.* |||
| `-DNDEBUG` | `#define NDEBUG` | Remove all debugging checks. This can result in slightly faster code, but with no error checking! |
| `-DARMA_NO_DEBUG` | `#define ARMA_NO_DEBUG` | Remove all Armadillo error checking. *Warning:* if there are errors in your code, you are more likely to get a segfault instead of an exception! |
|---------------------------|-------------------|---------------|
|*Output.* |||
| `-DMLPACK_COUT_STREAM=std::cout` | `#define MLPACK_COUT_STREAM std::cout` | Set the default output stream. (Defaults to `std::cout`.) |
| `-DMLPACK_CERR_STREAM=std::cerr` | `#define MLPACK_CERR_STREAM std::cerr` | Set the default error stream. (Defaults to `std::cerr`.) |
| `-DMLPACK_PRINT_INFO` | `#define MLPACK_PRINT_INFO` | Print information messages (`[INFO ]`) during program execution. |
| `-DMLPACK_PRINT_WARN` | `#define MLPACK_PRINT_WARN` | Print warning messages (`[WARN ]`) during program execution. |
| `-DMLPACK_SUPPRESS_FATAL` | `#define MLPACK_PRINT_FATAL` | Do not print `[FATAL]` messages during program execution. |
| `-DENS_PRINT_INFO` | `#define ENS_PRINT_INFO` | Print informational messages from [ensmallen](https://www.ensmallen.org/) optimizers. |
| `-DENS_PRINT_WARN` | `#define ENS_PRINT_WARN` | Print warning messages from [ensmallen](https://ensmallen.org/) optimizers. |
|---------------------------|-------------------|---------------|
|*Functionality.* |||
| `-DMLPACK_ENABLE_ANN_SERIALIZATION` | `#define MLPACK_ENABLE_ANN_SERIALIZATION` | Allow neural network layers to be serialized. |
| `-DMLPACK_DISABLE_STB` | `#define MLPACK_DISABLE_STB` | Disable [STB](https://github.com/nothings/stb)-related [image functionality](load_save.md#image-data). |
***Note:*** If your code serializes (saves or loads) mlpack neural networks, the
`MLPACK_ENABLE_ANN_SERIALIZATION` option must be enabled. This option is not
enabled by default because it can cause compilation time to increase
significantly, but it is necessary for any code that serializes neural networks.
## Linking without the Armadillo wrapper
Armadillo, by default, requires linking against the runtime library
`libarmadillo.so` (or `libarmadillo.dylib` or `armadillo.dll` on non-Linux
systems). This library is a convenience library that internally contains all of
the symbols necessary from lower-level libraries (e.g.
[OpenBLAS](https://www.openblas.net/),
[SuperLU](https://portal.nersc.gov/project/sparse/superlu/),
[ARPACK](https://www.arpack.org/),
[HDF5](https://www.hdfgroup.org/solutions/hdf5/), and so on).
When the wrapper library is used, linking against Armadillo means simply typing
`-larmadillo` instead of linking against all of Armadillo's dependencies.
In some situations this is not preferable, and it is therefore possible via the
[`ARMA_DONT_USE_WRAPPER` macro](https://arma.sourceforge.net/docs.html#config_hpp)
to avoid the Armadillo runtime library and link directly against Armadillo's
dependencies.
When the Armadillo wrapper library is not being used, a compilation command will
need to be adjusted. For instance, the example of the previous section would
need to be changed to:
```
g++ -DARMA_DONT_USE_WRAPPER -std=c++17 -O3 -o mlpack_program mlpack_program.cpp -lopenblas -fopenmp
```
Some notes on the command above:
* Here, `ARMA_DONT_USE_WRAPPER` is specified on the command line instead of in
`mlpack_program.cpp` (or otherwise in the Armadillo
[configuration](https://arma.sourceforge.net/docs.html#config_hpp)).
* OpenBLAS is used for BLAS/LAPACK support. But, other options include ACML,
reference LAPACK/BLAS, Intel MKL, and so forth.
* In some programs, especially if sparse matrix support or HDF5 support is
used, it may be necessary to link against other libraries (e.g. `-lSuperLU
-lhdf5`, etc.). The precise set of libraries to link against depends on the
code being used and the system configuration, but it should be easy enough to
use any linker errors to figure out what libraries need to be linked against.
## Using mlpack in another CMake project
For complex C++ projects, a build system like CMake may be in use. Adding
mlpack as a dependency to a C++ project is straightforward. The following CMake
code will require mlpack and its dependencies to be available:
```cmake
# Find mlpack and its dependencies.
find_package(Armadillo REQUIRED)
find_package(cereal REQUIRED)
find_package(ensmallen REQUIRED)
find_package(mlpack REQUIRED)
include_directories("${ARMADILLO_INCLUDE_DIRS}" "${CEREAL_INCLUDE_DIR}"
"${ENSMALLEN_INCLUDE_DIR}" "${MLPACK_INCLUDE_DIR}")
# Targets should link against ${ARMADILLO_LIBRARIES}.
```
If the relevant files are not available on the system to find those four
packages, they can be downloaded from the
[models](https://github.com/mlpack/models) repository:
* [`models/CMake` directory](https://github.com/mlpack/models/tree/master/CMake)
The following files in that directory are necessary (and can be added to the
CMake files for the project):
* [`ARMA_FindACML.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindACML.cmake)
* [`ARMA_FindACMLMP.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindACMLMP.cmake)
* [`ARMA_FindARPACK.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindARPACK.cmake)
* [`ARMA_FindBLAS.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindBLAS.cmake)
* [`ARMA_FindCBLAS.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindCBLAS.cmake)
* [`ARMA_FindCLAPACK.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindCLAPACK.cmake)
* [`ARMA_FindLAPACK.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindLAPACK.cmake)
* [`ARMA_FindMKL.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindMKL.cmake)
* [`ARMA_FindOpenBLAS.cmake`](https://github.com/mlpack/models/blob/master/CMake/ARMA_FindOpenBLAS.cmake)
* [`FindArmadillo.cmake`](https://github.com/mlpack/models/blob/master/CMake/FindArmadillo.cmake)
* [`FindEnsmallen.cmake`](https://github.com/mlpack/models/blob/master/CMake/FindEnsmallen.cmake)
* [`Findcereal.cmake`](https://github.com/mlpack/models/blob/master/CMake/Findcereal.cmake)
* [`Findmlpack.cmake`](https://github.com/mlpack/models/blob/master/CMake/Findmlpack.cmake)
<!-- TODO: improve this so that it is simpler in the future! -->
+3 -3
View File
@@ -1,8 +1,8 @@
# mlpack core class documentation
# Utility classes
Underlying the implementations of [mlpack's machine learning
algorithms](../index.md#mlpack-algorithm-documentation) are mlpack core support
classes, each of which are documented in the pages below:
algorithms](../index.md) are mlpack core support classes, each of which are
documented in the pages below:
* [Core math utilities](core/math.md): utility classes for mathematical
purposes
+1 -1
View File
@@ -31,7 +31,7 @@ including:
## `LMetric`
The `LMetric` template class implements a [generalized
L-metric](https://en.wikipedia.org/wiki/Lp_space#Definition)
L-metric](https://en.wikipedia.org/wiki/Lp_space#Preliminaries)
(L1-metric, L2-metric, etc.). The class has two template parameters:
```
+3 -3
View File
@@ -1873,13 +1873,13 @@ class BoundType
```
Behavior of some aspects of the `BinarySpaceTree` depend on the traits of a
particular bound. Optionally, you may define a `BoundTraits` specialization for
your bound type, of the following form:
particular bound. Optionally, you may define an `mlpack::BoundTraits`
specialization for your bound type, of the following form:
```c++
// Replace `BoundType` below with the name of the custom class.
template<typename DistanceType, typename ElemType>
struct BoundTraits<BoundType<DistanceType, ElemType>>
struct mlpack::BoundTraits<BoundType<DistanceType, ElemType>>
{
//! If true, then the bounds for each dimension are tight. If false, then the
//! bounds for each dimension may be looser than the range of all points held
@@ -1,12 +1,12 @@
# Sample C++ ML App for Windows
# Deploying mlpack on Windows
*by German Lancioni*
This tutorial will help you create a sample machine learning app using
mlpack/C++. Although this app does not cover all the mlpack capabilities, it
will walkthrough several APIs to understand how everything connects. This
Windows sample app is created using Visual Studio, but you can easily adapt it
to a different platform by following the provided source code.
mlpack/C++ on Windows. The tutorial will walk through several APIs to
understand how everything connects. This Windows sample app is created using
Visual Studio, but you can easily adapt it to a different platform by following
the provided source code.
*Note*: before starting, make sure you have built mlpack for Windows following
this [Windows guide](build_windows.md).
+25
View File
@@ -0,0 +1,25 @@
<object data="../img/pipeline-top-6.svg" type="image/svg+xml" id="pipeline-top">
</object>
# Deployment
Once a modeling pipeline is ready for deployment, it is easy to deploy mlpack
applications to a wide variety of settings due to its simple header-only nature.
See also the [examples repository](https://github.com/mlpack/examples/),
which contains a number of fully-working deployable example applications.
The pages below provide guidance for how to deploy mlpack to a variety of
relatively simple environments.
* [***Compile an mlpack program***](compile.md): compile a standalone C++ program
that uses mlpack.
* [***Cross-compile to a Raspberry Pi***](../embedded/crosscompile_armv7.md):
cross-compile an mlpack C++ application to an embedded or low-resource
device.
- See also the
[cross-compilation setup page](../embedded/supported_boards.md).
* [***Deploying mlpack on Windows***](deploy_windows.md): build a Windows
application that uses mlpack.
+12
View File
@@ -0,0 +1,12 @@
<object data="../img/pipeline-top-5.svg" type="image/svg+xml" id="pipeline-top">
</object>
# Evaluation
Once a model is trained, mlpack contains a number of utilities for testing the
model.
* [Cross-validation](cv.md): k-fold cross-validation tools for any mlpack
algorithm
* [Hyperparameter tuning](hpt.md): generic hyperparameter tuner to find
good hyperparameters for any mlpack algorithm
+279
View File
@@ -0,0 +1,279 @@
# Installing mlpack
mlpack is available via a wide variety of sources, depending on what you want to
do with the library.
***If you want to use mlpack in a C++ program:***
* Install via [your system's package manager](#install-via-package-manager)
*(easiest)*.
* [Install from source](#install-from-source) (see also the
[dependencies](#dependencies) of mlpack).
* If you are on Windows, see the
[Building mlpack from source on Windows page](build_windows.md).
* If you intend to cross-compile, see the
[cross-compilation setup page](../embedded/supported_boards.md).
***If you want to use mlpack's bindings to another language:***
* Install mlpack's bindings to other languages via
[language package managers](#install-bindings-via-language-package-managers)
*(easiest)*.
* [Compile and install bindings manually](#compile-bindings-manually).
***If you want to develop mlpack:***
* [Configure and compile all of mlpack from source](#compile-from-source).
* Look at the [CMake configuration options](#cmake-options).
* [Build the tests](#build-tests).
Once mlpack is installed, try
[compiling a test program](#compiling-a-test-program).
---
## Install via package manager
The easiest way to install the mlpack C++ library is to use your system package
manager. This will handle mlpack's dependencies automatically.
* ***Ubuntu/Debian***: `sudo apt-get install libmlpack-dev`
* ***Fedora/RHEL***: `sudo dnf install mlpack-devel`
* ***Arch Linux***: `sudo pacman -S mlpack`
* ***OS X (Homebrew)***: `brew install mlpack`
* ***OS X (MacPorts)***: `sudo port install mlpack`
* ***vcpkg (Windows)***: `vcpkg install mlpack:x64-windows`
* ***conda***: `conda install conda-forge::mlpack`
* ***Conan***: [see here](https://conan.io/center/recipes/mlpack)
You can also use the
[`mlpack/mlpack` image on DockerHub](https://hub.docker.com/r/mlpack/mlpack) for
a container with mlpack already installed.
If you plan to write mlpack programs, make sure you have a C++ compiler that
supports C++17 available (this may not be automatically installed by the package
manager).
## Install from source
If you only intend to use mlpack in a C++ program, it is not necessary to
[configure and compile from source](#compile-from-source), because mlpack is a
header-only library. This means that you can simply
[download mlpack](https://www.mlpack.org/download.html) and unpack it, and when
you are [compiling a program](#compiling-a-test-program), you must make sure
that the `src/` directory is on the include path.
With most compilers, this means you simply add the flag `-I/path/to/mlpack/src/`
to the compiler command-line (e.g.,
`g++ -I/path/to/mlpack/src/ -o program program.cpp -larmadillo`).
---
If you wish to install the mlpack headers to your system manually via CMake, you
can use the following commands:
```sh
mkdir build && cd build/
cmake ..
sudo make install
```
Alternately, since CMake v3.14.0, the `cmake` command can create the build
folder itself, and so the above commands can be rewritten as follows:
```sh
cmake -S . -B build
sudo cmake --build build --target install
```
### Dependencies
You must also ensure that the dependencies of mlpack are available to the
compiler:
- [Armadillo](https://arma.sourceforge.net) &nbsp;&emsp;>= 10.8
- [ensmallen](https://ensmallen.org) &emsp;>= 2.10.0
- [cereal](http://uscilab.github.io/cereal/) &ensp;&nbsp;&emsp;&emsp;>= 1.1.2
Dependencies can be installed using the system package manager. For example,
on Debian and Ubuntu, all relevant dependencies can be installed with `sudo
apt-get install libarmadillo-dev libensmallen-dev libcereal-dev libstb-dev g++
cmake`.
If the STB library headers are available, image loading support will be
available.
If you are compiling Armadillo by hand, ensure that LAPACK and BLAS are enabled.
If you are configuring mlpack with CMake (as in the code snippets in the
previous section), you can use the auto-downloader to obtain mlpack's
dependencies with the `-DDOWNLOAD_DEPENDENCIES=ON` option (detailed in the
[CMake options section](#cmake-options). The autodownloader is especially
useful for [cross-compilation](../embedded/supported_boards.md), as it
automatically downloads and compiles OpenBLAS for the target architecture.
## Install bindings via language package managers
If you wish to use mlpack's bindings to other languages, see the quickstarts for
each language for more information on installation:
* [Python](../quickstart/python.md)
* [Command-line](../quickstart/cli.md)
* [Julia](../quickstart/julia.md)
* [R](../quickstart/r.md)
* [Go](../quickstart/go.md)
## Compile bindings manually
It is possible to manually build the bindings from source. However, this is not
recommended, as building bindings for a specific language often requires some
amount of setup and is not often a user-friendly process. Specifically, after
the bindings are built, deploying them to the environment of the target language
can be non-trivial and requires knowledge specific to that language (not covered
here).
To compile bindings for a particular language, follow the
[Compile from source](#compile-from-source) section below, and enable the
appropriate [CMake options](#cmake-options).
The results of bindings will be built into `build/src/mlpack/bindings/<lang>/`
where `build/` is the build directory configured with CMake, and `<lang>` should
be replaced with the appropriate language (`python`/`r`/`go`/`julia`). There
are two exceptions:
* Command-line bindings will be built into `build/bin/`.
* Markdown bindings will produce Markdown files in `build/doc/`.
## Compile from source
If you intend to develop mlpack, or want to build the tests or bindings to
another language (including the command-line bindings), you will need to compile
from source. Once you have installed [the dependencies](#dependencies) and
[downloaded mlpack](https://www.mlpack.org/download.html), unpack the sources
and configure with CMake.
The command below enables building the tests and the command-line programs.
More options are detailed in the [CMake options section](#cmake-options).
```sh
mkdir build && cd build/
cmake -DBUILD_TESTS=ON -DBUILD_CLI_EXECUTABLES=ON ../
make -j4
```
The `-j4` option specifies that 4 cores should be used for the build; if you are
running into RAM limitations (or don't have four cores), reduce this. If you
have more cores available, you can increase the number of cores for a faster
build.
### CMake options
The following options can be used when configuring mlpack.
| ***Option*** | ***Description*** | ***Default*** |
|--------------|-------------------|---------------|
| ***General configuration*** |||
| `-DDOWNLOAD_DEPENDENCIES=ON` | Download all dependencies that are not found on the system. | `OFF` |
| `-DDEBUG=ON` | Compile with debugging symbols. | `OFF` |
| `-DPROFILE=ON` | Compile with profiling symbols. | `OFF` |
| `-DARMA_EXTRA_DEBUG=ON` | Emit extra Armadillo debugging output (warning: *very* verbose). | `OFF` |
| `-DTEST_VERBOSE=ON` | Emit verbose output when running tests. | `OFF` |
| `-DBUILD_TESTS=ON` | Build `mlpack_test`. | `OFF` |
| `-DUSE_OPENMP=ON` | Use OpenMP for parallelization. | `ON` |
| `-DUSE_PRECOMPILED_HEADERS=OFF` | Disable precompiled headers during build. |
`OFF` |
|--------------|-------------------|---------------|
| ***Dependency locations*** |||
| `-DARMADILLO_INCLUDE_DIR=/path/to/arma/include/` | Path containing `armadillo` header file. ||
| `-DARMADILLO_LIBRARY=/path/to/libarmadillo.so` | Path of compiled Armadillo library (if using the Armadillo wrapper library). ||
| `-DARMADILLO_LIBRARIES=/path/to/lib1.so;/path/to/lib2.so` | List of libraries to link against for Armadillo (if not using the Armadillo wrapper library). ||
| `-DCEREAL_INCLUDE_DIR=/path/to/cereal/include/` | Path containing cereal headers. ||
| `-DENSMALLEN_INCLUDE_DIR=/path/to/ens/include/` | Path containing `ensmallen.hpp`. ||
| `-DSTB_INCLUDE_DIR=/path/to/stb/include/` | Path containing `stb.h` and `stb_image.h`. ||
|--------------|-------------------|---------------|
| ***Bindings*** |||
| `-DBUILD_CLI_EXECUTABLES=ON` | Enable building command-line programs. | `OFF` |
| `-DBUILD_PYTHON_BINDINGS=ON` | Enable building Python bindings. | `OFF` |
| `-DPYTHON_EXECUTABLE=/path/to/python` | Location of Python program to use. ||
| `-DBUILD_GO_BINDINGS=ON` | Enable building Go bindings. | `OFF` |
| `-DBUILD_GO_SHLIB=OFF` | Do not shared library for Go bindings. | `ON` |
| `-DBUILD_JULIA_BINDINGS=ON` | Enable building Julia bindings. | `OFF` |
| `-DJULIA_EXECUTABLE=/path/to/julia` | Location of Julia interpreter. ||
| `-DBUILD_R_BINDINGS=ON` | Enable building R bindings. | `OFF` |
| `-DBUILD_MARKDOWN_BINDINGS=ON` | Enable building Markdown bindings (e.g. Markdown documentation for each binding language). | `OFF` |
|--------------|-------------------|---------------|
### Build tests
If you are developing mlpack or simply want to run the test suite, after you
have configured the library with CMake, you can build the tests directly:
```sh
make -j4 mlpack_test
```
Replace the `-j4` with the number of cores desired for building.
Once the build is complete (it may take a while!), you can run the tests from
the build directory, selecting either all of them or an individual test suite.
```sh
bin/mlpack_test
bin/mlpack_test [LARSTest]
```
The `mlpack_test` program uses the [Catch2](https://github.com/catchorg/Catch2)
library for unit testing; this supports many options---you can see them with
`mlpack_test -h`.
## Compiling a test program
Once mlpack is installed and available on the system, it is easy to compile a
program using mlpack. For instance, consider the trivial program below:
```c++
#include <mlpack.hpp>
using namespace mlpack;
int main()
{
// Sample a point from a 3-dimensional Gaussian distribution.
GaussianDistribution g(3);
std::cout << "Random sample from 3D Gaussian: " << std::endl
<< g.Random();
}
```
This can be compiled with the command:
```
g++ -O3 -std=c++17 -o my_program my_program.cpp -larmadillo -fopenmp
```
The command may need slight adaptation if you are using a different compiler or
prefer different compilation options.
***Notes***:
- If you want to serialize (save or load) neural networks, you should add
`#define MLPACK_ENABLE_ANN_SERIALIZATION` before including `<mlpack.hpp>`.
- When the autodownloader is used to download Armadillo
(`-DDOWNLOAD_DEPENDENCIES=ON`), the Armadillo runtime library is not built
and Armadillo must be used in header-only mode. Instead, you must link
directly with the dependencies of Armadillo. For example, on a system that
has OpenBLAS available, compilation can be done like this:
```sh
g++ -O3 -std=c++17 -o my_program my_program.cpp -lopenblas -fopenmp
```
See [the Armadillo documentation](https://arma.sourceforge.net/faq.html#linking)
for more information on linking Armadillo programs.
+4 -1
View File
@@ -1,4 +1,7 @@
# Loading and saving in mlpack
<object data="../img/pipeline-top-1.svg" type="image/svg+xml" id="pipeline-top">
</object>
# Data loading and I/O
mlpack provides the `data::Load()` and `data::Save()` functions to load and save
[Armadillo matrices](matrices.md) (e.g. numeric and categorical datasets) and
+1 -1
View File
@@ -49,7 +49,7 @@ std::cout << arma::accu(predictions == 3) << " test points classified as class "
#### See also:
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [`Perceptron`](perceptron.md)
* [`DecisionTree`](decision_tree.md)
* [AdaBoost on Wikipedia](https://en.wikipedia.org/wiki/AdaBoost)
+1 -1
View File
@@ -68,7 +68,7 @@ std::cout << "RMSE of reconstructed matrix: "
* [`NMF`](nmf.md): non-negative matrix factorization (a version of `AMF`)
* [`SparseCoding`](sparse_coding.md)
* [mlpack transformations](../../index.md#transformations)
* [mlpack transformations](../transformations.md)
* [Matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Matrix_factorization_(recommender_systems))
### Template parameter overview
@@ -43,7 +43,7 @@ std::cout << arma::accu(predictions < 0) << " test points predicted to have "
#### See also:
* [mlpack regression techniques](../../index.md#regression-algorithms)
* [mlpack regression techniques](../modeling.md#regression)
* [`LinearRegression`](linear_regression.md)
* [`LARS`](lars.md)
* [Bayesian linear regression on Wikipedia](https://en.wikipedia.org/wiki/Bayesian_linear_regression)
+1 -1
View File
@@ -48,7 +48,7 @@ std::cout << arma::accu(predictions == 2) << " test points classified as class "
* [`DecisionTreeRegressor`](decision_tree_regressor.md)
* [Random forests](random_forest.md)
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [Decision tree on Wikipedia](https://en.wikipedia.org/wiki/Decision_tree)
* [Decision tree learning on Wikipedia](https://en.wikipedia.org/wiki/Decision_tree_learning)
+1 -1
View File
@@ -53,7 +53,7 @@ std::cout << arma::accu(predictions < 0) << " test points predicted to have "
* [`DecisionTree`](decision_tree.md)
* [Random forests](random_forest.md)
* [mlpack regression techniques](../../index.md#regression-algorithms)
* [mlpack regression techniques](../modeling.md#regression)
* [Decision tree on Wikipedia](https://en.wikipedia.org/wiki/Decision_tree)
* [Decision tree learning on Wikipedia](https://en.wikipedia.org/wiki/Decision_tree_learning)
+1 -1
View File
@@ -49,7 +49,7 @@ std::cout << arma::accu(predictions == 2) << " test points classified as class "
* [`DecisionTree`](decision_tree.md)
* [Random forests](random_forest.md)
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [Incremental decision tree on Wikipedia](https://en.wikipedia.org/wiki/Incremental_decision_tree)
* [Mining High-Speed Data Streams (pdf)](https://dl.acm.org/doi/pdf/10.1145/347090.347107)
+1 -1
View File
@@ -47,7 +47,7 @@ std::cout << arma::accu(predictions < 0) << " test points predicted to have "
#### See also:
* [`LinearRegression`](linear_regression.md)
* [mlpack regression techniques](../../index.md#regression-algorithms)
* [mlpack regression techniques](../modeling.md#regression)
* [Least-angle Regression on Wikipedia](https://en.wikipedia.org/wiki/Least-angle_regression)
### Constructors
+1 -1
View File
@@ -43,7 +43,7 @@ std::cout << arma::accu(predictions < 0) << " test points predicted to have "
#### See also:
* [mlpack regression techniques](../../index.md#regression-algorithms)
* [mlpack regression techniques](../modeling.md#regression)
* [`LARS`](lars.md)
* [Linear Regression on Wikipedia](https://en.wikipedia.org/wiki/Linear_regression)
+1 -1
View File
@@ -42,7 +42,7 @@ std::cout << arma::accu(predictions == 1) << " test points classified as class "
#### See also:
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [`GaussianDistribution`](../core/distributions.md#gaussiandistribution)
* [Naive Bayes classifier on Wikipedia](https://en.wikipedia.org/wiki/Naive_Bayes_classifier)
+1 -1
View File
@@ -44,7 +44,7 @@ std::cout << "Average density of encoded test data: "
* [`SparseCoding`](sparse_coding.md)
* [`LARS`](lars.md) (used internally by `LocalCoordinateCoding`)
* [mlpack transformations](../../index.md#transformations)
* [mlpack transformations](../transformations.md)
* [Sparse dictionary learning on Wikipedia](https://en.wikipedia.org/wiki/Sparse_dictionary_learning)
* [Nonlinear learning using local coordinate coding (pdf)](https://proceedings.neurips.cc/paper_files/paper/2009/file/2afe4567e1bf64d32a5527244d104cea-Paper.pdf)
+1 -1
View File
@@ -47,7 +47,7 @@ std::cout << arma::accu(predictions == 0) << " test points classified as class "
#### See also:
* [`SoftmaxRegression`](softmax_regression.md)
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [Logistic regression on Wikipedia](https://en.wikipedia.org/wiki/Logistic_regression)
### Constructors
+1 -1
View File
@@ -50,7 +50,7 @@ for (size_t c = 0; c < centroids.n_cols; ++c)
#### See also:
* [mlpack clustering algorithms](../../index.md#clustering-algorithms)
* [mlpack clustering algorithms](../modeling.md#clustering)
* [mlpack kernels](../core/kernels.md)
* [Mean shift on Wikipedia](https://en.wikipedia.org/wiki/Mean_shift)
* [Mean Shift, Mode Seeking, and Clustering (pdf)](http://users.isr.ist.utl.pt/~alex/Resources/meanshift.pdf)
+1 -1
View File
@@ -42,7 +42,7 @@ std::cout << arma::accu(predictions == 2) << " test points classified as class "
#### See also:
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [`GaussianDistribution`](../core/distributions.md#gaussiandistribution)
* [Naive Bayes classifier on Wikipedia](https://en.wikipedia.org/wiki/Naive_Bayes_classifier)
+2 -2
View File
@@ -52,7 +52,7 @@ std::cout << "RMSE of reconstructed matrix: "
* [`AMF`](amf.md): alternating matrix factorization
* [`SparseCoding`](sparse_coding.md)
* [mlpack transformations](../../index.md#transformations)
* [mlpack transformations](../transformations.md)
* [Non-negative matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Non-negative_matrix_factorization)
* [Learning the parts of objects by non-negative matrix factorization](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=29bae9472203546847ec1352a604566d0f602728) (original NMF paper, pdf)
@@ -332,7 +332,7 @@ class CustomTerminationPolicy
// Note that W and H may have different types than V (i.e. V may be sparse,
// and W and H must be dense.)
template<typename WHMatType>
bool IsConverged(const MatType& H, const MatType& W);
bool IsConverged(const WHMatType& H, const WHMatType& W);
// Return the value that should be returned for the `nmf.Apply()` function
// when convergence has been reached. This is called at the end of
+3 -3
View File
@@ -39,8 +39,8 @@ std::cout << "The transformed data matrix has size " << dataset.n_rows /* 5 */
#### See also:
* [`Radical`](radical.md): independent components analysis
* [mlpack preprocessing utilities](../../index.md#preprocessing-utilities)
* [mlpack transformations](../../index.md#transformations)
* [mlpack preprocessing utilities](../preprocessing.md)
* [mlpack transformations](../transformations.md)
* [Principal component analysis on Wikipedia](https://en.wikipedia.org/wiki/Principal_component_analysis)
### Constructors
@@ -314,7 +314,7 @@ class CustomDecompositionPolicy
// etc.).
// * `VecType` is the corresponding vector type to `MatType` (e.g., a
// `MatType` of `arma::mat` would mean a `VecType` of `arma::vec`, etc.).
template<typename MatType, typename MatType, typename VecType>
template<typename InMatType, typename MatType, typename VecType>
static void Apply(const InMatType& data,
const MatType& centeredData,
MatType& transformedData,
+1 -1
View File
@@ -53,7 +53,7 @@ std::cout << arma::accu(predictions == 1) << " test points classified as class "
* [`NaiveBayesClassifier`](naive_bayes_classifier.md), another simple classifier
* [`AdaBoost`](adaboost.md)
* [`FFN`](/src/mlpack/methods/ann/ffn.hpp)
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [Perceptron on Wikipedia](https://en.wikipedia.org/wiki/Perceptron)
### Constructors
+2 -2
View File
@@ -42,8 +42,8 @@ std::cout << "Independent components matrix size: " << y.n_rows << " x "
#### See also:
* [`PCA`](pca.md): principal components analysis
* [mlpack preprocessing utilities](../../index.md#preprocessing-utilities)
* [mlpack transformations](../../index.md#transformations)
* [mlpack preprocessing utilities](../preprocessing.md)
* [mlpack transformations](../transformations.md)
* [ICA Using Spacings Estimates of Entropy (pdf)](https://www.jmlr.org/papers/volume4/learned-miller03a/learned-miller03a.pdf)
* [Independent components analysis on Wikipedia](https://en.wikipedia.org/wiki/Independent_component_analysis)
+1 -1
View File
@@ -56,7 +56,7 @@ std::cout << arma::accu(predictions == 3) << " test points classified as class "
* [`DecisionTree`](decision_tree.md)
* [`DecisionTreeRegressor`](decision_tree_regressor.md)
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [Random forest on Wikipedia](https://en.wikipedia.org/wiki/Random_forest)
* [Decision tree on Wikipedia](https://en.wikipedia.org/wiki/Decision_tree)
* [Leo Breiman's Random Forests page](https://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm)
+1 -1
View File
@@ -48,7 +48,7 @@ std::cout << arma::accu(predictions == 2) << " test points classified as class "
#### See also:
* [`LogisticRegression`](logistic_regression.md)
* [mlpack classifiers](../../index.md#classification-algorithms)
* [mlpack classifiers](../modeling.md#classification)
* [UFLDL Softmax Regression Tutorial](http://deeplearning.stanford.edu/tutorial/supervised/SoftmaxRegression/)
### Constructors
+1 -1
View File
@@ -43,7 +43,7 @@ std::cout << "Average density of encoded test data: "
* [`LocalCoordinateCoding`](local_coordinate_coding.md)
* [`LARS`](lars.md) (used internally by `SparseCoding`)
* [mlpack transformations](../../index.md#transformations)
* [mlpack transformations](../transformations.md)
* [Sparse dictionary learning on Wikipedia](https://en.wikipedia.org/wiki/Sparse_dictionary_learning)
* [Efficient sparse coding algorithms (pdf)](https://proceedings.neurips.cc/paper/2006/file/2d71b2ae158c7c5912cc0bbde2bb9d95-Paper.pdf)
+67
View File
@@ -0,0 +1,67 @@
<object data="../img/pipeline-top-4.svg" type="image/svg+xml" id="pipeline-top">
</object>
# Modeling
mlpack contains numerous different machine learning algorithms that can be used
for modeling.
*Note: this section is under construction and not all functionality is
documented yet.*
## Classification
Classify points as discrete labels (`0`, `1`, `2`, ...).
* [`AdaBoost`](methods/adaboost.md): Adaptive Boosting
* [`DecisionTree`](methods/decision_tree.md): ID3-style decision tree
classifier
* [`HoeffdingTree`](methods/hoeffding_tree.md): streaming/incremental decision
tree classifier
* [`LinearSVM`](methods/linear_svm.md): simple linear support vector machine
classifier
* [`LogisticRegression`](methods/logistic_regression.md): L2-regularized
logistic regression (two-class only)
* [`NaiveBayesClassifier`](methods/naive_bayes_classifier.md): simple
multi-class naive Bayes classifier
* [`Perceptron`](methods/perceptron.md): simple Perceptron classifier
* [`RandomForest`](methods/random_forest.md): parallelized random forest
classifier
* [`SoftmaxRegression`](methods/softmax_regression.md): L2-regularized
softmax regression (i.e. multi-class logistic regression)
## Regression
Predict continuous values.
* [`BayesianLinearRegression`](methods/bayesian_linear_regression.md):
Bayesian L2-penalized linear regression
* [`DecisionTreeRegressor`](methods/decision_tree_regressor.md): ID3-style
decision tree regressor
* [`LARS`](methods/lars.md): Least Angle Regression (LARS), L1-regularized and
L2-regularized
* [`LinearRegression`](methods/linear_regression.md): L2-regularized linear
regression (ridge regression)
## Clustering
***NOTE:*** this documentation is still under construction and so some
algorithms that mlpack implements are not yet listed here. For now, see
[the mlpack/methods directory](https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods)
for a full list of algorithms.
Group points into clusters.
* [`MeanShift`](methods/mean_shift.md): clustering with the density-based mean
shift algorithm
## Geometric algorithms
***NOTE:*** this documentation is still under construction and so no geometric
algorithms in mlpack are documented yet. For now, see
[the mlpack/methods directory](https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods)
for a full list of algorithms.
Computations based on distance metrics.
<!-- TODO: add some -->
+19
View File
@@ -0,0 +1,19 @@
<object data="../img/pipeline-top-2.svg" type="image/svg+xml" id="pipeline-top">
</object>
# Preprocessing / feature extraction
mlpack provides a number of utilities for data preparation and feature
extraction. These utilities are generally used just before actually applying
any machine learning [transformations](transformations.md) or
[modeling](modeling.md).
*Note: this section is under construction and not all functionality is
documented yet.*
* [Normalizing labels](core/normalizing_labels.md): convert labels to/from an
arbitrary range to `[0, numClasses - 1]`, which is the range that mlpack
classifiers require.
* [Dataset splitting](core/split.md): split a dataset into a training and test
set, optionally including labels.
+19
View File
@@ -0,0 +1,19 @@
# Prerequisites
Before using mlpack in an application, it must be installed on the system.
* [Installing mlpack](install.md): a guide to install mlpack.
* [Cross-compilation setup](../embedded/supported_boards.md): use this guide if
you plan to cross-compile mlpack C++ programs for another device.
Once mlpack is set up, you should start with the following resources:
* [Quickstart](../quickstart/cpp.md): guide to get simple mlpack programs running
in C++.
* [Matrices and data](matrices.md): details about how data is expected to
be represented in mlpack (via the Armadillo library).
If you wish to use mlpack's bindings to other languages, see the
[Bindings](bindings.md) page.
+43
View File
@@ -0,0 +1,43 @@
<object data="../img/pipeline-top-3.svg" type="image/svg+xml" id="pipeline-top">
</object>
# Transformations
Once data is [loaded](load_save.html) and any necessary
[preprocessing and feature extraction](preprocessing.md) is done,
one of mlpack's transformations can be used to transform data into a
new space.
*Note: this section is under construction and not all functionality is
documented yet.*
## Matrix decompositions
Decompose a matrix into two or more components.
* [AMF](methods/amf.md): alternating matrix factorization
* [NMF](methods/nmf.md): non-negative matrix factorization
## Linear transformations
Linearly map a matrix onto a new basis, optionally performing dimensionality
reduction.
* [PCA](methods/pca.md): principal components analysis
* [RADICAL](methods/radical.md): an independent components analysis technique
## Metric learning techniques
Learn a [distance metric](core/distances.md) based on a data matrix.
* [LMNN](methods/lmnn.md): large margin nearest neighbor
* [NCA](methods/nca.md): neighborhood components analysis
## Coding techniques
Encode data points in a matrix as a combination of points in a dictionary.
* [LocalCoordinateCoding](methods/local_coordinate_coding.md): local coordinate
coding with dictionary learning
* [SparseCoding](methods/sparse_coding.md): sparse coding with dictionary
learning
+41
View File
@@ -0,0 +1,41 @@
# Tutorials and Examples
mlpack has a number of examples, video tutorials, and other resources showing
usage of the library.
* [mlpack examples repository](https://github.com/mlpack/examples/): contains
simple examples of mlpack usage for various machine learning tasks, in C++
and other languages. Both notebooks and standalone programs are available.
---
* [mlpack Youtube channel](https://www.youtube.com/@mlpack): tutorial videos
for getting started with mlpack.
- [Installing mlpack for use in C++](https://www.youtube.com/watch?v=wcEFce7IaS8):
a step-by-step tutorial for installing and using mlpack from C++.
* [Ubuntu/Debian](https://www.youtube.com/watch?v=wcEFce7IaS8&t=46s)
* [Fedora/RHEL](https://www.youtube.com/watch?v=wcEFce7IaS8&t=188s)
* [MacOS (via Homebrew)](https://www.youtube.com/watch?v=wcEFce7IaS8&t=303s)
* [Installing from source](https://www.youtube.com/watch?v=wcEFce7IaS8&t=440s)
* [Installing from source with the autodownloader](https://www.youtube.com/watch?v=wcEFce7IaS8&t=712s)
- [Using mlpack for command-line data science](https://www.youtube.com/watch?v=M0DLrUVSyrE):
a demonstration of mlpack's command-line bindings.
- [Simple data science workflow in C++ with mlpack](https://www.youtube.com/watch?v=PD9AqGdkPl8):
a tutorial using random forests and softmax regression in C++ to solve a
simple data science problem.
- [Development workflow tutorial: VSCode](https://www.youtube.com/watch?v=7DOrMQ2HhBY):
set up an mlpack development environment in VSCode. *This is useful if you
are interested in contributing to mlpack.*
- [Development workflow tutorial: command-line](https://www.youtube.com/watch?v=3PgFzA5duwc):
set up an mlpack development environment from the command-line. *This is
useful if you are interested in contributing to mlpack.*
---
* [mlpack models repository](https://github.com/mlpack/models/): contains
implementations of specific deep learning models that are too large or
complex for inclusion in the main mlpack library.
+76 -81
View File
@@ -77,70 +77,90 @@ extract_code_blocks()
# preceding fence close above it.
last_line_fence=1;
# Track whether or not the entire last file corresponded to a class
# declaration.
class_decl=0;
while IFS= read -r line;
do
if [[ $last_line_fence == 1 ]];
then
# Skip this line---it will be a fence opening.
last_line_fence=0;
# Create main() function to wrap the code in.
echo "#include <mlpack.hpp>" > $output_prefix$output_file_display.cpp;
echo "" >> $output_prefix$output_file_display.cpp;
# If we have a class declaration from the previous file, insert it.
if [[ $class_decl == 1 ]];
then
class_decl=0;
last_output_file_id=$(($output_file_id - 1));
last_output_file_display=$(printf "%02d" $last_output_file_id);
cat $output_prefix$last_output_file_display.cpp | awk '
BEGIN { p=0 }
/int main()/ { p=1 }
/^{/ { if(p == 1) { p=2; o=1 } }
/^}/ { p=0; }
// { if (p == 2 && o == 0) { print substr($0, 3) } o=0 }' >> $output_prefix$output_file_display.cpp;
echo "" >> $output_prefix$output_file_display.cpp;
rm -f $output_prefix$last_output_file_display.cpp;
fi
echo "int main()" >> $output_prefix$output_file_display.cpp;
echo "{" >> $output_prefix$output_file_display.cpp;
continue;
fi
if [[ $line == '```'* ]];
if [[ $line == '```' ]];
then
last_line_fence=1;
# Close main() function.
echo "}" >> $output_prefix$output_file_display.cpp;
# Check after the fact: was this file only a class declaration? If so, we
# want to put it instead into the next file.
has_class1=`grep '^ class\|^ struct' $output_prefix$output_file_display.cpp | wc -l`;
has_class2=`grep '^ };' $output_prefix$output_file_display.cpp | wc -l`;
if [[ "$has_class1" != "0" && "$has_class2" != "0" ]];
if [ -f $output_prefix$output_file_display.body.cpp ];
then
class_decl=1;
fi;
# Determine whether we need a main() function for the code. Also check
# whether the file is simply a class definition, in which case we don't
# need to do anything except prepare it to be inserted into the next
# example.
has_main=`grep 'int main(' $output_prefix$output_file_display.body.cpp | wc -l`;
has_class1=`grep '^ class\|^ struct' $output_prefix$output_file_display.body.cpp | wc -l`;
has_class2=`grep '^ };' $output_prefix$output_file_display.body.cpp | wc -l`;
class_decl=0;
if [ $has_class1 -ne 0 -a $has_class2 -ne 0 ];
then
class_decl=1;
fi;
# Detect if we need any to add any special headers. We have to do this
# when we finish with the file...
if [[ `grep 'Eigen::' $output_prefix$output_file_display.cpp | wc -l` -gt 0 ]];
then
sed -i '1s/^/#include <Eigen\/Dense>\n/' $output_prefix$output_file_display.cpp;
fi
if [ $has_main -eq 0 -a $class_decl -eq 0 ];
then
# Create main() function to wrap the code in.
echo "#include <mlpack.hpp>" > $output_prefix$output_file_display.cpp;
echo "" >> $output_prefix$output_file_display.cpp;
if [[ `grep 'xt::' $output_prefix$output_file_display.cpp | wc -l` -gt 0 ]];
then
sed -i '1s/^/#include <xtensor\/xrandom.hpp>\n/' $output_prefix$output_file_display.cpp;
sed -i '1s/^/#include <xtensor\/xarray.hpp>\n/' $output_prefix$output_file_display.cpp;
# Insert any class definitions.
if [ -f $output_prefix$output_file_display.defn.cpp ];
then
cat $output_prefix$output_file_display.defn.cpp >> $output_prefix$output_file_display.cpp;
rm -f $output_prefix$output_file_display.defn.cpp;
fi
echo "int main()" >> $output_prefix$output_file_display.cpp;
echo "{" >> $output_prefix$output_file_display.cpp;
# Insert the code itself.
cat $output_prefix$output_file_display.body.cpp >> $output_prefix$output_file_display.cpp;
rm -f $output_prefix$output_file_display.body.cpp;
# Close main() function.
echo "}" >> $output_prefix$output_file_display.cpp;
elif [[ "$class_decl" == "1" ]];
then
# If the function is only a class declaration, set it aside, along
# with any other declarations, for the next program.
next_id=$(($output_file_id + 1));
next_display=$(printf "%02d" $next_id);
if [ -f $output_prefix$output_file_display.defn.cpp ];
then
mv $output_prefix$output_file_display.defn.cpp $output_prefix$next_display.defn.cpp;
cat $output_prefix$output_file_display.body.cpp >> $output_prefix$next_display.defn.cpp;
rm -f $output_prefix$output_file_display.body.cpp;
else
mv $output_prefix$output_file_display.body.cpp $output_prefix$next_display.defn.cpp;
fi
else
# The file should be able to compile on its own.
mv $output_prefix$output_file_display.body.cpp $output_prefix$output_file_display.cpp;
fi
# Detect if we need any to add any special headers. We have to do this
# when we finish with the file...
if [ -f $output_prefix$output_file_display.cpp ];
then
if [[ `grep 'Eigen::' $output_prefix$output_file_display.cpp | wc -l` -gt 0 ]];
then
sed -i '1s/^/#include <Eigen\/Dense>\n/' $output_prefix$output_file_display.cpp;
fi
if [[ `grep 'xt::' $output_prefix$output_file_display.cpp | wc -l` -gt 0 ]];
then
sed -i '1s/^/#include <xtensor\/xrandom.hpp>\n/' $output_prefix$output_file_display.cpp;
sed -i '1s/^/#include <xtensor\/xarray.hpp>\n/' $output_prefix$output_file_display.cpp;
fi
fi
fi
output_file_id=$(($output_file_id + 1));
@@ -150,35 +170,10 @@ extract_code_blocks()
fi
# Include indentation (two spaces).
echo " $line" >> $output_prefix$output_file_display.cpp;
echo " $line" >> $output_prefix$output_file_display.body.cpp;
done < $input_file.tmp;
# The last file is always invalid---we opened it without knowing whether
# anything would be in it.
rm -f $output_prefix$output_file_display.cpp;
# Check the "true" last file: if it's only class declarations, no need to
# compile it.
output_file_id=$(($output_file_id - 1));
output_file_display=$(printf "%02d" $output_file_id);
if [ -f $output_prefix$output_file_display.cpp ];
then
cat $output_prefix$output_file_display.cpp | awk '
BEGIN { p=0 }
/int main()/ { p=1 }
/^{/ { if(p == 1) { p=2; o=1 } }
/^}/ { p=0 }
// { if (p == 2 && o == 0) { print substr($0, 3) } o=0 }' >> $output_prefix$output_file_display.cpp.tmp;
has_class1=`grep '^class' $output_prefix$output_file_display.cpp.tmp | wc -l`;
has_class2=`grep '^};' $output_prefix$output_file_display.cpp.tmp | wc -l`;
if [[ "$has_class1" != "0" && "$has_class2" != "0" ]];
then
# The file's main() function is just a class declaration. Nuke it.
rm -f $output_prefix$output_file_display.cpp;
fi
rm -f $output_prefix$output_file_display.cpp.tmp;
fi
rm -f $output_prefix*.defn.cpp; # Remove any unused definitions.
rm -f $input_file.tmp;
}
@@ -338,16 +333,18 @@ do
declare -a files_to_skip=(
# These files have small incomplete snippets that can't compile into
# standalone programs.
"sample_ml_app.md"
"deploy_windows.md"
"hpt.md"
"cv.md"
"timer.md"
"bindings.md"
"elemtype.md"
"iodoc.md"
"distances.md"
"elemtype.md"
"kernels.md"
"metrics.md"
"trees.md"
# Skip the quickstart, since it depends on some specific data.
"cpp.md"
# The tutorials are old and are likely to be replaced, so let's not test
# them.
"amf.md"
@@ -369,8 +366,6 @@ do
"q_learning.md"
"sac.md"
"td3.md"
# Skip quickstarts, although we should eventually test them.
"cpp.md"
);
skip=0;
+8 -2
View File
@@ -36,7 +36,7 @@ LinearType<MatType, RegularizerType>::LinearType(
outSize(outSize),
regularizer(regularizer)
{
weights.set_size(WeightSize(), 1);
// Nothing to do here.
}
// Copy constructor.
@@ -58,7 +58,9 @@ LinearType<MatType, RegularizerType>::LinearType(LinearType&& layer) :
outSize(std::move(layer.outSize)),
regularizer(std::move(layer.regularizer))
{
// Nothing else to do.
// Reset parameters of other layer.
layer.inSize = 0;
layer.outSize = 0;
}
template<typename MatType, typename RegularizerType>
@@ -87,6 +89,10 @@ LinearType<MatType, RegularizerType>::operator=(
inSize = std::move(layer.inSize);
outSize = std::move(layer.outSize);
regularizer = std::move(layer.regularizer);
// Reset parameters of other layer.
layer.inSize = 0;
layer.outSize = 0;
}
return *this;
@@ -58,7 +58,9 @@ LinearNoBiasType<MatType, RegularizerType>::LinearNoBiasType(
outSize(0),
regularizer(std::move(layer.regularizer))
{
// Nothing to do here.
// Reset parameters of other layer.
layer.inSize = 0;
layer.outSize = 0;
}
template<typename MatType, typename RegularizerType>
@@ -88,6 +90,10 @@ LinearNoBiasType<MatType, RegularizerType>::operator=(
inSize = std::move(layer.inSize);
outSize = std::move(layer.outSize);
regularizer = std::move(layer.regularizer);
// Reset parameters of other layer.
layer.inSize = 0;
layer.outSize = 0;
}
return *this;