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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| liboml-0.0.2.tar.gz | 7.7 kB | Without provenance | Details for liboml-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liboml-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for liboml-0.0.2-py3-none-any.whl |
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
|
Security for liboml 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.