InterSystems IRIS for Health 2020.4Opens in a new window > Class Reference > %SYS namespace > %iKnow.Classification.Methods.VectorSpace


abstract class %iKnow.Classification.Methods.VectorSpace extends %iKnow.Classification.Methods.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.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property CategoryGlobalTermWeights as %String (VALUELIST = ",none,IDF") [ InitialExpression = "IDF" ];
The corpus-wide relevancy factor to take into account when calculating term weights
Property methods: CategoryGlobalTermWeightsDisplayToLogical(), CategoryGlobalTermWeightsGet(), CategoryGlobalTermWeightsIsValid(), CategoryGlobalTermWeightsLogicalToDisplay(), CategoryGlobalTermWeightsLogicalToOdbc(), CategoryGlobalTermWeightsNormalize(), CategoryGlobalTermWeightsSet()
property CategoryLocalTermMetric as %String (VALUELIST = ",frequency,spread") [ InitialExpression = "spread" ];
The metric to use for calculating the local term weights
Property methods: CategoryLocalTermMetricDisplayToLogical(), CategoryLocalTermMetricGet(), CategoryLocalTermMetricIsValid(), CategoryLocalTermMetricLogicalToDisplay(), CategoryLocalTermMetricLogicalToOdbc(), CategoryLocalTermMetricNormalize(), CategoryLocalTermMetricSet()
property CategoryLocalTermWeights as %String (VALUELIST = ",binary,linear,logarithmic") [ InitialExpression = "linear" ];
The per-category term weight factor
Property methods: CategoryLocalTermWeightsDisplayToLogical(), CategoryLocalTermWeightsGet(), CategoryLocalTermWeightsIsValid(), CategoryLocalTermWeightsLogicalToDisplay(), CategoryLocalTermWeightsLogicalToOdbc(), CategoryLocalTermWeightsNormalize(), CategoryLocalTermWeightsSet()
property CategoryNormalization as %String (VALUELIST = ",none,cosine") [ InitialExpression = "none" ];
Whether and how to normalize the category vectors
Property methods: CategoryNormalizationDisplayToLogical(), CategoryNormalizationGet(), CategoryNormalizationIsValid(), CategoryNormalizationLogicalToDisplay(), CategoryNormalizationLogicalToOdbc(), CategoryNormalizationNormalize(), CategoryNormalizationSet()
property CustomTermWeights [ MultiDimensional ];
Property methods: CustomTermWeightsDisplayToLogical(), CustomTermWeightsGet(), CustomTermWeightsIsValid(), CustomTermWeightsLogicalToDisplay(), CustomTermWeightsLogicalToOdbc(), CustomTermWeightsNormalize(), CustomTermWeightsSet()

Methods (Including Private)

method %BuildClassificationMethod(ByRef pClassifier As %iKnow.Classification.Definition.Classifier, pVerbose As %Boolean = 1, pIncludeBuilderParams As %Boolean = 1) as %Status [ Language = objectscript ]
method %LoadFromModel(pDefinition As %iKnow.Classification.Definition.Classifier) as %Status [ Language = objectscript ]
method %OnRemoveTerm(pIndex As %Integer) as %Status [ Language = objectscript ]
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 [ Language = objectscript ]
Sets a custom weight factor for the term at pIndex in pCategory.
method %SetCustomWeights(pIndex As %Integer, ByRef pCustomWeights) as %Status [ Language = objectscript ]

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)


FeedbackOpens in a new window