Image Generator for Tabular Data (IGTD): Converting Tabular Data into Images for Deep Learning Using Convolutional Neural Networks
Image Generator for Tabular Data (IGTD) is an algorithm for transforming tabular data into images. The algorithm assigns each feature to a unique pixel position in the image representation. Similar features are assigned to neighboring pixels, while dissimilar features are assigned to pixels that are far apart. According to the assignment, an image is generated for each sample, in which the pixel intensity reflects the value of the corresponding feature in the sample. One of the most important applications for the generated images is to build Convolutional Neural Networks (CNNs) based on the image representations in subsequent analysis. A publication about the IGTD algorithm is available at https://www.nature.com/articles/s41598-021-90923-y
- Primary: machine learning; computational data modeling
- Secondary: bioinformatics; computational biology
To use this software package, users must possess the basic skills to program and run Python scripts. Users need to process the input data into the data format accepted by the package. Users also need to understand the input parameters of the IGTD algorithm, so that the parameters can be appropriately set to execute the algorithm. To build CNN prediction models based on the converted images, users need to understand the parameters of CNN models and set their values in the model parameter files.
IGTD is a novel algorithm for transforming tabular data into images. Compared with existing methods for converting tabular data into images, IGTD has several advantages.
- IGTD does not require prior knowledge about the features. Thus, it can be used in the absence of domain knowledge.
- IGTD generates compact image representations, in which each pixel represents a unique feature. Deep learning based on compact image representations usually requires less memory and time to train the prediction model.
- IGTD can simultaneously convert multiple data tables of different feature types into multi-channel images for modeling using multi-channel CNNs.
- IGTD has been shown to generate compact image representations promptly, which also better preserve the feature neighborhood structure.
- CNNs trained on IGTD images achieve a better (or similar) prediction performance than both CNNs trained on alternative image representations and prediction models trained on the original tabular data.
- IGTD provides a flexible framework that can be extended to accommodate diversified data and requirements. The size and shape of the image representation can be flexibly chosen.
The package includes four Python scripts.
- IGTD_Functions.py provides all the functions used by the IGTD algorithm. It provides comments explaining the input and output of each function.
- Examples_Of_Table_To_Image_Conversion.py provides examples showing how to run the IGTD algorithm for demo purpose.
- Examples_Of_Multi_Table_To_Image_Conversion.py provides examples showing how to use the IGTD algorithm for converting multiple data tables of different feature types into multi-channel images.
- Prediction_Modeling_Functions.py provides all the functions used for building CNN classification/regression models based on images generated by IGTD.
- Examples_Of_Prediction_On_Images.py provides examples showing how to build CNN classification/regression models for demo purpose.
The package also includes data files for demonstrating its utility
- Example_Gene_Expression_Tabular_Data.txt is gene expression dataset including 100 cancer cell lines and 1600 genes for demonstrating the conversion of tabular data into images.
- Example_Drug_Response_Data.txt is a drug response dataset obtained from Cancer Cell Line Encyclopedia (CCLE), used for building CNN models of drug response prediction.
- Example_Drug_Descriptor_Image_Data folder includes drug descriptor data files of matrix(image) format generated by IGTD. They are used for building CNN models of drug response prediction.
- Example_Gene_Expression_Image_Data folder includes gene expression data files of matrix(image) format generated by IGTD. They are used for building CNN models of drug response prediction.
- Example_Model_Parameters folder includes three files of CNN parameters. CNN2D_SubNetwork.txt includes parameters for CNN layers in the subnetwork of each input data modality. FCNN_Classifier.txt is for classification modeling, including parameters of the dense layers after concatenating the embeddings from subnetworks. FCNN_Regressor.txt includes the same set of parameters as FCNN_Classifier.txt does, but is for regression modeling.
Refer to this README.