pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::CounterfactualResult Struct Reference

A counterfactual and how good it is (the DiCE metrics, for one counterfactual). More...

#include <counterfactual.hpp>

Collaboration diagram for pulsatrix::CounterfactualResult:

Public Attributes

Tensor counterfactual
 
bool valid = false
 True when the counterfactual reaches the target, after rounding and one-hot projection.
 
float output_before = 0.0f
 The target output (CounterfactualTarget::index) before and after.
 
float output_after = 0.0f
 
float distance = 0.0f
 Sum over features of |change| / scale: the objective's distance (proximity).
 
float l2 = 0.0f
 Euclidean length of the raw change.
 
int64_t num_changed = 0
 Number of features that changed (sparsity).
 
int rounds = 0
 
float final_lambda = 0.0f
 

Detailed Description

A counterfactual and how good it is (the DiCE metrics, for one counterfactual).

Member Data Documentation

◆ counterfactual

Tensor pulsatrix::CounterfactualResult::counterfactual

◆ distance

float pulsatrix::CounterfactualResult::distance = 0.0f

Sum over features of |change| / scale: the objective's distance (proximity).

◆ final_lambda

float pulsatrix::CounterfactualResult::final_lambda = 0.0f

◆ l2

float pulsatrix::CounterfactualResult::l2 = 0.0f

Euclidean length of the raw change.

◆ num_changed

int64_t pulsatrix::CounterfactualResult::num_changed = 0

Number of features that changed (sparsity).

◆ output_after

float pulsatrix::CounterfactualResult::output_after = 0.0f

◆ output_before

float pulsatrix::CounterfactualResult::output_before = 0.0f

The target output (CounterfactualTarget::index) before and after.

◆ rounds

int pulsatrix::CounterfactualResult::rounds = 0

◆ valid

bool pulsatrix::CounterfactualResult::valid = false

True when the counterfactual reaches the target, after rounding and one-hot projection.


The documentation for this struct was generated from the following file: