The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



How to use TMemBasedLearner



The class TMemBasedLearner is a class to create and apply kNN models. As a kNN model is actually nothing else but a dataset the creation of a kNN model can be achieved by copying the model data into the property ModelData and setting the VarType parameter accordingly. As an alternative the model data can be loaded from disk by using the functions LoadModelBin or LoadModelXML.

In order to apply a kNN model you simply load the model data, set the parameters DistMode, NumNearestNb, LocalModel and ScalingMode and call the function ApplyModel.

Note that there are a few other functions which allow you to gain insight into the data structure of your model: CalcContingencyTable, CalcNNOfModelData, CountIndependentVars, CountTargetVars


Last Update: 2023-May-06