Data Science Asked on March 24, 2021
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 ?
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.
Answered by noe on March 24, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP