ModelSelection.cpp

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 
00011 #include <shogun/modelselection/ModelSelection.h>
00012 #include <shogun/modelselection/ModelSelectionParameters.h>
00013 #include <shogun/evaluation/CrossValidation.h>
00014 #include <shogun/base/Parameter.h>
00015 
00016 using namespace shogun;
00017 
00018 CModelSelection::CModelSelection(CModelSelectionParameters* model_parameters,
00019         CCrossValidation* cross_validation) :
00020     m_model_parameters(model_parameters), m_cross_validation(cross_validation)
00021 {
00022     SG_REF(m_model_parameters);
00023     SG_REF(m_cross_validation);
00024 
00025     m_parameters->add((CSGObject**) &m_model_parameters, "model_parameters",
00026             "Parameter tree for model selection");
00027 
00028     m_parameters->add((CSGObject**) &m_cross_validation, "cross_validation",
00029             "Cross validation strategy");
00030 
00031 }
00032 
00033 CModelSelection::~CModelSelection()
00034 {
00035     SG_UNREF(m_model_parameters);
00036     SG_UNREF(m_cross_validation);
00037 }
00038 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation