Is it possible to train a neural network to feed into a Random Forest Classifier or any other type of classifier like XGBoost or Decision Tree?

Is it possible to train a neural network to feed into a Random Forest Classifier or any other type of classifier like XGBoost or Decision Tree?

Manage alerts

Loading saved threads...

Evank · External communityPost link
External question — Data Science Stack Exchange Author: Evank Original post: https://datascience.stackexchange.com/questions/129041 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I want to create a model architecture to predict future stock price movement as such: The Goal of this model is to predict if the price will go UP or DOWN within the next 3 months. I have tried a few models such as Logistic Regression, Neural Networks, XGBoost, etc. Ive received some decent results. Through using a Random Forest Classifier I have received the best results so far. I received some suggestions about using an AutoEncoder then feeding the encoded data into a decision tree. My only issue with this methodology is that I want the encoded data to have added value from the neural network not just a compressed version of the data. So my question is: How can I encode data through using a neural network then pass those values to a Random Forest Classifier to make the classification rather than using a final output layer using a sigmoid function as shown in the picture(Using Python, Keras, and SKlearn). Ive also read some stuff about neural backed decision trees but I have no clue how to implement them and if it would even work in my case
Quote
Report
Christian Geils · External communityPost link
External answer — Data Science Stack Exchange Author: Christian Geils Original post: https://datascience.stackexchange.com/a/129653 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. yes this is possible. It's quite common in NLP to have a pretrained model like BERT produce embeddings for you and then apply a model (random forest, support vector machine, etc.) to those embeddings to make a prediction. However, in that case you're only optimizing the end of the model, while the neural network that produces the embeddings remains the same. If you're trying to optimize the entire model (Random Forest AND neural network), then I would recommend looking into Skorch, which is a wrapper for pytorch with scikit-learn compatibility. I've never used it myself but it sounds like it has what you're looking for. Good luck!
Quote
Report

Post Reply

Checking account access…