NeuralTSNE.Utils.Writers.StatWriters package

Submodules

NeuralTSNE.Utils.Writers.StatWriters.stat_writers module

save_means_and_vars(data: Tensor, filtered_data: Tensor = None) None[source]View on GitHub

Calculate and save the means and variances of columns in a 2D torch.Tensor to a file.

If filtered_data is provided, it calculates and saves means and variances for both original and filtered columns.

Parameters:
  • data (torch.Tensor) – The input 2D tensor for which means and variances are calculated.

  • filtered_data (torch.Tensor, optional) – A filtered version of the input data. Defaults to None.

Note

  • The function calculates means and variances for each column in the input data.

  • If filtered_data is provided, it also calculates and saves means and variances for the corresponding filtered columns.

save_results(args: dict, test: DataLoader, Y: List[Any] | List[List[Any]])[source]View on GitHub

Save results to a file.

Parameters:
  • args (dict) – Dictionary containing arguments, including the output file path (o) and step size (step).

  • test (DataLoader) – DataLoader for the test dataset.

  • Y (List[Any] | List[List[Any]]) – List of results to be saved.

Note

This function saves the results to a file specified by the output file path in the arguments.

Module contents