API

DynGPT

solver.pre_training(config_pretrain)

Pre-train the neural network model for state transition network.

solver.fine_tune_training(config_fine_tune)

Fine-tune the neural network model using a specified training configuration.

solver.solving_STN(model_name[, params, ...])

Solve the state transition network using a trained neural network model.

inferrer.inferring_dynamics(observed_data, ...)

Infer the underlying dynamic parameters of a state transition network from observed data.

Tools: tl

tl.update_default_config(config_dict)

Update the basic configuration with values from the default configuration.

tl.update_dynmodel_config(config_basic, ...)

Update the basic configuration with parameters from a dynamic model configuration file.

tl.load_synthetic_data(file_path[, ...])

Load and process synthetic data from a JSON file.

tl.compute_sampling_stats(args[, param_index])

Compute statistical metrics for sampled data.

tl.compute_kl_stats(result_infer)

Calculate statistical metrics and the Kullback-Leibler divergence between neural network-generated samples

Plotting: pl

pl.plot_loss(losses)

Plot the loss values over epochs.

pl.plot_model_comparison_stats(result_valid_set)

Plot a comparison of statistical properties (mean, standard deviation, and Kullback-Leibler divergence) between simulation and DynGPT results for a given set of data.

pl.plot_distribution_comparison_nd(result_infer)

Plot a comparison of observed and predicted distributions, using 2D histograms and bar plots to visualize the differences between data and model predictions.

pl.plot_param_posterior_dist(result_infer[, ...])

Plot the posterior distributions of inferred parameters, along with optional true values for comparison.

pl.plot_hist_2d(ax, data, data_max, ...[, ...])

Plot a 2D histogram on the given axes with custom color mapping and labels.

pl.plot_boxplot(ax, data, species_name[, ...])

Plot a boxplot with customization options for states and formatting.

pl.plot_scatter(ax, data1, data2, data_max, ...)

Plot a scatter plot of two datasets on the given axes, with the option to customize appearance and labels.

pl.plot_density(ax, values, weights, ...[, ...])

Plot a density estimate (using kernel density estimation).

pl.plot_jointplot(data1, data2, xy_ticks, ...)

Plot a jointplot of two variables with kernel density estimation.

pl.plot_hist_density(data1, data2, ax[, ...])

Plot a histogram of data1 and overlays a kernel density estimate for data2.