Skip to main content

LIBOML:Library For Online Machine Learning

Here we implement representative online learning algorithms. We split these algorithms into 3 parts:

  • Linear classifiers;
  • Kernel classifiers;
  • Deep classifiers.

The models we have implement:

Name Binary/Multiclass Description
OGDBinaryClassifier binary Online gradient descent algorithm with logistic loss.
OGDClassifier multiclass Online gradient descent algorithm with cross-entropy loss.
PAClassifier binary Passive-aggresive algorithm with 3 types of step-size calculation.
Perceptron binary Perceptron algorithm.
KernelOGD binary Online gradient descent with kernels using logistic loss.
KernelPercetron binary Perceptron with kernels.
KernelSVM binary Online SVM with kernels.
MLPClassifier multiclass Online multi-layer percetron with cross-entropy loss.
ODLClassifier multiclass Online deep learning framework.
ODLAEClassifier multiclass Online deep learning with Auto-Encoder.

Install

pip install liboml

or

git clone https://github.com/Kaslanarian/liboml
cd liboml
python setup.py install

How to use

Our implementation is based on sklearn, so you can easily use it just like this:

from sklearn.dataset import load_breast_cancer
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split

from liboml.linear import OGDClassifier

X, y = load_breast_cancer(return_X_y=True)
train_X, test_X, train_y, test_y = train_test_split(
    X, 
    y, 
    train_size=0.8,
	random_state=42,
)
stder = StandardScaler().fit(train_X)
train_X, test_X = stder.transform(train_X), stder.transform(test_X)

model = OGDClassifier(init_lr=0.1)
model.fit(train_X, train_y)
acc = model.score(test_X, test_y)
print(acc) # 0.9649122807017544

Future

  • More algorithms.
  • Support GPU.

Metadata

Release files for liboml 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liboml 0.0.2
File Size Uploaded
liboml-0.0.2.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for liboml 0.0.2
File Interpreter ABI Platform
liboml-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / liboml-0.0.2.tar.gz

Download URL liboml-0.0.2.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ec0943113dab19a38815f70ae5d13e0dbb1e4660c42c59ff666561821f870d2f
BLAKE2b-256 checksum
How to use checksums
3d53ced323c3187be51a4a6db2bb1279b48360cbd112ce7587a8da8a8077e191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.8

Release files / liboml-0.0.2-py3-none-any.whl

Download URL liboml-0.0.2-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ab2c39094654038d13c219b8f3fe206b7ae3c805dac8f2ede03757215232069
BLAKE2b-256 checksum
How to use checksums
e2ce72ec7a42988dda75cd17586a1307c3cbecb528012aeebc6384b45f88ef63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page