Code Monkey home page Code Monkey logo

multilabelsimilaritiesmeasures's Introduction

MultiLabel Similarities Measures

Compute similarities measures (categorical data) for all labels in label space for a multilabel dataset.

Multi-Label Datasets (original)

Click here to go to the cometa page

10-Fold Cross Validation Multi-Label Datasets

Click here to download

Conda Environment

download txt

download yml

download yaml

To use conda environment to run this experiment, please consult here

Tutorial

https://rpubs.com/cissagatto/MultiLabelSimilaritiesMeasures

How to cite

@misc{Gatto2021, author = {Gatto, E. C.}, title = {Compute Similarities Measures for MultiLabel Classification}, year = {2021}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/cissagatto/MultiLabelSimilaritiesMeasures}}}

Scripts

This code has the following script in the R folder

  1. functions_contingency_table_multilabel.R
  2. functions_measures_binary_data.R
  3. functions_multilabel_binary_measures.R
  4. libraries.R
  5. utils.R
  6. runCV.R
  7. runNCV.R
  8. mlsm.R

FLOWCHART

Preparing your experiment

Step-1

This code is executed in X-fold cross-validation. First, you have to obtain the X-fold cross-validation files using this code. All the instructions to use the code are in the Github. After that, put the results generated in the datasets folder in this project as "tar.gz". The folder structure generated by the code CrossValidation is used here. This code don't work without theses files.

Step-2

A file called datasets.csv must be in the root project folder. This file is used to read information about the datasets and they are used in the code. All 74 datasets available in Cometa are in this file. If you want to use another dataset, please, add the following information about the dataset in the file:

Id, Name, Domain, Labels, Instances, Attributes, Inputs, Labelsets, Single, Max freq, Card, Dens, MeanIR, Scumble, TCS, AttStart, AttEnd, LabelStart, LabelEnd, xn, yn, gridn

The Id of the dataset is a mandatory parameter in the command line to run all code. The fields are used in a lot of internal functions. Please, make sure that this information is available before running the code. xn and yn correspond to a dimension of the quadrangular map for kohonen, and gridn is (xn * yn). Example: xn = 4, yn = 4, gridn = 16.

RUN

To run the code, open the terminal, enter the /MultiLabelSimilaritiesMeasures/R/ folder, and type

Rscript mlsm.R [number_dataset] [number_cores] [number_folds] [name_folder_results]

Where:

number_dataset is the dataset number in the datasets.csv file

number_cores is the total cores you want to use in parallel execution.

number_folds is the number of folds you want for cross-validation

name_folders_results is the name of the folder to save the results

All parameters are mandatory. Example:

Rscript mlsm.R 17 10 10 "/dev/shm/results"

This will execute the code for the dataset number 17 in the dataset.csv, with 10 cores, 10 folds and the process will be store in the /dev/shm/results/. This code automatically makes a copy of the /dev/shm/results in the folder Reports - which is in the root of the project. In this way, you can run the code using a temporary folder, like scratch and shm, to speed up the execution.

IMPORTANT

I used ABS function in all functions that used SQRT. Divisions per zero were treated like zero.

Video Demonstration

Click here to watch a video that demonstrate how to run this code

Acknowledgment

  • This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Finance Code 001.
  • This study was financed in part by the Conselho Nacional de Desenvolvimento Científico e Tecnológico - Brasil (CNPQ) - Process number 200371/2022-3.
  • The authors also thank the Brazilian research agencies FAPESP financial support.

Contact

[email protected]

Links

| Site | Post-Graduate Program in Computer Science | Computer Department | Biomal | CNPQ | Ku Leuven | Embarcados | Read Prensa | Linkedin Company | Linkedin Profile | Instagram | Facebook | Twitter | Twitch | Youtube |

Thanks

multilabelsimilaritiesmeasures's People

Contributors

cissagatto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.