Class Reference
%iKnow.Classification.Methods.VectorSpace
Server:appadmin-00044-deployment-6bf4cbc86d-9f4xc
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [%iKnow] >  [Classification] >  [Methods] >  [VectorSpace]
Private  Storage

deprecatedabstract class %iKnow.Classification.Methods.VectorSpace extends Base

This Builder Method implementation generates category term weights as a vector per category that exists in the same vector space as the document term vector. The similarity between the document vector and each of the category vectors can then be calculated using euclidean distance or cosine similarity (angle). Alternatively, these weights can be used for a linear regression formula, calculating a score rather than a similarity/distance.

A combination of global term weights (across the corpus), local term weights (within each category) and normalization (per category) is used to calculate these category vectors.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 6


Summary

Properties
Builder CategoryGlobalTermWeights CategoryLocalTermMetric CategoryLocalTermWeights
CategoryNormalization CustomTermWeights

Methods
%AddToSaveSet %BuildClassificationMethod %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%LoadFromModel %New %NormalizeObject %ObjectModified
%OnNew %OnRemoveTerm %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetCustomWeight %SetCustomWeights
%SetModified %ValidateObject

Subclasses
%iKnow.Classification.Methods.cosineSimilarity %iKnow.Classification.Methods.euclideanDistance %iKnow.Classification.Methods.linearRegression

Properties

• property CategoryGlobalTermWeights as %String(VALUELIST=",none,IDF") [ InitialExpression = "IDF" ];
The corpus-wide relevancy factor to take into account when calculating term weights
• property CategoryLocalTermMetric as %String(VALUELIST=",frequency,spread") [ InitialExpression = "spread" ];
The metric to use for calculating the local term weights
• property CategoryLocalTermWeights as %String(VALUELIST=",binary,linear,logarithmic") [ InitialExpression = "linear" ];
The per-category term weight factor
• property CategoryNormalization as %String(VALUELIST=",none,cosine") [ InitialExpression = "none" ];
Whether and how to normalize the category vectors
• property CustomTermWeights  [ MultiDimensional ];

Methods

• method %BuildClassificationMethod(ByRef pClassifier As %iKnow.Classification.Definition.Classifier, pVerbose As %Boolean = 1, pIncludeBuilderParams As %Boolean = 1) as %Status
• method %LoadFromModel(pDefinition As %iKnow.Classification.Definition.Classifier) as %Status
• method %OnRemoveTerm(pIndex As %Integer) as %Status
Callback invoked whenever an entire term at an index has been removed
• method %SetCustomWeight(pIndex As %Integer, pCategory As %String, pCustomWeight As %Double) as %Status
Sets a custom weight factor for the term at pIndex in pCategory.
• method %SetCustomWeights(pIndex As %Integer, ByRef pCustomWeights) as %Status


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.