0
$\begingroup$

Suppose we have two types of feature A and B. A is defined for all kinds of samples while B is only defined for some of the samples. Here, B is partially defined does not mean B is missing value (such as NaN) for the rest of the samples. In fact, we can not define a well-defined feature B in such samples.

For example, for stock market and commodity market, price feature (A) do exist in both of them. However, only commodity market has the concept of inventory feature (B).

My question is that how we can use feature A and B simultaneously in an unified deep learning model (instead of using them separately in two different models and combine their outputs thereafter)? Is there any frames or neural network structures can handle such problem ?

$\endgroup$

1 Answer 1

0
$\begingroup$

You can fill the B features with zeroes where they are not available, and add an extra 0/1 feature indicating whether the B features are present or not.

Then, you can fit whatever neural architecture is more suitable for the nature of the input data, e.g. dense layers with ReLU activations, LSTMs.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.