Software: TINTOlib - Python library for transforming tabular data into images with 2-Dimensional Convolutional Neural Networks

TINTO Logo

Abstract

TINTOlib is a state-of-the-art library that wraps the most important techniques for the construction of Synthetic Images from Sorted Data (also known as Tabular Data).

Citing TINTO: If you used TINTOlib in your work, please cite the INFFUS Paper:

@article{inffus_TINTO,
    title = {A novel deep learning approach using blurring image techniques for Bluetooth-based indoor localisation},
    journal = {Information Fusion},
    author = {Reewos Talla-Chumpitaz and Manuel Castillo-Cara and Luis Orozco-Barbosa and Raúl García-Castro},
    volume = {91},
    pages = {173-186},
    year = {2023},
    issn = {1566-2535},
    doi = {https://doi.org/10.1016/j.inffus.2022.10.011}
}

And the SoftwareX paper

@article{softwarex_TINTO,
    title = {TINTO: Converting Tidy Data into Image for Classification with 2-Dimensional Convolutional Neural Networks},
    journal = {SoftwareX},
    author = {Manuel Castillo-Cara and Reewos Talla-Chumpitaz and Raúl García-Castro and Luis Orozco-Barbosa},
    year = {2023},
    issn = {2352-7110},
    volume = {22},
    pages = {101391},
    doi = {https://doi.org/10.1016/j.softx.2023.1013911}
}

Documentation

You can find all the documentation and sources of TINTOlib in Read the Docs.

Main Features

  • TINTOlib use seven different state-of-art methods: TINTO, IGTD, Refined, SuperTML, DistanceMatrix, BarGraph and Combination.
  • Supports all CSV data in Tidy Data format.
  • For now, the algorithm converts tabular data for regression and classification problems into machine learning.
  • Input data formats:
    • Tabular files: The input data must be in CSV, taking into account the Tidy Data format.
    • Tidy Data: The target (variable to be predicted) should be set as the last column of the dataset. Therefore, the first columns will be the features.
    • All data must be in numerical form. TINTOlib does not accept data in string or any other non-numeric format.
  • Depends on the method, the synthetic images to be created will be in black and white, i.e. in 1-channel, o RGB, i.e., 3-channel.
  • Runs on Linux, Windows and macOS systems.
  • Compatible with Python 3.7 or higher.

Models

ModelClassFeaturesHyperparameters
TINTOTINTO()blurproblem algorithm pixels blur amplification distance steps option seed times verbose
SuperTMLSuperTML() problem columns font_size image_size verbose
IGTDIGTD() problem scale fea_dost_method image_dist_method save_image_size max_step val_step error switch_t min_gain seed verbose
REFINEDREFINED() problem hcIterations verbose
BarGraphBarGraph() problem pixel_width gap verbose
DistanceMatrixDistanceMatrix() problem scale verbose
CombinationCombination() problem pixel_width gap verbose

Documentation

Read the documentation.

Input

The following table shows a classic example of the IRIS CSV dataset as it should look like for the run:

sepal lengthsepal widthpetal lengthpetal widthtarget
4.93.01.40.21
7.03.24.71.42
6.33.36.02.53

Output

The following Figure show the output of TINTO:

Getting Started

You can install Data2Image using Pypi(test):

    pip install TINTOlib

To import a specific model use

    from TINTOlib.tinto import TINTO

Create the model. If you don’t set any hyperparameter, the model will use the default values (read documentation).

    model = tinto(blur=True)

To generate the synthetic images use .genereateImages(data,folder) method.

    model.generateImages(data, resultsFolderPath)

License

Data2Image is available under the Apache License 2.0.

Authors