tableBestModels | R Documentation |
This function creates a data frame summarizing the best models from a list, displaying model names, AUC scores, and model gene sets.
tableBestModels(model.sim)
model.sim |
A list of models, where each model is represented by a sublist containing elements with names that include '"score"' for the model's AUC score and '"model"' for the selected features. |
The function iterates through the provided models, extracting and formatting the AUC score and sorted feature list for each. The resulting table includes: - **N**: Model identifier (e.g., "N1" for the first model). - **AUC**: The AUC score for the model. - **MGS**: The model gene set, showing selected features in sorted order.
**Structure**: - The function processes up to 20 models, or the number of available models if fewer than 20. - For each model, it retrieves the AUC score (by searching for '"score"' in the model name) and the model gene set (by searching for '"model"').
A data frame with columns: - 'N': Identifier for each model (e.g., "N1", "N2"). - 'AUC': The AUC score for each model, rounded to 4 decimal places. - 'MGS': A string representing the sorted model gene set for each model.
## Not run:
model.sim <- list(
model_N1 = list(score = 0.85, model = c("geneA", "geneB", "geneC")),
model_N2 = list(score = 0.90, model = c("geneC", "geneD", "geneE"))
)
best_models_table <- tableBestModels(model.sim)
print(best_models_table)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.