utiml

Utilities for multi-label learning

https://github.com/rivolli/utiml

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 8 committers (12.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary

Keywords from Contributors

characterization-measures meta-features meta-learning mtl
Last synced: 11 months ago · JSON representation

Repository

Utilities for multi-label learning

Basic Info
  • Host: GitHub
  • Owner: rivolli
  • Language: R
  • Default Branch: master
  • Size: 1.35 MB
Statistics
  • Stars: 28
  • Watchers: 6
  • Forks: 7
  • Open Issues: 5
  • Releases: 0
Created almost 11 years ago · Last pushed over 4 years ago
Metadata Files
Readme

README.md

utiml: Utilities for Multi-label Learning

Travis-CI Build Status

The utiml package is a framework to support multi-label processing, like Mulan on Weka.

The main methods available on this package are organized in the groups: - Classification methods - Evaluation methods - Pre-process utilities - Sampling methods - Threshold methods

Instalation

The installation process is similar to other packages available on CRAN: r install.packages("utiml")

This will also install mldr. To run the examples in this document, you also need to install the packages: ```r

Base classifiers (SVM and Random Forest)

install.packages(c("e1071", "randomForest")) ```

Install via github (development version)

r devtools::install_github("rivolli/utiml")

Multi-label Classification

Running Binary Relevance Method

```{r} library(utiml)

Create two partitions (train and test) of toyml multi-label dataset

ds <- createholdoutpartition(toyml, c(train=0.65, test=0.35))

Create a Binary Relevance Model using e1071::svm method

brmodel <- br(ds$train, "SVM", seed=123)

Predict

prediction <- predict(brmodel, ds$test)

Show the predictions

head(as.bipartition(prediction)) head(as.ranking(prediction))

Apply a threshold

newpred <- rcut_threshold(prediction, 2)

Evaluate the models

result <- multilabelevaluate(ds$tes, prediction, "bipartition") thresres <- multilabelevaluate(ds$tes, newpred, "bipartition")

Print the result

print(round(cbind(Default=result, RCUT=thresres), 3)) ```

Running Ensemble of Classifier Chains

```{r} library(utiml)

Create three partitions (train, val, test) of emotions dataset

partitions <- c(train = 0.6, val = 0.2, test = 0.2) ds <- createholdoutpartition(emotions, partitions, method="iterative")

Create an Ensemble of Classifier Chains using Random Forest (randomForest package)

eccmodel <- ecc(ds$train, "RF", m=3, cores=parallel::detectCores(), seed=123)

Predict

val <- predict(eccmodel, ds$val, cores=parallel::detectCores()) test <- predict(eccmodel, ds$test, cores=parallel::detectCores())

Apply a threshold

thresholds <- scutthreshold(val, ds$val, cores=parallel::detectCores()) new.val <- fixedthreshold(val, thresholds) new.test <- fixed_threshold(test, thresholds)

Evaluate the models

measures <- c("subset-accuracy", "F1", "hamming-loss", "macro-based")

result <- cbind( Test = multilabelevaluate(ds$tes, test, measures), TestWithThreshold = multilabelevaluate(ds$tes, new.test, measures), Validation = multilabelevaluate(ds$val, val, measures), ValidationWithThreshold = multilabelevaluate(ds$val, new.val, measures) )

print(round(result, 3)) ```

More examples and details are available on functions documentations and vignettes, please refer to the documentation.

How to cite?

@article{RJ-2018-041, author = {Adriano Rivolli and Andre C. P. L. F. de Carvalho}, title = {{The utiml Package: Multi-label Classification in R}}, year = {2018}, journal = {{The R Journal}}, doi = {10.32614/RJ-2018-041}, url = {https://doi.org/10.32614/RJ-2018-041}, pages = {24--37}, volume = {10}, number = {2} }

Owner

  • Name: Adriano Rivolli
  • Login: rivolli
  • Kind: user

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 265
  • Total Committers: 8
  • Avg Commits per committer: 33.125
  • Development Distribution Score (DDS): 0.2
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Adriano Rivolli r****i@g****m 212
Adriano Rivolli r****i@u****r 41
Adriano Rivolli r****i 5
Adriano a****o@f****z 2
JS Liu j****n@j****a 2
mxhm h****s@p****u 1
Jason Liu 1****s 1
Adriano Rivolli r****i@b****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 16
  • Total pull requests: 5
  • Average time to close issues: 2 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 13
  • Total pull request authors: 3
  • Average comments per issue: 1.31
  • Average comments per pull request: 0.8
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 2 minutes
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rivolli (2)
  • jasopolis (2)
  • ajcanepa (2)
  • hgweon (1)
  • tienmt (1)
  • SedaArat (1)
  • vtshen (1)
  • danspeck (1)
  • abbylsmith (1)
  • mxhm (1)
  • phoxis (1)
  • xwfkl (1)
  • ElenJ (1)
Pull Request Authors
  • jasopolis (3)
  • vtroost (1)
  • mxhm (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 267 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
cran.r-project.org: utiml

Utilities for Multi-Label Learning

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 267 Last month
Rankings
Forks count: 9.1%
Stargazers count: 10.4%
Average: 24.2%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 36.1%
Maintainers (1)
Last synced: about 1 year ago

Dependencies

DESCRIPTION cran
  • R >= 3.0.0 depends
  • ROCR * depends
  • mldr >= 0.4.0 depends
  • parallel * depends
  • methods * imports
  • stats * imports
  • utils * imports
  • C50 * suggests
  • e1071 * suggests
  • infotheo * suggests
  • kknn * suggests
  • knitr * suggests
  • markdown * suggests
  • randomForest * suggests
  • rmarkdown * suggests
  • rpart * suggests
  • testthat * suggests
  • xgboost >= 0.6 suggests