AISelector
The AISelector module was developed to simplify selecting the ideal artificial intelligence model for your applications. It automates the process of testing and evaluating different algorithms available in the component, generating a CSV with metrics such as accuracy.
To use the AISelector module, prior knowledge of artificial intelligence is required, as it is designed for users who want to configure, test, and manually interpret the results of different models. If you lack experience in the field, it is recommended to use EasyAI.
In AISelector, you can add multiple models with different parameters and test them all with just one function.
EXAMPLE OF USE
EXAMPLE OF OUTPUT
CLASSES AND METHODS GUIDE
TAIClassificationSelector
constructor Create(aDataset : String; aHasHeader : Boolean = True); : creates the object with the dataset that will be used for training.
aDataSet : CSV file path.
aHasHeader : indicates whether the file has a header.
constructor Create(aDataset : TDataSet); overload; : creates the object with the dataset that will be used for training.
aDataSet : TDataSet object that contains the data that will be used for training. See what the structure should look like here.
procedure RunTests(aCsvResultFile, aLogFile : String; aMaxThreads : Integer = 0; aPercDatasetTest : Integer = 25; aRandomDataset : Boolean = True; aCrossValidation : Boolean = True); : performs a test with each model.
aCsvResultFile : path where a CSV file will be saved containing each tested method along with its results.
aLogFile : path of the log file.
aMaxThreads : optional, the maximum number of threads to be used simultaneously. If set to 0, it will use the number of threads available in the CPU.
aPercDatasetTest : percentage of the database that will be separated for training.
aRandomDataset : indicates whether to choose randomly (True) or whether to take the last X samples for testing (False).
aCrossValidation : indicates if cross-validation is used. The number of different datasets generated for testing will be "100 / aPercDatasetTest"
property Models : TAIClassificationModels;
TAIClassificationModels
procedure AddKNN(aK : Integer); : adds the KNN classification model to the list of models to be tested.
Parameters as per the "create" method of the KNN model.
procedure AddTree(aDepth: Integer; aSplitCriterion: TSplitCriterion); : adds the Decision Tree classification model to the list of models to be tested.
Parameters as per the "create" method of the Decision tree model.
procedure AddNaiveBayes; : adds the Naive Bayes classification model to the list of models to be tested.
Last updated