Table of Contents

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.TrainingDataset

The dataset from which to retrieve the training data.

maxSamples int

The maximum number of samples to retrieve from the dataset. The default is 1000.

shuffle bool

Indicates 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 bool

Specifies 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.