Statistics.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2011 Heiko Strathmann
00008  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
00009  *
00010  * ALGLIB Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier under GPL2+
00011  * http://www.alglib.net/
00012  * See method comments which functions are taken from ALGLIB (with adjustments
00013  * for shogun)
00014  */
00015 
00016 #ifndef __STATISTICS_H_
00017 #define __STATISTICS_H_
00018 
00019 #include <shogun/base/SGObject.h>
00020 
00021 namespace shogun
00022 {
00023 
00027 class CStatistics: public CSGObject
00028 {
00029 
00030 public:
00031 
00037     static float64_t mean(SGVector<float64_t> values);
00038 
00044     static float64_t variance(SGVector<float64_t> values);
00045 
00051     static float64_t std_deviation(SGVector<float64_t> values);
00052 
00067     static float64_t confidence_intervals_mean(SGVector<float64_t> values,
00068             float64_t alpha, float64_t& conf_int_low, float64_t& conf_int_up);
00069 
00083     static float64_t student_t_distribution(int32_t k, float64_t t);
00084 
00092     static float64_t inverse_student_t_distribution(int32_t k, float64_t p);
00093 
00104     static float64_t incomplete_beta(float64_t a, float64_t b, float64_t x);
00105 
00114     static float64_t inverse_incomplete_beta(float64_t a, float64_t b,
00115             float64_t y);
00116 
00132     static float64_t inverse_normal_distribution(float64_t y0);
00133 
00135     inline virtual const char* get_name() const
00136     {
00137         return "Statistics";
00138     }
00139 
00140 protected:
00147     static float64_t ibetaf_incomplete_beta_ps(float64_t a, float64_t b,
00148             float64_t x, float64_t maxgam);
00149 
00154     static float64_t ibetaf_incomplete_beta_fe(float64_t a, float64_t b,
00155             float64_t x, float64_t big, float64_t biginv);
00156 
00161     static float64_t ibetaf_incomplete_beta_fe2(float64_t a, float64_t b,
00162             float64_t x, float64_t big, float64_t biginv);
00163 };
00164 
00165 }
00166 
00167 #endif /* __STATISTICS_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation