Immutable training set for a character level RNN: a block of text together with the alphabet extracted from it.
StringTrainingSet
01 Syntax
Microsoft.VisualBasic.MachineLearning.RNN.StringTrainingSet
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| fromFile | 1 | Creates a training set by reading a UTF-8 text file. |
| fromString | 1 | Creates a training set from a string. |
| extract | 1 | Extracts a training pair starting at the given position. |
| size | 1 | Returns the number of characters in the training text. |
| vocabularySize | 1 | Returns the alphabet size, i.e. |
03 Properties
04 Members
fromFile(
String)Creates a training set by reading a UTF-8 text file.
Parameters
| Name | Type | Description |
|---|---|---|
fileName | String | Path of the training data file; it must not be |
Returns
The training set built from the file contents.
fromString(
String)Creates a training set from a string.
Parameters
| Name | Type | Description |
|---|---|---|
data | String | The training text. |
Returns
The training set built from the text.
extract(
Int32, Int32(), Int32())Extracts a training pair starting at the given position.
Parameters
| Name | Type | Description |
|---|---|---|
lowerBound | Int32 | Index of the first character of the sequence. |
ix | Int32() | Receives the input sequence indices. |
iy | Int32() | Receives the expected output sequence indices, shifted by one character. |
size
Returns the number of characters in the training text.
Returns
The data size.
vocabularySize
Returns the alphabet size, i.e. the vocabulary size.
Returns
The number of distinct symbols.
Data
Gets the loaded training text.
Alphabet
Gets the alphabet extracted from the training text.