finalSOM {somhca} | R Documentation |
Train Final SOM Model
Description
Re-trains the SOM using a specified optimal grid size and number of iterations.
Usage
finalSOM(data, dimension, iterations)
Arguments
data |
A preprocessed data matrix containing the input data for SOM training. |
dimension |
An integer specifying the dimension of the square SOM grid (e.g., 5 results in a 5x5 grid). |
iterations |
An integer defining the number of iterations for training the SOM model. Use a large value, e.g., 500 or higher, for improved training (an error message could suggest that reducing the number of iterations might be necessary). |
Value
A trained SOM model object.
Examples
# Create a toy matrix with 9 columns and 100 rows
data <- matrix(rnorm(900), ncol = 9, nrow = 100) # 900 random numbers, 100 rows, 9 columns
# Run the finalSOM function with the mock data
myFinalSOM <- finalSOM(data, dimension = 6, iterations = 700)
[Package somhca version 0.2.0 Index]