Share via


PredictorClient Class (PIA)

Use this object to load an analysis model, set properties controlling the prediction context, and run 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.

Methods

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 products to recommend or supplies 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.

Properties

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.

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 by 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 by 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.asax file, to avoid having to explicitly set the values for every Predict method call.

Requirements

Namespace: Microsoft.CommerceServer.Interop.Targeting

Platforms: Windows 2000, Windows Server 2003

Assembly: PredictorClient (in PredictorClient.dll)

See Also

[Visual Basic .NET]Business Analytics

[Visual Basic .NET]Predictor Schema

[Visual Basic .NET]PredictorServiceAdmin Object

[Visual Basic .NET]PredictorServiceSiteAdmin Object

[Visual Basic .NET]PredModelBuilder Object

[Visual Basic .NET]Running the Predictor Resource

Copyright © 2005 Microsoft Corporation.
All rights reserved.