deprecatedclass %iKnow.Classification.IFindBuilder
extends %iKnow.Classification.Builder
property CategoryColumn
as %String(MAXLEN=2000) [ ReadOnly ];
property ClassName
as %String(MAXLEN=200) [ ReadOnly ];
property IdColumn
as %String(MAXLEN=200) [ ReadOnly ];
property IndexName
as %String(MAXLEN=200) [ ReadOnly ];
property TableName
as %String(MAXLEN=200) [ ReadOnly ];
property TextColumn
as %String(MAXLEN=200) [ ReadOnly ];
property TrainingSet
as %String(MAXLEN=2000) [ ReadOnly ];
method %GetCategoryInfo(Output pCategories)
as %Status
Returns all categories added so far:
pCategories(n) = $lb([name], [record count])
method %GetRecordCount(Output pSC As %Status)
as %Integer
method %LoadCategoriesFromColumn(pExpression As %String)
as %Status
Loads categories based on the value of the supplied SQL expression.
pExpression should either be the (SQL) name of a column on TableName,
or a valid SQL expression that can be selected from that table (aliased as if required "t").
method %TestClassifier(pTestSet As %RawString = "", Output pResult, Output pAccuracy As %Double, pCategorySpec As %String = "", pVerbose As %Boolean = 0)
as %Status
Utility method to batch-test the classifier against a test set pTestSet, which can
be supplied as a valid SQL WHERE clause to be queried against TableName.
Per-record results are returned through pResult:
pResult(n) = $lb([record ID], [actual category], [predicted category])
pAccuracy will contain the raw accuracy (# of records predicted correctly) of
the current model. Use %iKnow.Classificaton.Utils for more advanced model testing.
If the current model's category options were added through %AddCategory without
providing an appropriate category specification (again through a SQL WHERE clause), rather
than through a call to %LoadCategoriesFromColumn (which sets
CategoryColumn), supply a column name or SQL expression through
pCategorySpec where the actual category values to test against can be found.