stereo.algorithm.spa_track.SpaTrack.gr_training

SpaTrack.gr_training(tfs_path=None, ptime_path=None, min_cells=None, cell_divide_per_time=80, cell_select_per_time=10, cell_generate_per_time=500, train_ratio=0.8, use_gpu=True, random_state=0, training_times=10, iter_times=30, mapping_num=3000, filename='weights.csv', lr_ratio=0.1)[source]

Create and run a trainer for gene regulatory network training with a single sample contating pesudotime.

Parameters:
  • tfs_path (Optional[str]) – The path of the tf names file, defaults to None

  • ptime_path (Optional[str]) – The path of the ptime file, used to determine the sequence of the ptime data, defaults to None

  • min_cells (Optional[int]) – The minimum number of cells for gene filtration, defaults to None

  • cell_divide_per_time (int) – The cell number generated at each time point using the meta-analysis method, defaults to 80

  • cell_select_per_time (int) – The number of randomly selected cells at each time point, defaults to 10

  • cell_generate_per_time (int) – The number of cells generated at each time point, defaults to 500

  • train_ratio (float) – Ratio of training data, defaults to 0.8

  • use_gpu (bool) – Whether to use gpu, by default, to use if available.

  • random_state (int) – Random seed of numpy and torch, fixed for reproducibility, defaults to 0

  • training_times (int) – Number of times to randomly initialize the model and retrain, defaults to 10

  • iter_times (int) – The number of iterations for each training model, defaults to 30

  • mapping_num (int) – The number of top weight pairs you want to extract, defaults to 3000

  • filename (str) – The name of the file to save the weights, defaults to “weights.csv”

  • lr_ratio (float) – The learning rate, defaults to 0.1

Returns:

A trainer object for gene regulatory network training.