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
dataset
EmotionDetection.TrainingDatasetThe dataset from which to retrieve the training data.
maxSamples
intThe maximum number of samples to retrieve from the dataset. The default is 1000.
shuffle
boolIndicates whether to shuffle the dataset before selecting samples. The default is true.
seed
int?An optional seed for the random number generator used when shuffling. If
null
, the shuffle operation will not be seeded.neutralSupport
boolSpecifies 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.