RepEngineOneHotEncoding¶
Bases: RepEngineBase
Class RepEngineOnehot
is a subclass of RepEngineBase
that generates one-hot encoded representations
for input sequences. This representation is commonly used for tasks in machine learning and bioinformatics,
such as protein sequence classification, where each amino acid in the sequence is represented by a binary vector.
Attributes:
:type engine: str
:param engine: The name of the engine. Default is 'one-hot'
, indicating one-hot encoding representation.
:type max_length: int
:param max_length: The maximum length of the input sequences. Sequences longer than this length will be truncated.
:type name: str
:param name: The name of the representation engine, which is set to `'one-hot'`.
Initializes the RepEngineOnehot
with the specified maximum sequence length. The one-hot encoding will
use this length to determine the size of the output vectors.
dim()
¶
Returns the dimensionality of the one-hot encoded representation, which is the product of the maximum sequence length and the number of possible amino acids.