philsupertramp/game-math
Loading...
Searching...
No Matches
Probability.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "../Matrix.h"
9#include "../matrix_utils.h"
10
16 double beta_0;
18 double beta_1;
23};
24
28enum P_NORM {
34 Eukl
35};
36
43double getExponent(double x);
50double round(double x, int precision);
56double abs(double x);
63double pow(double x, int exponent);
70double norm(const Matrix<double>& vec, P_NORM pNorm);
83double cov(const Matrix<double>& x, const Matrix<double>& y);
93double var(const Matrix<double>& x);
94
106Matrix<double> sd(const Matrix<double>& x, int axis = 0);
135
146
164
179
Matrix< double > Regression(const Matrix< double > &A)
double var(const Matrix< double > &x)
LinearModel lm(const Matrix< double > &x, const Matrix< double > &y)
double pow(double x, int exponent)
double getExponent(double x)
double coefficientOfDetermination(const Matrix< double > &y, const Matrix< double > &yHat)
double abs(double x)
P_NORM
Definition: Probability.h:28
@ One
$$||x||_1$$
Definition: Probability.h:32
@ Eukl
$$||x||_2$$
Definition: Probability.h:34
@ Inf
$$||x||_\infty$$
Definition: Probability.h:30
Matrix< double > sd(const Matrix< double > &x, int axis=0)
double norm(const Matrix< double > &vec, P_NORM pNorm)
double round(double x, int precision)
double likelihood(const Matrix< double > &)
double cov(const Matrix< double > &x, const Matrix< double > &y)
Matrix< double > expected_value(const Matrix< double > &A)
Matrix< double > corr(const Matrix< double > &A, const Matrix< double > &B)
Definition: Matrix.h:42
Definition: Probability.h:14
Matrix< double > y_estimate
$$\hat{y}$$ approximated y value for given samples
Definition: Probability.h:20
double beta_0
$$\beta_0$$
Definition: Probability.h:16
Matrix< double > residuals
$$\epsilon_i$$ Residuals of the underlying squared error computations
Definition: Probability.h:22
double beta_1
$$\beta_1$$
Definition: Probability.h:18