gradient_cor_trace: Gradient of L(g) = sum cor(true_C, estimated_C(g) )

View source: R/function_gradient.R

gradient_cor_traceR Documentation

Gradient of L(g) = ∑ cor(true_C, estimated_C(g) )

Description

This function returns the value of the gradient of our Loss-function L.
For the mathematical theory see Goertler et al, 2018. For examples see code of train_deconvolution_model

Usage

gradient_cor_trace(X, Y, C, tweak, estimate.c.type)

Arguments

Y

numeric matrix with samples as columns, and features/genes as rows. Holding bulk gene expressions

C

numeric matrix with reference samples as rows, and samples as columns. Holding cellular composionts

tweak

numeric vector with length of nrow(X). In the Loss function above tweak is named "g"

estimate.c.type

string, either "non_negative", or "direct". Indicates how the algorithm finds the solution of arg min_C ||diag(g)(Y - XC)||_2.

  • If 'estimate.c.type' is set to "direct", there is no regularization (see estimate_c),

  • if 'estimate.c.type' is set to "non_negative", the estimates "C" must not be negative (non-negative least squares) (see (see estimate_nn_c))

X.matrix

numeric matrix, with features/genes as rows, and cell types as column. Each column of X.matrix is a reference expression profile

Value

numeric list, same length as "tweak"


MarianSchoen/DTD documentation built on April 29, 2022, 1:59 p.m.