neg_loglikelihood {scBFA} | R Documentation

## Calculate negative penalized likelihood, used for calls to the optim() function.

### Description

The penalized likelihood function: f(A,Z,β,O,U) = ∑ [lnP(B;A,Z,U,V,β,γ)]_ij - ε_1 * ||A||_2^2 - ε_2 * ||Z||_2^2 - ε_3*||β||_2^2 - ε_2 * ||γ||_2^2

### Usage

    neg_loglikelihood(parameters, modelEnv)

### Arguments

`parameters` | Vectorized parameter space.
`modelEnv` | Environment variable contains parameter space, and global variables such as N,G,C,detection matrix B, etc

### Value

Scalar penalized likelihood

[Package scBFA version 1.6.0 Index]