SpiDEFit

SpiDEFit(engine, sigma, condition, patients, index, params=dict())

The fitted per-patient niche models of spiDE, returned by spidepy.fit_spide.

Attributes

Name Type Description
engine str "slopes" or "sandwich".
sigma float The niche bandwidth the fit used.
condition str or None The condition the fit was given (R: a character of length 0 or 1). The sandwich engine fits condition-specific slopes only if it was given one; the slopes engine only records it.
patients pandas.DataFrame One row per patient: patient, ncells and every obs column constant within patients (so a condition can be named at test time).
index dict One entry per index cell type holding the engine’s estimates (see the module docs).
params dict The settings the fit used.

See Also

fit_spide : Creates a SpiDEFit. SpiDEResults : The tests of a fit.

Examples

from spidepy import build_niches, fit_spide
from spidepy.datasets import toy_spide
fit = fit_spide(build_niches(toy_spide(), sigma=30), verbose=False)
print(fit)
SpiDEFit (slopes engine), bandwidth 30
  16 patients; condition: none
  index A: 20 genes x 2 niches (B, C)
  index B: 20 genes x 2 niches (A, C)
  index C: 20 genes x 2 niches (A, B)
fit.patients.shape[0]
16