chessboard.api.analysis.computeLikelihood

chessboard.api.analysis.computeLikelihood(data, x, r)

Compute likelihood on held out test data.

Once the CHESSBOARD model is trained on a dataset and distributional parameters are learned, one can make predictions on held out data. This function returns the likelihood of cluster assignments given a sample vector and tile assignment vector. The tile vector is a binary vector of the sample length as the LSVs in the sample vector which indicate whether each LSV is signal (1) or background (0).

Parameters
  • data (Data) – Chessboard object. Must contain CHESSBOARD output after using chessboard.api.io.Data.addChessboardOutput().

  • x (ndarray) – A vector containing the junction spanning read counts of a sample. The first axis is the junction read counts (index 0) and alternate junction read counts (index 1). The second axis is LSVs. The total number of LSVs must be sample as the data used to train CHESSBOARD.

  • r (ndarray) – Binary vector that indicates whether each sample in the LSV is signal (1) or background (0).

Returns

Vector of log likelihoods where each entry represents assignment to one of the k clusters.

Return type

ndarray