type TLinearClassifier = class(TStatisticClassifier);
Implementation of the "Linear classifier" classifier.
The classifier is very similar to the Naive Bayes, with several important differences. It can natively process real valued attributes, it is invariant to the prior probability and works well even, if there is only one learned example per class. Classification accuracy is close to the one of the Naive Bayes.
Properties
| Name | Type | Description |
|---|---|---|
| AttributeEnabled | boolean | Set the value at index to True/False, to enable/disable the corresponding attribute. |
| Classes | TLClassesList | Pointer to list of classes with attribute descriptions and stored learned data. |
| OnFirstRecord | TNotifyEvent | Called by LearnData method and K-NN to request the positioning to the first record. |
| OnIndexNextRecord | TIndexNextRecord | Called by LearnData method and K-NN to browse through the learn dataset. |
| OnLastRecord | TNotifyEvent | Called by LearnData method and K-NN when the last record is fetched. |
| OnNameNextRecord | TNameNextRecord | Called by LearnData method and K-NN to browse through the learn data set. |
| OnPopPosition | TPopBookmark | Called by LearnData method and K-NN to restore the current position of the dataset. |
| OnPushPosition | TPushBookmark | Called by LearnData method and K-NN to save the current position of the dataset. |
| RejectProbability | double | If the response of all classes is below RejectProbability the example will not be classified to any of the known classes. |
Methods
| Name | Description |
|---|---|
| AssignAttributeState | Copies the attribute Enabled fields from Source. |
| AttributeQuality | Returns an array of attribute indexes sorted by quality. |
| ClassesName | |
| Classify | |
| ClassifyResponse | |
| ClassifyTest | Performs the classification on the test data, by calling the OnClassifyTest event. |
| ClassIndex | |
| Clear | |
| Create | Create the component. |
| Destroy | |
| DisableAttributes | Disable real valued and discrete attributes for all classes. |
| DisableDiscreteAttributes | Disable discrete attributes for all classes. |
| DisableFloatAttributes | Disable real valued attributes for all classes. |
| EnableAttributes | Enable real valued and discrete attributes for all classes. |
| EnableDiscreteAttributes | Enable discrete attributes for all classes. |
| EnableFloatAttributes | Enable real valued attributes for all classes. |
| Entropy | Returns the average information entropy. |
| Learn | |
| LearnData | Call this method to perform the learn operation on the learn data. |
| LearnIndex | |
| LoadFromFile | Load the component from file named FileName. |
| LoadFromStream | |
| MaxDiscreteEntropy | Returns the maximum entropy of the discrete attribute at AttributeIndex. |
| MaxEntropy | Returns the maximum entropy found to be of the attribute at Index. |
| MaxFloatEntropy | Returns the maximum entropy of the real valued attribute at AttributeIndex. |
| MaxPriorProbability | |
| MissingFloatNumber | Returns numerical representation of MissingFloatValue. |
| PostPrune | Pruning disables some attributes, to improve classification accuracy. |
| PrePrune | Pruning disables some attributes, to improve classificaiton accuracy. |
| Prune | Performs pre-pruning and post-pruning and enables only those attributes giving best classification accuracy towards the test dataset. |
| Reset | |
| SaveToFile | Save the component to file named FileName. |
| SaveToStream | |
| SoftReset | |
| SortIndexRecord | Sort an array of TIndexRecords. |