ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Normal.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <vector>
5
6#include "stats/Stats.hpp"
7#include "utils/Types.hpp"
8
9namespace ppforest2::stats {
23 class Normal {
24 private:
25 types::Feature mean;
26 types::Feature std_dev;
27
28 std::optional<types::Feature> cached_z;
29
40 double gen_unif01(RNG& rng);
41
48 types::Feature denormalize(types::Feature z) const;
49
50 public:
58
76
84 std::vector<types::Feature> operator()(int count, RNG& rng);
85 };
86}
types::Feature operator()(RNG &rng)
Generate a single normal variate via the Box-Muller transform.
Normal(types::Feature mean, types::Feature std_dev)
Construct a Normal generator.
std::vector< types::Feature > operator()(int count, RNG &rng)
Generate multiple normal variates.
Statistical infrastructure for training and evaluation.
Definition ConfusionMatrix.hpp:11
pcg32 RNG
Definition Stats.hpp:24
float Feature
Scalar type for feature values.
Definition Types.hpp:24