PredictorClient Object

Ee784321.c++_on(en-US,CS.10).gifEe784321.vb_off(en-US,CS.10).gif

Use this object to load an analysis model, set properties controlling the prediction context, and execute the prediction algorithm. Two types of models are supported, prediction models and segment models. Results of a prediction model are used to recommend products and supply missing profile data. Results of a segment model are used to categorize a user. Prediction models provide more accurate recommendations than segment models and the use of segment models for predictions is discouraged.

ProgID:   Commerce.PredictorClient (Externally creatable)
COM Class Name:   PredictorClient
Type Library Name:   Microsoft Commerce 2000 Predictor Client Type Library
DLL Name:   PredictorClient.dll
Threading Model:   Both

The properties of the PredictorClient object are shown in the following table.

Property Type Description
fpDataFitScore Single Stores the Data Fit Score.

This property is read-only.

fpDefaultConfidence Single Stores the threshold for confidence in a prediction.

This property is read/write.

bFailOnUnknownInputAttributes Boolean Controls the behavior of the Predict method when input attributes are unknown.

This property is read/write.

fpPopularityPenalty Single Stores the penalty applied when selecting popular items to recommend.

This property is read/write.

fpRecommendScore Single Stores the Recommend Score.

This property is read-only.

sSiteName String Stores the site name in which the PredictorClient object is running.

This property is read/write.

The methods of the PredictorClient object are shown in the following table.

Method Description
Explain Explains the prediction of a property in terms of the relevant property/value pairs used as input to the prediction model.
LoadModelFromDB Loads a model from a database.
LoadModelFromFile Loads a model from the specified file.
Predict Predicts recommend products or missing profile data.
PredictAllSegments Calculates the probabilities that the user belongs to each segment of a population of past users.
PredictMostLikelySegment Calculates the segment to which the user most likely belongs.
SaveModelToFile Saves a model to the specified file.

Remarks

Applications that need to anticipate user behavior use the PredictorClient object to load analysis models and generate predictions. The models use a specified set of partial cases as the basis for their predictions. A case is all that is known about a previous user and may contain demographic information and transactional history.

Use the PredModelBuilder object to generate new models. Use the PredictorServiceAdmin object to retrieve a list of models and model configurations. Use the PredictorServiceSiteAdmin object to delete or rename models and model configurations.

Measure the effectiveness of a prediction model using the fpDataFitScore and the fpRecommendScore properties. This allows fine-tuning of the input parameters, such as SampleSize, InputAttributeFraction, and OutputAttributeFraction, when building the model.

Load a model using the LoadModelFromDB or LoadModelFromFile methods prior to using other PredictorClient methods.

For optimum performance when using a prediction model, default values for the fpDefaultConfidence and fpPopularityPenalty properties should be set in the Application_OnStart method in the global.asa file, to avoid having to explicitly set the values for every Predict method call.

See Also

Prediction Objects

Predictor Schema

PredictorServiceAdmin Object

PredictorServiceSiteAdmin Object

PredModelBuilder Object

Running the Predictor Resource


All rights reserved.