tangram.mapping_optimizer.Mapper.train
- Mapper.train(num_epochs, learning_rate=0.1, print_each=100)
Run the optimizer and returns the mapping outcome.
- Parameters
num_epochs (int) – Number of epochs.
learning_rate (float) – Optional. Learning rate for the optimizer. Default is 0.1.
print_each (int) – Optional. Prints the loss each print_each epochs. If None, the loss is never printed. Default is 100.
- Returns
The optimized mapping matrix M (ndarray), with shape (number_cells, number_spots). training_history (dict): loss for each epoch
- Return type
output (ndarray)