I have a data set with 6 possible labels of the type:
Class 1: Near-large
Class 2: Far- Large
Class 3: Near - Medium
Class 4: Far - Medium
Class 5: Near - small
Class 6: far - small
And I would like to modify the problem to separate the labels so each sample would be classified as far/near and small/medium/small independently, given different features for each classification as input.
My first idea was to train 2 different models for each sublabel and then make a custom function to join the predictions , but I wonder if there's a quicker way of doing it within the Keras framework.
I know I can use the functional API to create two models with independent inputs and two independent outputs. This would give me 2 predictions for 2 different sublabels. If I one hot encode the sublabels the output of those models would be something like this:
Model1.output = [ 0,1 ] or [1,0] ( far/near)
Model2.output = [ 1, 0, 0 ] or [0,1,0] or [0,0,1](small/medium/large)
But then how can I merge these two outputs to create a 6 dim vector for the complete labels ?
Model_merged.output = [1, 0, 0, 0, 0 ,0 ] , [010000], ...., [000001] (class1,... ,Class6)