How to build a traning data from a set of sparse matrices

Viewed 25

I am trying to build a model for 2 class classification problem (say class-A and class-B). I have two datasets from which I want to generate my training, testing and validation datasets (shown below):

  1. Dataset-1: This dataset has 1092 samples of class-A where each sample as a feature matrix of 1481x163 and 1 label (i.e. class-A). Each sample of this dataset has same index of length 1481 (let's say set of biomarkers) and same 163 features. The matrices are very sparse.

  2. Dataset-2: This dataset is 82 samples of class-B of where each sample has the feature matrices of same size as of class-A (i.e. 1481 biomarkers x 163 features) and 1 label (i.e. class-B). Here also, the matrices are very sparse.

I want to build a model for two class classification but my problem is how to generate one single feature matrix by combining both the classes (especially for non-ANN models such as RF, SVM etc.). By vertical or horizontal flattening of each matrices and then concatenating them might not be useful as the size of array will be very large and will be challenging to find the important features out of 163 features.

Kindly suggest.

0 Answers
Related