Class Categorization
- Namespace
- LMKit.TextAnalysis
- Assembly
- LM-Kit.NET.dll
A class designed to handle custom classification of plain text content.
public sealed class Categorization
- Inheritance
-
Categorization
- Inherited Members
Constructors
- Categorization(LLM)
Creates an instance of the Categorization class.
Properties
- Confidence
Confidence of the last categorization process, expressed as a floating-point value ranging from 0 to 1.
A score closer to 1 indicates a higher confidence level in the categorization accuracy, while a score closer to 0 suggests lower confidence.
This metric can be used to evaluate and filter predictions based on their reliability.
- Model
Gets the Model instance associated with this object.
- UseEmbeddingClassifier
Gets or sets a value indicating whether the classifier should utilize embeddings strategy instead of completion.
Methods
- CreateTrainingObject(IList<string>, IList<(string, string)>, int)
Creates an object for fine-tuning a categorization model using provided training data.
- GetBestCategory(IList<string>, string, bool, CancellationToken)
Classifies a given text into one of the predefined categories.
- GetBestCategoryAsync(IList<string>, string, bool, CancellationToken)
Classifies a given text into one of the categories from a predefined list asynchronously.