You are here: Symbol Reference > ClassifierExt Namespace > Classes > TDaalKNNClassifier Class > TDaalKNNClassifier Methods > Train Method > TDaalKNNClassifier.Train Method (TMtx, TMtxInt, TVecInt, TMtxInt, TVecInt)
Data Miner
ContentsIndex
PreviousUpNext
TDaalKNNClassifier.Train Method (TMtx, TMtxInt, TVecInt, TMtxInt, TVecInt)

Trains model with Labels (classes) and Source which can be continuous, categorical or ordinal data.

Pascal
procedure Train(srcContinuous: TMtx; srcCategorical: TMtxInt; srcCategoryCount: TVecInt; srcOrdinal: TMtxInt; srcLabels: TVecInt); override;

Features (or attributes) are stored in rows. Column count is reflective of observation count and needs to match among continuous, categorical and ordinal data. You can convert features stored in columns in to features stored in rows by transposing the matrices. srcCategoryCount needs to store the total number of distinct category values. After the call, dstLabels holds results of prediction in one single row. Row count for individual source matrices can be zero, but column count must match. (Implements "Structure of Arrays" input.)

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!