fishtank.decode.logistic_regression

fishtank.decode.logistic_regression#

fishtank.decode.logistic_regression(intensities, weights, plot=False)#

Decode intensities using logistic regression.

Parameters:
  • intensities (DataFrame | ndarray) – A (N,C) array of intensities where N is the number of spots and C is the number of channels.

  • weights (DataFrame) – A dataframe with weights for the logistic regression model.

  • plot (bool (default: False)) – Whether to plot heatmap of intensities annotated with decoded values.

Return type:

tuple[DataFrame, DataFrame]

Returns:

decoding

a DataFrame of spots with decoded value, prob, intensity, and snr columns

bit_performance

a DataFrame with bit, intensity, and snr columns