L_score: Leave one feature out cross validation loss

View source: R/L_score.R

L_scoreR Documentation

Leave one feature out cross validation loss

Description

Leave one feature out cross validation loss for a given dendrogram and dataset. This is an auxiliary function to the main functions CVL and PFIS but can be used separately.

Usage

L_score(dend, original_data, seed = 99, ncores = 2, score = FALSE)

Arguments

dend

Dendrogram of interest (an object of class "phylo")

original_data

Entire dataset (data.frame or matrix) or feature of interest (numeric or factor vector) to compute cross validate loss

seed

Fixed random seed for SIMMAP algorithm. Default is 99.

ncores

Number of cores to paralelize the computing process. Default is 2.

score

Set whether a vector of leave one feature out loss should be computed (TRUE) or compute the overall mean of the loss directly (FALSE)

Value

A numeric vector of leave one feature out losses.


Monoxido45/PhyloHclust documentation built on Sept. 25, 2024, 3:17 a.m.