| process_y_sequential | R Documentation |
Preprocesses outcome data (y) into a format suitable for Keras models.
Handles both regression (numeric) and classification (factor) outcomes,
including one-hot encoding for classification.
process_y_sequential(y, is_classification = NULL, class_levels = NULL)
y |
A vector of outcomes. |
is_classification |
Logical, optional. If |
class_levels |
Character vector, optional. The factor levels for
classification outcomes. If |
A list containing:
y_proc: The processed outcome data (matrix or one-hot encoded array).
is_classification: Logical, indicating if y was treated as classification.
num_classes: Integer, the number of classes for classification, or NULL.
class_levels: Character vector, the factor levels for classification, or NULL.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.