• Stars
    star
    1,211
  • Rank 37,292 (Top 0.8 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tribuo - A Java machine learning library

Tribuo Logo

Tribuo - A Java prediction library (v4.3)

Tribuo is a machine learning library in Java that provides multi-class classification, regression, clustering, anomaly detection and multi-label classification. Tribuo provides implementations of popular ML algorithms 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 prediction types. Development is led by Oracle Labs' Machine Learning Research Group; we welcome community contributions.

All trainers are configurable using the OLCUT configuration system. This allows a user to define a trainer in an xml or json file and repeatably build models. Example configurations for each of the supplied Trainers can be found in the config folder of each package. These configuration files can also be written in json or edn by using the appropriate OLCUT configuration dependency. Models and datasets are serializable using Java serialization.

All models and evaluations include a serializable provenance object which records the creation time of the model or evaluation, the identity of the data and any transformations applied to it, as well as the hyperparameters of the trainer. In the case of evaluations, this provenance information also includes the specific model used. Provenance information can be extracted as JSON, or serialised directly using Java serialisation. For production deployments, provenance information can be redacted and replaced with a hash to provide model tracking through an external system. Many Tribuo models can be exported in 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 the latest release. Tribuo itself is a pure Java library and is supported on all Java platforms; however, some of our interfaces require native code and are thus supported only where there is native library support. We test on x86_64 architectures on Windows 10, macOS and Linux (RHEL/OL/CentOS 7+), as these are supported platforms for the native libraries with which we interface. If you're interested in another platform and wish to use one of the native library interfaces (ONNX Runtime, TensorFlow, and XGBoost), we recommend reaching out to the developers of those libraries. Note the model card and reproducibility packages require Java 17, and as such are not part of the tribuo-all Maven Central deployment.

Documentation

Tutorials

Tutorial notebooks, including examples of Classification, Clustering, Regression, Anomaly Detection, TensorFlow, document classification, columnar data loading, working with externally trained models, and the configuration system, can be found in the tutorials. These use the IJava Jupyter notebook kernel, and work with Java 10+, except the model card & reproducibility tutorials which require Java 17. To convert the tutorials' code back to Java 8, in most cases simply replace the var keyword with the appropriate types.

Algorithms

General predictors

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

Algorithm Implementation Notes
Bagging Tribuo Can use any Tribuo trainer as the base learner
Random Forest Tribuo For both classification and regression
Extra Trees Tribuo For both classification and regression
K-NN Tribuo Includes options for several parallel backends, as well as a single threaded backend
Neural Networks TensorFlow Train 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-NN implementations are task agnostic. We provide voting and averaging combiners for multi-class classification, multi-label classification and regression tasks.

Classification

Tribuo has implementations or interfaces for:

Algorithm Implementation Notes
Linear models Tribuo Uses SGD and allows any gradient optimizer
Factorization Machines Tribuo Uses SGD and allows any gradient optimizer
CART Tribuo
SVM-SGD Tribuo An implementation of the Pegasos algorithm
Adaboost.SAMME Tribuo Can use any Tribuo classification trainer as the base learner
Multinomial Naive Bayes Tribuo
Regularised Linear Models LibLinear
SVM LibSVM or LibLinear LibLinear only supports linear SVMs
Gradient Boosted Decision Trees XGBoost

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

Tribuo has a set of information theoretic feature selection algorithms which can be applied to classification tasks. Feature inputs are automatically discretised into equal width bins. At the moment this includes implementations of mutual information maximisation (MIM), Conditional Mutual Information Maximisation (CMIM), minimum Redundancy Maximum Relevancy (mRMR) and Joint Mutual Information (JMI).

To explain classifier predictions there is an implementation of the LIME algorithm. 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. Single dimensional implementations are wrapped in order to produce multidimensional output.

Algorithm Implementation Notes
Linear models Tribuo Uses SGD and allows any gradient optimizer
Factorization Machines Tribuo Uses SGD and allows any gradient optimizer
CART Tribuo
Lasso Tribuo Using the LARS algorithm
Elastic Net Tribuo Using the co-ordinate descent algorithm
Regularised Linear Models LibLinear
SVM LibSVM or LibLinear LibLinear only supports linear SVMs
Gradient Boosted Decision Trees XGBoost

Clustering

Tribuo includes infrastructure for clustering and also supplies two clustering algorithm implementations. We expect to implement additional algorithms over time.

Algorithm Implementation Notes
HDBSCAN* Tribuo A density-based algorithm which discovers clusters and outliers
K-Means Tribuo Includes 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.

Algorithm Implementation Notes
One-class SVM LibSVM
One-class linear SVM LibLinear

Multi-label classification

Tribuo offers infrastructure for multi-label classification, along with a wrapper which converts any of Tribuo's multi-class classification algorithms into a multi-label classification algorithm. We expect to add more multi-label specific implementations over time.

Algorithm Implementation Notes
Independent wrapper Tribuo Converts a multi-class classification algorithm into a multi-label one by producing a separate classifier for each label
Classifier Chains Tribuo Provides classifier chains and randomized classifier chain ensembles using any of Tribuo's multi-class classification algorithms
Linear models Tribuo Uses SGD and allows any gradient optimizer
Factorization Machines Tribuo Uses SGD and allows any gradient optimizer

Interfaces

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

Currently we have interfaces to:

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

Binaries

Binaries are available on Maven Central, using groupId org.tribuo. To pull all the Java 8 compatible components 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.3.1</version>
    <type>pom</type>
</dependency>

or from Gradle:

implementation ("org.tribuo:tribuo-all:4.3.1@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 Tribuo subprojects except for the model card and reproducibility projects which require Java 17.

Most of Tribuo is pure Java and thus cross-platform, however some of the interfaces link to libraries which use native code. Those interfaces (TensorFlow, ONNX Runtime and XGBoost) only run on supported platforms for the respective published binaries, and Tribuo has no control over which binaries are supplied. If you need support for a specific platform, reach out to the maintainers of those projects. As of the 4.1 release these native packages all provide x86_64 binaries for Windows, macOS and Linux. It is also possible to compile each package for macOS ARM64 (i.e., Apple Silicon), though there are no binaries available on Maven Central for that platform for TensorFlow or XGBoost. As of the 4.3 release Tribuo now depends on a version of ONNX Runtime which includes support for macOS ARM64 and Linux aarch64 platforms. When developing on an ARM platform you can select the arm profile in Tribuo's pom.xml to disable the native library tests.

Individual jars are published for each Tribuo module. It is preferable to depend only on the modules necessary for the specific project. This prevents your 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 along with the latest release. To build, simply run mvn clean package. All Tribuo's dependencies should be available on Maven Central. Please file an issue for build-related issues if you're having trouble (though do check if you're missing proxy settings for Maven first, as that's a common cause of build failures, and out of our control). Note if you're building using Java 16 or earlier the model card and reproducibility packages will be disabled.

Repository Layout

Development happens on the main branch, which has the version number of the next Tribuo release with "-SNAPSHOT" appended to it. Tribuo major and minor releases will be tagged on the main branch, and then have a branch named vA.B.X-release-branch (for release vA.B.0) branched from the tagged release commit for any point releases (i.e., vA.B.1, vA.B.2 etc) following from that major/minor release. Those point releases are tagged on the specific release 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], archived here. We're investigating different options for real time chat, check back in the future. For bug reports, feature requests or other issues, please file a Github Issue.

Security

Please consult the security guide for our responsible security vulnerability disclosure process.

License

Tribuo is licensed under the Apache 2.0 License.

Release Notes:

  • v4.3.1 - Small bug fixes, notably to CART trees and Example.densify, bumps dependencies to more secure versions.
  • v4.3.0 - Model card support, feature selection for classification, protobuf serialization format, kd-tree for distance computations, speed improvements for sparse linear models. Version bumps for most dependencies, and various other small fixes and improvements.
  • v4.2.2 - Small bug fixes, bump TF-Java to 0.4.2, jackson to 2.13.4, protobuf-java to 3.19.6, OpenCSV to 5.7.1.
  • v4.2.1 - Bug fixes for KMeans' multithreading, nondeterministic iteration orders affecting ONNX export and K-Means initialization, and upgraded TF-Java to 0.4.1.
  • 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.

More Repositories

1

graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
Java
19,818
star
2

docker-images

Official source of container configurations, images, and examples for Oracle products and projects
Shell
6,160
star
3

opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
Java
3,971
star
4

truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.
Ruby
2,965
star
5

helidon

Java libraries for writing microservices
Java
2,596
star
6

visualvm

VisualVM is an All-in-One Java Troubleshooting Tool
Java
2,563
star
7

node-oracledb

Oracle Database driver for Node.js maintained by Oracle Corp.
JavaScript
2,174
star
8

graaljs

A ECMAScript 2022 compliant JavaScript implementation built on GraalVM. With polyglot language interoperability support. Running Node.js applications!
C++
1,418
star
9

railcar

RailCar: Rust implementation of the Open Containers Initiative oci-runtime
Rust
1,115
star
10

oracle-db-examples

Examples of applications and tool usage for Oracle Database
Java
958
star
11

graalpython

A Python 3 implementation built on GraalVM
Python
957
star
12

mysql-operator

Create, operate and scale self-healing MySQL clusters in Kubernetes
Go
868
star
13

python-cx_Oracle

Python interface to Oracle Database now superseded by python-oracledb
C
861
star
14

vagrant-projects

Vagrant projects for Oracle products and other examples
Shell
840
star
15

graphpipe

Machine Learning Model Deployment Made Simple
Makefile
725
star
16

terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
Go
622
star
17

bpftune

bpftune uses BPF to auto-tune Linux systems
C
615
star
18

smith

Smith: A microcontainer builder
Go
602
star
19

fastr

A high-performance implementation of the R programming language, built on GraalVM.
Java
598
star
20

oraclejet

Oracle JET is a modular JavaScript Extension Toolkit for developers working on client-side applications.
479
star
21

db-sample-schemas

Oracle Database Sample Schemas
PLSQL
435
star
22

coherence

Oracle Coherence Community Edition
Java
408
star
23

dotnet-db-samples

.NET code samples for Oracle database developers #OracleDotNet
C#
381
star
24

apex

Official Oracle APEX repo for sample code, starter apps, plug-ins, and more! #orclapex
354
star
25

oci-cli

Command Line Interface for Oracle Cloud Infrastructure
Python
343
star
26

centos2ol

Script and documentation to switch CentOS/Rocky Linux to Oracle Linux
Shell
330
star
27

graalvm-reachability-metadata

Repository which contains community-driven collection of GraalVM reachability metadata for open-source libraries.
Java
321
star
28

oci-python-sdk

Oracle Cloud Infrastructure SDK for Python
Python
303
star
29

crashcart

CrashCart: sideload binaries into a running container
Rust
275
star
30

oracle-db-tools

This project is a repository of sample code that will demonstrate various concepts to assist developers in building applications around Oracle Database technologies. SDKs and scripts will be available to integrate with SQL Developer, Data Modeler, Oracle REST Data Services and DBaaS.
JavaScript
270
star
31

python-oracledb

Python driver for Oracle Database conforming to the Python DB API 2.0 specification. This is the renamed, new major release of cx_Oracle
Python
256
star
32

oci-designer-toolkit

OCI designer toolKIT (OKIT) is a set of tools for enabling design, deploy and visualise OCI environments through a graphical web based interface.
JavaScript
254
star
33

linux-uek

Oracle Linux UEK: Unbreakable Enterprise Kernel
253
star
34

odpi

ODPI-C: Oracle Database Programming Interface for Drivers and Applications
C
235
star
35

weblogic-kubernetes-operator

WebLogic Kubernetes Operator
Java
225
star
36

netsuite-suitecloud-sdk

SuiteCloud Software Development Kit (SuiteCloud SDK) are the set of tools that allow you to customize accounts and create SuiteApps through SuiteCloud Development Framework (SDF).
JavaScript
184
star
37

oracle-r2dbc

R2DBC Driver for Oracle Database
Java
183
star
38

javavscode

Java platform support for Visual Studio Code for full featured Java development (edit-compile-debug & test cycle)
TypeScript
179
star
39

terraform-kubernetes-installer

Terraform Installer for Kubernetes on Oracle Cloud Infrastructure
HCL
178
star
40

oci-java-sdk

Oracle Cloud Infrastructure SDK for Java
Java
163
star
41

pgql-lang

PGQL is an SQL-based query language for property graphs
Java
158
star
42

speedle

Speedle is an open source project for access control.
Go
156
star
43

oci-ansible-collection

Oracle Cloud Infrastructure Ansible Collection provides an easy way to provision and manage resources in Oracle Cloud using Ansible.
Python
152
star
44

oci-go-sdk

Go SDK for Oracle Cloud Infrastructure
Go
150
star
45

wookiee

Scala based lightweight service framework using zookeeper, gRPC, and other popular technologies.
Scala
143
star
46

cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
JavaScript
140
star
47

weblogic-deploy-tooling

WebLogic Deploy Tooling
Python
140
star
48

solaris-userland

Open Source software in Solaris using gmake based build system to drive building various software components.
C
137
star
49

sd4j

Stable diffusion pipeline in Java using ONNX Runtime
Java
131
star
50

analytical-sql-examples

NO LONGER MAINTAINED. Code samples for Oracle's analytical SQL features
PLSQL
127
star
51

container-images

Oracle Linux container images
124
star
52

oracle-database-operator

The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Go
120
star
53

oracle-linux

Scripts, examples, and tutorials to get started with Oracle Linux
Shell
115
star
54

kernel-fuzzing

Fuzzers for the Linux kernel
Hack
109
star
55

oci-cloud-controller-manager

Kubernetes Cloud Controller Manager implementation for Oracle Cloud Infrastucture
Go
109
star
56

macaron

Macaron is an extensible supply-chain security analysis framework from Oracle Labs that supports a wide range of build systems and CI/CD services. It can be used to prevent supply chain attacks or check conformance to frameworks, such as SLSA.
Python
107
star
57

oci-ansible-modules

DEPRECATED - Please migrate to the new OCI Ansible collection (https://github.com/oracle/oci-ansible-collection).
Python
106
star
58

cloud-native-devops-workshop

Oracle's Cloud Native and DevOps Workshop on Oracle Cloud
JavaScript
106
star
59

weblogic-monitoring-exporter

WebLogic Monitoring Exporter exposes metrics and monitoring data through REST APIs for consumption by other tools (e.g. Prometheus)
Java
101
star
60

macest

Model Agnostic Confidence Estimator (MACEST) - A Python library for calibrating Machine Learning models' confidence scores
Jupyter Notebook
99
star
61

hospitality-api-docs

This repository stores REST API specifications and accompanying Postman collections for Oracle Hospitality APIs.
HTML
99
star
62

cloudtestdrive

HTML
94
star
63

font-apex

Font APEX is an open source icon library from the Oracle APEX team.
CSS
93
star
64

coherence-operator

Oracle Coherence Operator
Go
93
star
65

ktf

Kernel Test Framework - a unit test framework for the Linux kernel
Shell
88
star
66

kubernetes-vault-kms-plugin

Go
74
star
67

dtrace-utils

DTrace-utils contains the DTrace port to Linux
C
74
star
68

oci-grafana-metrics

Grafana datasource plugin for OCI metrics
Go
71
star
69

hiq

HiQ - Observability And Optimization In Modern AI Era
Python
68
star
70

accelerated-data-science

ADS is the Oracle Data Science Cloud Service's python SDK supporting, model ops (train/eval/deploy), along with running workloads on Jobs and Pipeline resources.
Python
67
star
71

graphpipe-go

GraphPipe for go
Go
66
star
72

soda-for-java

SODA (Simple Oracle Document Access) for Java is an Oracle library for writing Java apps that work with JSON (and not only JSON!) in the Oracle Database. SODA allows your Java app to use the Oracle Database as a NoSQL document store.
Java
65
star
73

oci-typescript-sdk

Oracle Cloud Infrastructure SDK for TypeScript and JavaScript
TypeScript
64
star
74

oracle-functions-samples

Examples demonstrating how to use Oracle Functions
61
star
75

yo

A fast and simple command line OCI client
Python
60
star
76

solaris-ips

Solaris IPS: Image Packaging System
Python
57
star
77

weblogic-image-tool

WebLogic Image Tool
Java
57
star
78

nvm-direct

A C library to support applications that map Non-Volatile Memory into their address space for load/store access.
C
56
star
79

microservices-datadriven

Sample code of application examples to build microservices with converged Oracle database and multi-cloud / hybrid cloud services
CSS
56
star
80

bots-node-sdk

Oracle Bots Node.js SDK
TypeScript
51
star
81

db-appdev-vm

Database Application Development Virtual Machine
Shell
50
star
82

souffle

DEPRECATED. Soufflé is a translator of declarative Datalog programs into the C++ language.
C++
49
star
83

xml-sample-demo

Oracle Database XMLDB Code samples
VBScript
48
star
84

oci-service-broker

Oracle Cloud Infrastructure Service Broker is an open source implementation of Open service broker API Spec for OCI services. Customers can use this implementation to install Open Service Broker in Oracle Container Engine for Kubernetes or in other Kubernetes clusters.
Java
48
star
85

free

Free Oracle technologies for Developers
HTML
47
star
86

oraclesolaris-contrib

oraclesolaris-contrib is a repository focussed on the Oracle Solaris 11.4 StatsStore, using methodologies like REST to connect to Oracle Solaris 11.4 and the new features being introduced in Oracle Solaris 11.4 OS.
Jupyter Notebook
46
star
87

oci-utils

Oracle Cloud Infrastructure utilities
Python
45
star
88

content-and-experience-toolkit

The Oracle Content Management Toolkit and SDKs help you develop custom applications that consume content that is managed in the OCM repository. These applications can be developed in the Content Management Cloud or using 3rd party tools.
JavaScript
45
star
89

navarkos

Enables a Kubernetes federation to automatically manage multi-cluster infrastructure
Go
44
star
90

nosql-examples

This is a top level repository for code examples related to the use of Oracle NoSQL Database.
HTML
44
star
91

rwloadsim

RWP*Load Simulator - your tool for scripting, simulation and much more. Like having a bit of bash and SQL, a nip of C or Java, a dash of awk, a grain of sed plus drops of secret sauce in one single tool. See https://blogs.oracle.com/database/rwploadsim-oracle-db-performance-simluator for the announcement on the Oracle database blog.
C
44
star
92

fmw-chef-cookbook

Official repository of samples that show how to use Chef to provision Oracle Fusion Middleware (FMW) products.
Ruby
43
star
93

oci-dotnet-sdk

Oracle Cloud Infrastructure SDK for .NET
C#
43
star
94

graphpipe-py

GraphPipe for python
Python
42
star
95

terraform-examples

Terraform Examples for Oracle Cloud Infrastructure and Platfrom
41
star
96

heatwave-tpch

SQL scripts for HeatWave benchmarking
41
star
97

oci-data-science-ai-samples

This repo contains a series of tutorials and code examples highlighting different features of the OCI Data Science and AI services, along with a release vehicle for experimental programs.
Jupyter Notebook
41
star
98

oracle-db-appdev-monitoring

Metrics exporter and samples for unified observability for data-centric app dev and microservices
Go
41
star
99

offline-persistence-toolkit

Offline Persistence Toolkit for Javascript Applications
JavaScript
40
star
100

dbt-oracle

dbt (data build tool) adapter for Oracle Autonomous Database
Python
40
star