A toolkit for working with phylogenetic data.
v0.24.0
utils/math/regression/helper.hpp File Reference
#include <cstddef>
#include <vector>

Go to the source code of this file.

Classes

struct  GlmFreedom
 Internal helper structure for GLMs to calcualte the residual degrees of freedom. More...
 

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::utils
 

Functions

double weighted_inner_product (std::vector< double > const &x_input, std::vector< double > const &y_input, std::vector< double > const &weights=std::vector< double >{})
 (Weighted) inner product of two vectors. More...
 
GlmFreedom weighted_mean_centering (std::vector< double > const &y_input, std::vector< double > const &weights, std::vector< size_t > const &strata, bool with_intercept, bool centering, std::vector< double > &y_output)
 (Weighted) mean and centering. More...
 
double weighted_residuals (std::vector< double > const &x_input, std::vector< double > const &y_input, std::vector< double > const &weights, std::vector< double > &y_output)
 Calculate the residuals from (weighted) regression through the origin. More...
 
double weighted_sum (std::vector< double > const &x_input, std::vector< double > const &weights=std::vector< double >{})
 (Weighted) sum of a vector of values. More...
 
double weighted_sum_of_squares (std::vector< double > const &x_input, std::vector< double > const &weights=std::vector< double >{})
 (Weighted) sum of squares. More...