1#ifndef ClassifierParams_h
2#define ClassifierParams_h
4#include "../Genotype.h"
20 unsigned long long int ts_;
33 name_ =
"ClassifierParams";
49 F_ = *((
double*) vp.get());
51 p_ = *((
double*) vp.get());
53 eps_ = *((
double*) vp.get());
65 std::vector<CrossoverOpP> vCrossOp;
70 std::vector<MutationOpP> vMutOp;
76 ss <<
node.getAttribute(
"prediction");
80 ss <<
node.getAttribute(
"fitness");
84 ss <<
node.getAttribute(
"error");
88 ss <<
node.getAttribute(
"as");
92 ss <<
node.getAttribute(
"num");
96 ss <<
node.getAttribute(
"exp");
100 ss <<
node.getAttribute(
"ts");
105 node = XMLNode::createXMLTopNode(
"ClassifierParams");
107 std::stringstream sValue;
109 node.addAttribute(
"prediction", sValue.str().c_str());
113 node.addAttribute(
"fitness", sValue.str().c_str());
117 node.addAttribute(
"error", sValue.str().c_str());
121 node.addAttribute(
"num", sValue.str().c_str());
125 node.addAttribute(
"ts", sValue.str().c_str());
129 node.addAttribute(
"as", sValue.str().c_str());
133 node.addAttribute(
"exp", sValue.str().c_str());
137typedef boost::shared_ptr<ClassifierParams> ClassifierParamsP;
Classifier data structure in XCS algorithm.
void registerParameters(StateP state)
Register genotype's parameters (called before Genotype::initialize)
virtual std::vector< MutationOpP > getMutationOp()
Create and return a vector of mutation operators.
virtual Genotype * copy()
Create an identical copy of the genotype object.
virtual void write(XMLNode &node)
Write genotype data to XMLNode.
virtual void read(XMLNode &node)
Read genotype data from XMLNode.
virtual std::vector< CrossoverOpP > getCrossoverOp()
Create and return a vector of crossover operators.
virtual bool initialize(StateP state)
Initialize a genotype object (read parameters, perform sanity check, build data)
voidP getParameterValue(StateP state, std::string name)
Read single parameter value from Registry.
bool registerParameter(StateP state, std::string name, voidP value, enum ECF::type T, std::string description="")
Register a single parameter.
std::string name_
genotype's name