• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

tribuo: Tribuo 是 Java 编写的机器学习库,可提供多类分类、回归、聚类、异常检测和 ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

tribuo

开源软件地址:

https://gitee.com/mirrors/tribuo

开源软件介绍:

Tribuo Logo

Tribuo - A Java prediction library (v4.2)

Tribuo is a machine learning library in Java thatprovides multi-class classification, regression, clustering, anomaly detectionand multi-label classification. Tribuo provides implementations of popular MLalgorithms and also wraps other libraries to provide a unified interface.Tribuo contains all the code necessary to load, featurise and transform data.Additionally, it includes the evaluation classes for all supported predictiontypes. Development is led by Oracle Labs' MachineLearning Research Group; we welcome community contributions.

All trainers are configurable using theOLCUT configuration system. This allows auser to define a trainer in an xml file and repeatably build models. Exampleconfigurations for each of the supplied Trainers can be found in the configfolder of each package. These configuration files can also be written in jsonor edn by using the appropriate OLCUT configuration dependency. Models anddatasets are serializable using Java serialization.

All models and evaluations include a serializable provenance object whichrecords the creation time of the model or evaluation, the identity of the dataand any transformations applied to it, as well as the hyperparameters of thetrainer. In the case of evaluations, this provenance information also includesthe specific model used. Provenance information can be extracted as JSON, orserialised directly using Java serialisation. For production deployments,provenance information can be redacted and replaced with a hash to providemodel tracking through an external system. Many Tribuo models can be exportedin ONNX format for deployment in other languages, platforms or cloud services.

Tribuo runs on Java 8+, and we test on LTS versions of Java along with thelatest release. Tribuo itself is a pure Java library and is supported on allJava platforms; however, some of our interfaces require native code and arethus supported only where there is native library support. We test on x86_64architectures on Windows 10, macOS and Linux (RHEL/OL/CentOS 7+), as these aresupported platforms for the native libraries with which we interface. If you'reinterested in another platform and wish to use one of the native libraryinterfaces (ONNX Runtime, TensorFlow, and XGBoost), we recommend reaching outto the developers of those libraries. Note the reproducibility packagerequires Java 17, and as such is not part of the tribuo-all Maven Centraldeployment.

Documentation

Tutorials

Tutorial notebooks, including examples of Classification, Clustering,Regression, Anomaly Detection, TensorFlow, document classification, columnardata loading, working with externally trained models, and the configurationsystem, can be found in the tutorials. These use theIJava Jupyter notebook kernel, and workwith Java 10+, except the reproducibility tutotiral which requires Java 17. Toconvert the tutorials' code back to Java 8, in most cases simply replace thevar keyword with the appropriate types.

Algorithms

General predictors

Tribuo includes implementations of several algorithms suitable for a wide rangeof prediction tasks:

AlgorithmImplementationNotes
BaggingTribuoCan use any Tribuo trainer as the base learner
Random ForestTribuoFor both classification and regression
Extra TreesTribuoFor both classification and regression
K-NNTribuoIncludes options for several parallel backends, as well as a single threaded backend
Neural NetworksTensorFlowTrain a neural network in TensorFlow via the Tribuo wrapper. Models can be deployed using the ONNX interface or the TF interface

The ensembles and K-NN use a combination function to produce their output.These combiners are prediction task specific, but the ensemble & K-NNimplementations are task agnostic. We provide voting and averaging combinersfor multi-class classification, multi-label classification and regression tasks.

Classification

Tribuo has implementations or interfaces for:

AlgorithmImplementationNotes
Linear modelsTribuoUses SGD and allows any gradient optimizer
Factorization MachinesTribuoUses SGD and allows any gradient optimizer
CARTTribuo
SVM-SGDTribuoAn implementation of the Pegasos algorithm
Adaboost.SAMMETribuoCan use any Tribuo classification trainer as the base learner
Multinomial Naive BayesTribuo
Regularised Linear ModelsLibLinear
SVMLibSVM or LibLinearLibLinear only supports linear SVMs
Gradient Boosted Decision TreesXGBoost

Tribuo also supplies a linear chain CRF for sequence classification tasks. ThisCRF is trained via SGD using any of Tribuo's gradient optimizers.

To explain classifier predictions there is an implementation of the LIMEalgorithm. Tribuo's implementation allows the mixing of text and tabular data,along with the use of any sparse model as an explainer (e.g., regression trees,lasso etc), however it does not support images.

Regression

Tribuo's regression algorithms are multidimensional by default. Singledimensional implementations are wrapped in order to produce multidimensionaloutput.

AlgorithmImplementationNotes
Linear modelsTribuoUses SGD and allows any gradient optimizer
Factorization MachinesTribuoUses SGD and allows any gradient optimizer
CARTTribuo
LassoTribuoUsing the LARS algorithm
Elastic NetTribuoUsing the co-ordinate descent algorithm
Regularised Linear ModelsLibLinear
SVMLibSVM or LibLinearLibLinear only supports linear SVMs
Gradient Boosted Decision TreesXGBoost

Clustering

Tribuo includes infrastructure for clustering and also supplies twoclustering algorithm implementations. We expect to implement additionalalgorithms over time.

AlgorithmImplementationNotes
HDBSCAN*TribuoA density-based algorithm which discovers clusters and outliers
K-MeansTribuoIncludes both sequential and parallel backends, and the K-Means++ initialisation algorithm

Anomaly Detection

Tribuo offers infrastructure for anomaly detection tasks.We expect to add new implementations over time.

AlgorithmImplementationNotes
One-class SVMLibSVM
One-class linear SVMLibLinear

Multi-label classification

Tribuo offers infrastructure for multi-label classification, alongwith a wrapper which converts any of Tribuo's multi-class classificationalgorithms into a multi-label classification algorithm. We expect to addmore multi-label specific implementations over time.

AlgorithmImplementationNotes
Independent wrapperTribuoConverts a multi-class classification algorithm into a multi-label one by producing a separate classifier for each label
Classifier ChainsTribuoProvides classifier chains and randomized classifier chain ensembles using any of Tribuo's multi-class classification algorithms
Linear modelsTribuoUses SGD and allows any gradient optimizer
Factorization MachinesTribuoUses SGD and allows any gradient optimizer

Interfaces

In addition to our own implementations of Machine Learning algorithms, Tribuoalso provides a common interface to popular ML tools on the JVM. If you'reinterested in contributing a new interface, open a GitHub Issue, and we candiscuss how it would fit into Tribuo.

Currently we have interfaces to:

  • LibLinear - via the LibLinear-java port of the original LibLinear (v2.43).
  • LibSVM - using the pure Java transformed version of the C++ implementation (v3.25).
  • ONNX Runtime - via the Java API contributed by our group (v1.9.0).
  • TensorFlow - Using TensorFlow Java v0.4.0 (based on TensorFlow v2.7.0). This allows the training and deployment of TensorFlow models entirely in Java.
  • XGBoost - via the built in XGBoost4J API (v1.5.0).

Binaries

Binaries are available on Maven Central, using groupId org.tribuo. To pullall of Tribuo, including the bindings for TensorFlow, ONNX Runtime and XGBoost(which are native libraries), use:

Maven:

<dependency>    <groupId>org.tribuo</groupId>    <artifactId>tribuo-all</artifactId>    <version>4.2.0</version>    <type>pom</type></dependency>

or from Gradle:

implementation ("org.tribuo:tribuo-all:4.2.0@pom") {    transitive = true // for build.gradle (i.e., Groovy)    // isTransitive = true // for build.gradle.kts (i.e., Kotlin)}

The tribuo-all dependency is a pom which depends on all the Tribuosubprojects except for the reproducibility project which requires Java 17.

Most of Tribuo is pure Java and thus cross-platform, however some of theinterfaces link to libraries which use native code. Those interfaces(TensorFlow, ONNX Runtime and XGBoost) only run on supported platforms for therespective published binaries, and Tribuo has no control over which binariesare supplied. If you need support for a specific platform, reach out to themaintainers of those projects. As of the 4.1 release these native packages allprovide x86_64 binaries for Windows, macOS and Linux. It is also possible tocompile each package for macOS ARM64 (i.e., Apple Silicon), though there are nobinaries available on Maven Central for that platform. When developing on anARM platform you can select the arm profile in Tribuo's pom.xml to disablethe native library tests.

Individual jars are published for each Tribuo module. It is preferable todepend only on the modules necessary for the specific project. This preventsyour code from unnecessarily pulling in large dependencies like TensorFlow.

Compiling from source

Tribuo uses Apache Maven v3.5 or higher to build.Tribuo is compatible with Java 8+, and we test on LTS versions of Java alongwith the latest release. To build, simply run mvn clean package. All Tribuo'sdependencies should be available on Maven Central. Please file an issue forbuild-related issues if you're having trouble (though do check if you'remissing proxy settings for Maven first, as that's a common cause of buildfailures, and out of our control).

Repository Layout

Development happens on the main branch, which has the version number of thenext Tribuo release with "-SNAPSHOT" appended to it. Tribuo major and minorreleases will be tagged on the main branch, and then have a branch namedvA.B.X-release-branch (for release vA.B.0) branched from the tagged releasecommit for any point releases (i.e., vA.B.1, vA.B.2 etc) following fromthat major/minor release. Those point releases are tagged on the specificrelease branch e.g., v4.0.2 is tagged on the v4.0.X-release-branch.

Contributing

We welcome contributions! See our contribution guidelines.

We have a discussion mailing list[email protected], archivedhere. We're investigatingdifferent options for real time chat, check back in the future. For bugreports, feature requests or other issues, please file a GithubIssue.

Security issues should follow our reporting guidelines.

License

Tribuo is licensed under the Apache 2.0 License.

Release Notes:

  • v4.2.0 - Added factorization machines, classifier chains, HDBSCAN. Added ONNX export and OCI Data Science integration. Added reproducibility framework. Various other small fixes and improvements, including the regression fixes from v4.1.1. Filled out the remaining javadoc, added 4 new tutorials (onnx export, multi-label classification, reproducibility, hdbscan), expanded existing tutorials.
  • v4.1.1 - Bug fixes for multi-output regression, multi-label evaluation, KMeans & KNN with SecurityManager, and update TF-Java 0.4.0.
  • v4.1.0 - Added TensorFlow training support, a BERT feature extractor, ExtraTrees, K-Means++, many linear model & CRF performance improvements, new tutorials on TF and document classification. Many bug fixes & documentation improvements.
  • v4.0.2 - Many bug fixes (CSVDataSource, JsonDataSource, RowProcessor, LibSVMTrainer, Evaluations, Regressor serialization). Improved javadoc and documentation. Added two new tutorials (columnar data and external models).
  • v4.0.1 - Bugfix for CSVReader to cope with blank lines, added IDXDataSource to allow loading of native MNIST format data.
  • v4.0.0 - Initial public release.
  • v3 - Added provenance system, the external model support and onnx integrations.
  • v2 - Expanded beyond a classification system, to support regression, clustering and multi-label classification.
  • v1 - Initial internal release. This release only supported multi-class classification.

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap