Making Batch Predictions from a stored procedure RRS feed

  • Question

  • I have a decision tree that will make predictions about customers as they make their first purchase with our company. I'd like to have a table append the predictions and the probabilities of these predictions to a customer table in our reporting database.  So from a table that has all my inputs how can I make a stored procedure that would append my prediction and the probability without having to call an open query statement for each row?


    In other words how can I make a batch prediction on Table with a stored procedure?

    	Predict([Predict_Tree].[Predict Variable]) as [Prediction], 
    	predictProbability([Predict_Tree].[Predict Variable]) as [Probability]
    From [Predict_Tree]
    Natural Prediction Join
    	(Select 12280 as [Key], 
    			999 as [Input1], 
    			'Stuff' as [Input2],
    			'MoreStuffl' as [Input3],
    			'LotsOfStuff' as [Input4],
    			'Deleted' as [Input5],
    			'For' as [Input6],
    			'Privacy' as [Input7],
    			1 as [Input8],
    			2 as [Input9],
    			'Purposes' as [Input10],
    			3 as [Input11],
    			1 as [Input12],
    			0 as [Input13],
    			'bTard' as [Input14]) AS t

    Friday, September 17, 2010 3:30 PM