IPredictorClient::PredictAllSegments
Use this method to predict the probabilities that a particular user, the current case, belongs to each segment of a population.
Definition
HRESULT IPredictorClient::PredictAllSegments(IDictionary*dCurrentCase,VARIANT*pvsavSegmentNames,VARIANT*pvsavProbabilities);
Parameters
dCurrentCase
[in] A pointer to the IDictionary interface that contains the current case.
pvsavSegmentNames
[out] A VARIANT used to return a SAFEARRAY containing the segment names.
pvsavProbabilities
[out] A VARIANT used to return a SAFEARRAY containing the membership probabilities associated with the segment names.
Return Values
This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.
Error Values
This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.
Remarks
The Microsoft Research Cluster Engine Data Modeler groups similar users into segments. Similar segments are further grouped into higher order collections of segments, creating a hierarchy from which to analyze trends and discover hidden correlations. The returned probability associated with each segment name indicates the probability that the current user belongs to that segment.
Load the segment model using the LoadModelFromDB or LoadModelFromFile methods prior to using this method.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
The pvsavSegmentNames and pvsavProbabilities parameters contain valid data only if the method completes successfully.