MIML Learning Library
Project description
miml: Multi Instance Multi Label Learning Library for Python
The aim of the library is to ease the development, testing and comparison of classification algorithms for multi-instance multi-label learning (MIML).
Table of Contents
Installation
Use the package manager pip to install miml.
$ pip install mimllearning
Requirements
The requirement packages for miml library are: numpy, scikit-learn, scipy, mil, tensorflow and keras. Installing miml with the package manager does not install the package dependencies. So install them with the package manager manually if not already downloaded.
$ pip install numpy
$ pip install scikit-learn
$ pip install scipy
$ pip install mil
$ pip install tensorflow
$ pip install keras==2.12.0
Usage
Datasets
import pkg_resources
from miml.data.load_datasets import load_dataset
dataset_train = load_dataset(pkg_resources.resource_filename('miml', 'datasets/miml_birds_random_80train.arff'),
delimiter="'")
dataset_test = load_dataset(pkg_resources.resource_filename('miml', 'datasets/miml_birds_random_20test.arff'),
delimiter="'")
Classifier
from miml.classifier import MIMLtoMIBRClassifier, AllPositiveAPRClassifier
classifier_mi = MIMLtoMIBRClassifier(AllPositiveAPRClassifier())
classifier_mi.fit(dataset_train)
results_mi=classifier_mi.evaluate(dataset_test)
Report
from miml.report import Report
report = Report()
report.to_string(dataset_test.get_labels_by_bag(), results_ml)
print("")
report.to_csv(dataset_test.get_labels_by_bag(), results_ml)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mimllearning-0.3.35.tar.gz
(994.7 kB
view hashes)
Built Distribution
mimllearning-0.3.35-py3-none-any.whl
(782.2 kB
view hashes)
Close
Hashes for mimllearning-0.3.35-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c08175c0dce780e6241c85a81aa8e94d5a01a12c5efccfb814ea886072a0b25 |
|
MD5 | eb78b5ac66b9b61c2c344342c23750ae |
|
BLAKE2b-256 | 2260a5ec073dbb6e5c7d601ee34091e99a5a78ae4fad5f0afd1cf5472a7eb9f6 |