-
Notifications
You must be signed in to change notification settings - Fork 8
Evaluators
Evaluators are modules for fitness computation based on circuit outputs.
Evaluators are identified by their evaluator type
which is used in EACirc configuration file. Every evaluator is build in evaluator_factory
and inherited from evaluator
abstract class. Evaluators should be deterministic and depend solely on provided test vectors and circuit outputs. Design of evaluators needs statistical background, to avoid typical pitfails, read EACirc 2 paper.
Evaluator is selected in config file by subtree evaluator
. The type
is either weight-evaluator
or categories-evaluator
.
The field num-of-categories
is applicable for both and specifies number of bits of circuit's output taken as an input for evaluation. Common value is 8, as EACirc outputs 1 byte.
Test vectors are considered as coming from 2 stream, differentiated by all bits of the expected output byte. Circuit outputs are interpreted by looking at all bits of each byte separately. Fitness is computed as an average per every bit of the ratio of correctly predicted test vectors and all test vectors.
Binary value normalise
specifies, is the fitness will be p-value of measured data (true
), or non-normalised ratio of true_guesses/total_guesses (false
).
Test vectors are considered as coming from 2 stream, differentiated by top bit of the expected output byte. Circuit output bytes are mapped into categories (value modulo number of categories), each byte is considered separately. For each stream there is a separate category map. Fitness is based on weighed Euclidean distance of corresponding categories.
Evaluator has simple interface and it has no internal state.
-
void change_datasets(dataset const& a, dataset const& b)
Updates input to the dataset. -
double apply(Circuit const& circuit)
Return the circuit's fitness value based on the evaluation of datasetsa
andb
in circuitcircuit
.