graphorge.gnn_base_model.train.cross_validation.write_cross_validation_summary_file

write_cross_validation_summary_file(cross_validation_dir, device_type, n_fold, n_max_epochs, is_model_in_normalized, is_model_out_normalized, batch_size, loss_nature, loss_type, loss_kwargs, dataset_file_path, dataset, k_fold_loss_array, total_time_sec, avg_time_fold)[source]

Write summary data file for model cross-validation process.

Parameters:
  • cross_validation_dir (dir) – Directory where cross-validation process data is stored.

  • device_type ({'cpu', 'cuda'}) – Type of device on which torch.Tensor is allocated.

  • n_fold (int) – Number of folds into which the data set is split to perform cross-validation.

  • n_max_epochs (int) – Maximum number of training epochs.

  • is_model_in_normalized (bool, default=False) – If True, then model input features are assumed to be normalized (normalized input data has been seen during model training).

  • is_model_out_normalized (bool, default=False) – If True, then model output features are assumed to be normalized (normalized output data has been seen during model training).

  • batch_size (int) – Number of samples loaded per batch.

  • loss_nature (str) – Loss nature.

  • loss_type (str) – Loss function type.

  • loss_kwargs (dict) – Arguments of torch.nn._Loss initializer.

  • dataset_file_path (str) – Data set file path if such file exists. Only used for output purposes

  • dataset (torch.utils.data.Dataset) – Data set.

  • k_fold_loss_array (numpy.ndarray(2d)) – k-fold cross-validation loss array. For the i-th fold, data_array[i, 0] stores the best training loss and data_array[i, 1] stores the average prediction loss per sample.

  • total_time_sec (int) – Total cross-validation time in seconds.

  • avg_time_fold (float) – Average cross-validation time per fold.