SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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-2012 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()
00019 {
00020     init();
00021 }
00022 
00023 CModelSelection::CModelSelection(CMachineEvaluation* machine_eval,
00024     CModelSelectionParameters* model_parameters)
00025 {
00026     init();
00027 
00028     m_model_parameters=model_parameters;
00029     SG_REF(m_model_parameters);
00030 
00031     m_machine_eval=machine_eval;
00032     SG_REF(m_machine_eval);
00033 }
00034 
00035 void CModelSelection::init()
00036 {
00037     m_model_parameters=NULL;
00038     m_machine_eval=NULL;
00039 
00040     SG_ADD((CSGObject**)&m_model_parameters, "model_parameters",
00041             "Parameter tree for model selection", MS_NOT_AVAILABLE);
00042 
00043     SG_ADD((CSGObject**)&m_machine_eval, "machine_evaluation",
00044             "Machine evaluation strategy", MS_NOT_AVAILABLE);
00045 }
00046 
00047 CModelSelection::~CModelSelection()
00048 {
00049     SG_UNREF(m_model_parameters);
00050     SG_UNREF(m_machine_eval);
00051 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation