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

Which changes are allowed, and how changes are measured. More...

#include <counterfactual.hpp>

Public Attributes

std::vector< float > scale
 Per-feature distance scale (flat order); a change of scale[j] costs 1. Usually MedianAbsoluteDeviation(background). Empty means 1 for every feature.
 
std::vector< int64_t > immutable
 Features that must not change, for example age or a protected attribute.
 
std::vector< float > lower
 Per-feature [lower, upper] limits (flat order), or empty for none.
 
std::vector< float > upper
 
std::vector< int64_t > integer
 Features rounded to whole numbers at the end (counts, ordinal codes).
 
std::vector< std::vector< int64_t > > one_hot_groups
 Groups of features that one-hot encode one categorical feature: at the end, each group is set to 1 at its largest value and 0 elsewhere. If that loses validity, every category of every group is tried and the nearest valid one kept.
 

Detailed Description

Which changes are allowed, and how changes are measured.

Member Data Documentation

◆ immutable

std::vector<int64_t> pulsatrix::CounterfactualConstraints::immutable

Features that must not change, for example age or a protected attribute.

◆ integer

std::vector<int64_t> pulsatrix::CounterfactualConstraints::integer

Features rounded to whole numbers at the end (counts, ordinal codes).

◆ lower

std::vector<float> pulsatrix::CounterfactualConstraints::lower

Per-feature [lower, upper] limits (flat order), or empty for none.

◆ one_hot_groups

std::vector<std::vector<int64_t> > pulsatrix::CounterfactualConstraints::one_hot_groups

Groups of features that one-hot encode one categorical feature: at the end, each group is set to 1 at its largest value and 0 elsewhere. If that loses validity, every category of every group is tried and the nearest valid one kept.

◆ scale

std::vector<float> pulsatrix::CounterfactualConstraints::scale

Per-feature distance scale (flat order); a change of scale[j] costs 1. Usually MedianAbsoluteDeviation(background). Empty means 1 for every feature.

◆ upper

std::vector<float> pulsatrix::CounterfactualConstraints::upper

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