GithubHelp home page GithubHelp logo

mns-csharp / tabular2image Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicomignoni/tab2img

0.0 0.0 0.0 507 KB

A tool to convert tabular data into images, in order to be used by CNNs Inspired by the "DeepInsight" paper.

License: MIT License

Python 100.00%

tabular2image's Introduction

Tab2Img: from tabular data to images

A tool to convert tabular data into images for CNN. Inspired by the DeepInsight paper.

Installation

pip install tab2img

Background

In the paper "DeepInsight: A methodology to transform a non-image data to an image for convolution neural network architecture" the autors propose a method to convert tabular data into images, in order to utilize the power of convolutional neural network (CNN) for non-image structured data.

The Figure illustrates the main idea: given a training dataset equation with equation samples and equation features, we are required to find a function equation, where equation.

There are numerous ways to choose equation. In this implementation, the features are organized with respect to the correlation vector equation, where equation is the target vector. Given equation and equation as

the vector equation express the Pearson correlation coefficient*

where

At this point equation is sorted from the greatest to the smallest, generating the vector of indices

Eventually, the final tensor equation is

The function that maps equation to the right row and column equation of equation is

In this case, being equation a sample, the coefficient is implemented as

Example

from sklearn.datasets import fetch_covtype
from tab2img.converter import Tab2Img

dataset = fetch_covtype()

train = dataset.data
target = dataset.target

model = Tab2Img()
images = model.fit_transform(train, target)

tabular2image's People

Contributors

nicomignoni 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.