Go to the documentation of this file.
9 #ifndef __hog2_glut__LogisticRegression__
10 #define __hog2_glut__LogisticRegression__
29 void save(
const char *);
31 void load(
const char *);
37 double train(std::vector<double> &input, std::vector<double> &output2);
38 double *
test(
const std::vector<double> &input);
39 double train(std::vector<unsigned int> &input, std::vector<double> &output2);
40 double *
test(
const std::vector<unsigned int> &input);
45 void setInputWeight(
double value,
unsigned int weightNum,
unsigned int whichOutput=0);
60 double GetInput(std::vector<double> &input,
const std::vector<double> &target)
61 { assert(!
"Unimplemented"); }
68 double outputerr(std::vector<double> &
output, std::vector<double> &expected,
int which);
71 std::vector<std::vector<double> >
weight;
72 std::vector<std::vector<updateData> >
updates;
void setInputWeight(double value, unsigned int weightNum, unsigned int whichOutput=0)
double GetInput(std::vector< double > &input, const std::vector< double > &target)
std::vector< std::vector< updateData > > updates
void resetWeightVariance()
void getWeightUpdateAverage(std::vector< double > &var, unsigned int which=0)
void resizeInputs(int newSize, double newVal)
LogisticRegression(int _inputs, int _outputs, double learnrate)
int getWeightFrequency(unsigned int weightNum, unsigned int whichOutput=0)
std::vector< std::vector< double > > weight
void load(const FunctionApproximator *fa)
static bool validSaveFile(char *fname)
void setUseBinary(bool binary)
double outputerr(std::vector< double > &output, std::vector< double > &expected, int which)
double getInputWeight(int inp, int outp=0)
std::vector< double > output
void getWeightUpdateVariance(std::vector< double > &var, unsigned int which=0)
double error(double *output)
void getWeightUpdateSum(std::vector< double > &var, unsigned int which=0)
double train(std::vector< double > &input, std::vector< double > &output2)
double * test(const std::vector< double > &input)