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  *
00009  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
00010  */
00011 
00012 #include <shogun/modelselection/ModelSelection.h>
00013 #include <shogun/modelselection/ModelSelectionParameters.h>
00014 #include <shogun/evaluation/CrossValidation.h>
00015 #include <shogun/base/Parameter.h>
00016 
00017 using namespace shogun;
00018 
00019 CModelSelection::CModelSelection(CModelSelectionParameters* model_parameters,
00020         CMachineEvaluation* machine_eval)
00021 {
00022     init();
00023 
00024     m_model_parameters=model_parameters;
00025     SG_REF(m_model_parameters);
00026 
00027     m_machine_eval=machine_eval;
00028     SG_REF(m_machine_eval);
00029 }
00030 
00031 void CModelSelection::init()
00032 {
00033     m_model_parameters=NULL;
00034     m_machine_eval=NULL;
00035 
00036     SG_ADD((CSGObject**)&m_model_parameters, "model_parameters",
00037             "Parameter tree for model selection", MS_NOT_AVAILABLE);
00038 
00039     SG_ADD((CSGObject**)&m_machine_eval, "machine_evaluation",
00040             "Machine evaluation strategy", MS_NOT_AVAILABLE);
00041 }
00042 
00043 CModelSelection::~CModelSelection()
00044 {
00045     SG_UNREF(m_model_parameters);
00046     SG_UNREF(m_machine_eval);
00047 }
00048 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation