get_test_metric¶
- behavenet.fitting.eval.get_test_metric(hparams, model_version, metric='r2', dtype='test', multioutput='variance_weighted', sess_idx=0)[source]¶
Calculate a single R2 value across all test batches for a decoder.
- Parameters:
hparams (
dict) – needs to contain enough information to specify an autoencodermodel_version (
intorstr) – version from test tube experiment defined inhparamsor the string ‘best’metric (
str, optional) – ‘r2’ | ‘fc’ | ‘mse’dtype (
str) – type of trials to use for computing metric ‘train’ | ‘val’ | ‘test’multioutput (
str) – defines how to aggregate multiple r2 scores; see r2_score documentation in sklearn ‘raw_values’ | ‘uniform_average’ | ‘variance_weighted’sess_idx (
int, optional) – session index into data generator
- Returns:
hparams (
dict): hparams of model used to calculate metricsmetric (
int)
- Return type:
tuple