开源软件名称(OpenSource Name):mlpack/mlpack开源软件地址(OpenSource Url):https://github.com/mlpack/mlpack开源编程语言(OpenSource Language):C++ 94.3%开源软件介绍(OpenSource Introduction):
Home | Documentation | Doxygen | Community | Help | IRC ChatDownload: current stable version (3.4.2) mlpack is an intuitive, fast, and flexible header-only C++ machine learning library with bindings to other languages. It is meant to be a machine learning analog to LAPACK, and aims to implement a wide array of machine learning methods and functions as a "swiss army knife" for machine learning researchers. In addition to its powerful C++ interface, mlpack also provides command-line programs, Python bindings, Julia bindings, Go bindings and R bindings. mlpack uses an open governance model and is fiscally sponsored by NumFOCUS. Consider making a tax-deductible donation to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs. 0. Contents
1. IntroductionThe mlpack website can be found at https://www.mlpack.org and it contains numerous tutorials and extensive documentation. This README serves as a guide for what mlpack is, how to install it, how to run it, and where to find more documentation. The website should be consulted for further information:
2. Citation detailsIf you use mlpack in your research or software, please cite mlpack using the citation below (given in BibTeX format):
Citations are beneficial for the growth and improvement of mlpack. 3. Dependenciesmlpack has the following dependencies:
All of those should be available in your distribution's package manager. If not, you will have to compile each of them by hand. See the documentation for each of those packages for more information. If you would like to use or build the mlpack Python bindings, make sure that the following Python packages are installed:
If you would like to build the Julia bindings, make sure that Julia >= 1.3.0 is installed. If you would like to build the Go bindings, make sure that Go >= 1.11.0 is installed with this package:
If you would like to build the R bindings, make sure that R >= 4.0 is installed with these R packages.
If the STB library headers are available, image loading support will be compiled. If you are compiling Armadillo by hand, ensure that LAPACK and BLAS are enabled. 4. Building mlpack from sourceThis document discusses how to build mlpack from source. These build directions will work for any Linux-like shell environment (for example Ubuntu, macOS, FreeBSD etc). However, mlpack is in the repositories of many Linux distributions and so it may be easier to use the package manager for your system. For example, on Ubuntu, you can install the mlpack library and command-line executables (e.g. mlpack_pca, mlpack_kmeans etc.) with the following command:
On Fedora or Red Hat (EPEL):
Note: Older Ubuntu versions may not have the most recent version of mlpack available---for instance, at the time of this writing, Ubuntu 16.04 only has mlpack 3.4.2 available. Options include upgrading your Ubuntu version, finding a PPA or other non-official sources, or installing with a manual build. Note: If you are using RHEL7/CentOS 7, gcc 4.8 is too old to compile mlpack.
One option is to use There are some useful pages to consult in addition to this section: mlpack uses CMake as a build system and allows several flexible build configuration options. You can consult any of the CMake tutorials for further documentation, but this tutorial should be enough to get mlpack built and installed. First, unpack the mlpack source and change into the unpacked directory. Here we use mlpack-x.y.z where x.y.z is the version.
Then, make a build directory. The directory can have any name, but 'build' is sufficient.
The next step is to run CMake to configure the project. Running CMake is the
equivalent to running
Options can be specified to compile with debugging information and profiling information:
Options are specified with the -D flag. The allowed options include:
For example, to build mlpack's CLI bindings statically the following command can be used:
Other tools can also be used to configure CMake, but those are not documented here. See this section of the build guide for more details, including a full list of options, and their default values. By default, command-line programs will be built, and if the Python dependencies (Cython, setuptools, numpy, pandas) are available, then Python bindings will also be built. OpenMP will be used for parallelization when possible by default. Once CMake is configured, building the library is as simple as typing 'make'. This will build all library components and bindings.
If you do not want to build everything in the library, individual components of the build can be specified:
If you want to build the tests, just make the
If the build fails and you cannot figure out why, register an account on Github and submit an issue. The mlpack developers will quickly help you figure it out: Alternately, mlpack help can be found in IRC at If you wish to install mlpack to
You can now run the executables by name; the mlpack headers are found in
5. Running mlpack programsAfter building mlpack, the executables will reside in Consider the 'mlpack_knn' program, which finds the k nearest neighbors in a reference dataset of all the points in a query set. That is, we have a query and a reference dataset. For each point in the query dataset, we wish to know the k points in the reference dataset which are closest to the given query point. Alternately, if the query and reference datasets are the same, the problem can be stated more simply: for each point in the dataset, we wish to know the k nearest points to that point. Each mlpack program has extensive help documentation which details what the method does, what each of the parameters is, and how to use them: $ mlpack_knn --help Running $ mlpack_knn -r dataset.csv -n neighbors_out.csv -d distances_out.csv -k 5 -v The 6. Using mlpack from PythonIf mlpack is installed to the system, then the mlpack Python bindings should be automatically in your PYTHONPATH, and importing mlpack functionality into Python should be very simple: >>> from mlpack import knn Accessing help is easy: >>> help(knn) The API is similar to the command-line programs. So, running >>> output = knn(reference=dataset, k=5, verbose=True) This will store the output neighbors in 7. Further documentationThe documentation given here is only a fraction of the available documentation
for mlpack. If doxygen is installed, you can type
To learn about the development goals of mlpack in the short- and medium-term future, see the vision document. 8. Bug reporting(see also mlpack help) If you find a bug in mlpack or have any problems, numerous routes are available for help. Github is used for bug tracking, and can be found at https://github.com/mlpack/mlpack/issues. It is easy to register an account and file a bug there, and the mlpack development team will try to quickly resolve your issue. In addition, mailing lists are available. The mlpack discussion list is available at and the git commit list is available at Lastly, the IRC channel ![]() |
2022-08-15
2022-08-17
2023-10-27
2022-09-23
2022-08-13
请发表评论