synthval.metrics.FCNNAccuracyMetric#

class synthval.metrics.FCNNAccuracyMetric(test_percentage=0.2, rng_seed=0, network_params=synthval.configs.DEFAULT_NETWORK_PARAMS, training_params=synthval.configs.DEFAULT_TRAINING_PARAMS, testing_params=synthval.configs.DEFAULT_TESTING_PARAMS)#

Bases: SimilarityMetric

Similarity Metric computing the Accuracy of a fully-connected neural networks trained to distinguish between the points belonging to the distributions real_dist and synth_dist.

Parameters:
  • test_percentage (float)

  • rng_seed (int)

  • network_params (dict)

  • training_params (dict)

  • testing_params (dict)

test_percentage#

Percentage of the samples to use for the testing of the network, and therefore for computing the final metric (default: 0.2).

Type:

float, Optional

rng_seed#

Random Generator seed used for numpy utilities (default: 0).

Type:

int, Optional

network_params#

Contains the relevant parameters needed to build the network. Refer to configs.DEFAULT_NETWORK_PARAMS for an example (default: configs.DEFAULT_NETWORK_PARAMS).

Type:

dict, Optional

training_params#

Contains the relevant parameters needed to train the network. Refer to configs.DEFAULT_TRAINING_PARAMS for an example (default: configs.DEFAULT_TRAINING_PARAMS).

Type:

dict, Optional

testing_params#

Contains the relevant parameters needed to test the network. Refer to configs.DEFAULT_TESTING_PARAMS for an example (default: configs.DEFAULT_TESTING_PARAMS).

Type:

dict, Optional

calculate(real_dist_df, synth_dist_df)#

Compute the Accuracy of a fully-connected neural networks trained to distinguish between the points belonging to the distributions real_dist and synth_dist.

Parameters:
  • real_dist_df (pandas.DataFrame) – Set of samples representing distribution real_dist.

  • synth_dist_df (pandas.DataFrame) – Set of samples representing distribution synth_dist.

Returns:

A numpy array containing the final accuracy computed on the test set.

Return type:

numpy.ndarray