pseudodynamics.plotting_fns.curve_plot

Functions

behavior_curves(model[, n_grid])

visualize the fit dynamic behavior curves for a single trajectory where the cellstate is 1-dimensional and range in (0,1)

density_by_time(u_b, u_pred_b, T_b[, xlabel])

plot density curve by cellstate

meshgrid_density_by_time(ub, ub_pred, train_DS)

Visualize the observed and predicted 2D mesh grid density

predict_and_vis(model, data_batch, train_DS)

pseudodynamics.plotting_fns.curve_plot.behavior_curves(model, n_grid=300)[source]

visualize the fit dynamic behavior curves for a single trajectory where the cellstate is 1-dimensional and range in (0,1)

pseudodynamics.plotting_fns.curve_plot.density_by_time(u_b, u_pred_b, T_b, xlabel='cell state')[source]

plot density curve by cellstate

Augments:

u_b : [tensor, ndarray] : the observed density of shape [n_timepoints, n_grid] u_pred_b : [tensor, ndarray] : the predicted density of shape [n_timepoints, n_grid] T_b : a list of real-time xlabel : the x label

pseudodynamics.plotting_fns.curve_plot.meshgrid_density_by_time(ub, ub_pred, train_DS, cellstate_1='cellstate1', cellstate_2='cellstate2', fill=True, fig_kws=None)[source]

Visualize the observed and predicted 2D mesh grid density

Augments:

ub : [array, tensor], the observed density ub_pred : array, tensor], density predicted by u_theta train_DS : [Dataset], the Training Dataset defined in PINN.reader, cellstate_[1/2] : the label of the axis fig_kws : dict|None , the keyword augments to control the layout and other params of the subplots

returns:

fig, axs : the matplotlib figure and subplot-axis

Example

>>> ad = ery_mk_ad = sc.read_h5ad("<XXX>.h5ad")
>>> train_DS = PINN.reader.MeshGrid_AnnDS(*args, **kwargs)
>>> model = PINN.models.Cspline_PINN.load_from_checkpoint(*args, **kwargs)