_deepruotv2
pfi.flow.solvers.external._deepruotv2
DeepRUOTv2 external solver.
DeepRUOTv2_(dist, times, flow_model, growth_model=None, **solver_kwargs)
Fit DeepRUOTv2 from snapshot tensors.
Parameters:
-
dist(list of torch.Tensor) –Snapshot tensors, each of shape
(n_k, ndim). -
times(torch.Tensor of shape (n_snaps,)) –Snapshot times.
-
flow_model(None) –Unused placeholder for API compatibility.
-
growth_model(None, default:None) –Unused placeholder for API compatibility.
-
**solver_kwargs(dict, default:{}) –DeepRUOTv2 solver options. Supported keys include
exp_nameandconfig.
Returns:
-
flow(Module) –Fitted DeepRUOTv2 flow wrapper.
-
growth(Module or None) –Fitted DeepRUOTv2 growth model.
-
loss_hist(ndarray) –Training loss history.
to_deepruot_csv(X, csv_path)
Export time-augmented samples to DeepRUOTv2 CSV format.
Parameters:
-
X(array-like of shape (n_samples, ndim + 1)) –Input matrix with time in the last column.
-
csv_path(str or Path) –Output CSV path.
Returns:
-
df(DataFrame) –Written dataframe with columns
samples, x1, ..., xNwheresamplesstores biological times shifted so the minimum time is 0.