Skylark (Sketching Library)  0.1
/var/lib/jenkins/jobs/Skylark/workspace/algorithms/regression/regression_problem.hpp
Go to the documentation of this file.
00001 #ifndef SKYLARK_REGRESSION_PROBLEM_HPP
00002 #define SKYLARK_REGRESSION_PROBLEM_HPP
00003 
00004 namespace skylark {
00005 namespace algorithms {
00006 
00008 
00010 struct linear_tag {};
00011 
00013 struct polynomial_tag {};
00014 
00016 struct kernel_tag {};
00017 
00018 // TODO more?
00019 
00021 
00023 struct l2_tag {};
00024 
00026 struct l1_tag {};
00027 
00029 template<int dem, int num>
00030 struct lp_tag {};
00031 
00033 
00034 struct no_reg_tag {};
00035 
00036 template<typename PenaltyType>
00037 struct ridge_reg_tag {};
00038 
00039 template<typename NormType>
00040 struct constraint_reg_tag {};
00041 
00051 template<
00052     typename InputMatrixType,
00053     typename RegressionType,
00054     typename PenaltyType,
00055     typename RegularizationType>
00056 struct regression_problem_t {
00057 
00058 };
00059 
00063 template <typename InputMatrixType,
00064           typename PenaltyType>
00065 struct regression_problem_t<InputMatrixType,
00066                             linear_tag,
00067                             PenaltyType,
00068                             no_reg_tag> {
00069 
00070     typedef InputMatrixType input_type;
00071     typedef linear_tag regression_type;
00072     typedef PenaltyType penalty_type;
00073     typedef no_reg_tag regularization_type;
00074 
00075     regression_problem_t(int m, int n, const InputMatrixType &input_matrix) :
00076         m(m), n(n), input_matrix(input_matrix) {
00077         // TODO verify size of input_matrix
00078     }
00079 
00080     const int m;                          
00081     const int n;                          
00082     const InputMatrixType& input_matrix;  
00083 
00084 };
00085 
00086 } // namespace algorithms
00087 } // namespace skylark
00088 
00089 #endif // SKYLARK_REGRESSION_PROBLEM_HPP