#ifndef MLPP_STAT_H #define MLPP_STAT_H // // Stat.hpp // // Created by Marc Melikyan on 9/29/20. // #include class Stat { public: // These functions are for univariate lin reg module- not for users. double b0Estimation(const std::vector &x, const std::vector &y); double b1Estimation(const std::vector &x, const std::vector &y); // Statistical Functions double mean(const std::vector &x); double median(std::vector x); std::vector mode(const std::vector &x); double range(const std::vector &x); double midrange(const std::vector &x); double absAvgDeviation(const std::vector &x); double standardDeviation(const std::vector &x); double variance(const std::vector &x); double covariance(const std::vector &x, const std::vector &y); double correlation(const std::vector &x, const std::vector &y); double R2(const std::vector &x, const std::vector &y); double chebyshevIneq(const double k); // Extras double weightedMean(const std::vector &x, const std::vector &weights); double geometricMean(const std::vector &x); double harmonicMean(const std::vector &x); double RMS(const std::vector &x); double powerMean(const std::vector &x, const double p); double lehmerMean(const std::vector &x, const double p); double weightedLehmerMean(const std::vector &x, const std::vector &weights, const double p); double contraHarmonicMean(const std::vector &x); double heronianMean(const double A, const double B); double heinzMean(const double A, const double B, const double x); double neumanSandorMean(const double a, const double b); double stolarskyMean(const double x, const double y, const double p); double identricMean(const double x, const double y); double logMean(const double x, const double y); }; #endif /* Stat_hpp */