Method GetTrainingData
- Namespace
- LMKit.TextAnalysis
- Assembly
- LM-Kit.NET.dll
GetTrainingData(TrainingDataset, int, bool, int?, bool)
Retrieves training data for fine-tuning an emotion detection model from the specified dataset.
public static List<(string, EmotionDetection.EmotionCategory)> GetTrainingData(EmotionDetection.TrainingDataset dataset, int maxSamples = 1000, bool shuffle = true, int? seed = null, bool neutralSupport = true)
Parameters
datasetEmotionDetection.TrainingDatasetThe dataset from which to retrieve the training data.
maxSamplesintThe maximum number of samples to retrieve from the dataset. The default is 1000.
shuffleboolIndicates whether to shuffle the dataset before selecting samples. The default is true.
seedint?An optional seed for the random number generator used when shuffling. If
null, the shuffle operation will not be seeded.neutralSupportboolSpecifies whether support for neutral samples should be included. The default is true.
Returns
- List<(string, EmotionDetection.EmotionCategory)>
A list of tuples, where each tuple contains a string (the text) and a EmotionDetection.EmotionCategory (the emotion label).
Exceptions
- ArgumentException
Thrown if the dataset is not recognized.