Is there anyway to use the weights from a neural net hidden layer as input to another classifier, say a random forest? Of course this is trivial for the training data but how to score new data? Are there any methodologies for this type of ensemble?
Here is a concrete simple example: The training data has 10,000 rows and 2 variables (columns). I want to use the hidden layer of a MLP to do feature engineering - creating new variables from the original 2 that can then be passed into another learning algorithm (along with the original 2 features). If the MLP built has 2 inputs (ignore the bias) and the hidden layer has 2 units, then the weight matrix from input layer to hidden layer would be dimension (2,2) where the entry (1,2) represents the weight from input #1 to hidden unit #2.
I can extract this weight matrix for the training data and pass it to the classifier further down the pipeline. However, my question is how to follow this approach for the test set / new data?