About Prediction for Solution Sites

The prediction feature recommends products to a user based on items in the user's shopping basket. The Solution Sites use the PredictorClient object to make these recommendations.

Initialization

Initialization for the prediction feature occurs in the following files:

include\global_predictor_lib.asp

The PredictorClient object is created in the InitPredictor function of this file and used to load the Transaction prediction model, which is supplied with Commerce Server, from the Data Warehouse. Two prediction properties, fpPopularityPenalty and fpDefaultConfidence, are set in this file.

In development mode, the bFailOnUnknownInputAttributes property may be set to True by uncommenting a line of code. With this property set, a run time error is generated if any of the input attributes are not recognized.

include\global_main_lib.asp

The InitPredictor function is called from the Main subroutine in this file and the returned PredictorClient object is set to Application scope as MSCSPredictor.

Browse Time

The following file displays the prediction feature:

basket.asp

The RenderBasketPage subroutine is used to call the htmRenderPredictions function which sets up the input case and calls the Predict method of the PredictorClient object to make the recommendations of which products to purchase. The PredictedPropToHREF function is used to create links into the product catalog from the recommended products.

See Also

About the Basket Feature for the Solution Sites

Business Analysis Objects

Copyright © 2005 Microsoft Corporation.
All rights reserved.