# Doing predictive modeling on predicted value

It's a project that I'm working on. Here are the steps I took:

I want to make a recommendation service based on the customer data. I first used a collaborative filtering method to get the recommended products. Then I am trying to use that result as a target variable of my random forest model.

The specifics:

1. My data: Columns A, B, C, D, E, F. Each row indicates each customer.
2. Do unsupervised learning(collaborative filtering) to make a recommendation. Only used column A (which has information about the products they have bought) Choose one recommendation product for each customer, and make that into a categorical column
3. Merge that column with the original data, and take out column A
4. My data: Columns B, C, D, E, F, NEW_COLUMN
5. Use supervised learning to get important features that explains the NEW_COLUMN
6. I am trying to use supervised learning on the NEW_COLUMN because I want to get some useful predictions that could be used to explain the reason for the NEW_COLUMN(the recommended products)

This is the path that I'm taking. However, is it okay to do predictive modeling with the data that I made using predictive modeling?

Also, if there are any references, it would be a great help!

• Generally, a pipeline that uses unsupervised methods and then supervised methods might make sense. Still, in order to get more helpful answers you should describe the problem you are trying to solve and why you have chosen using this method. – yoav_aaa Oct 29 '19 at 11:53
• @yoav_aaa Thanks for the tip. I added more information to the question :) – G K Oct 31 '19 at 2:29
• Could you further explain the goal of the random forest model? What are you using it for? – Romain Reboulleau Oct 31 '19 at 4:18
• @RomainReboulleau I'm trying to use the RF model to select feature importance. I thought it could give me insights whether there are any hidden patterns in the customer's traits that explains the 'why' for the recommended product. – G K Oct 31 '19 at 5:21

Your approach seems valid. It is not even biaised because you don't use other features than A to build F.