Go to the documentation of this file.
10 #ifndef LinearRegression_H
11 #define LinearRegression_H
40 void save(
const char *);
42 void load(
const char *);
48 double train(std::vector<double> &input, std::vector<double> &output2);
49 double *
test(
const std::vector<double> &input);
50 double train(std::vector<unsigned int> &input, std::vector<double> &output2);
51 double *
test(
const std::vector<unsigned int> &input);
56 void setInputWeight(
double value,
unsigned int weightNum,
unsigned int whichOutput=0);
71 double GetInput(std::vector<double> &input,
const std::vector<double> &target)
72 { assert(!
"Unimplemented"); }
80 double outputerr(std::vector<double> &
output, std::vector<double> &expected,
int which);
83 std::vector<std::vector<double> >
weight;
84 std::vector<std::vector<updateData> >
updates;
void setInputWeight(double value, unsigned int weightNum, unsigned int whichOutput=0)
void getWeightUpdateSum(std::vector< double > &var, unsigned int which=0)
static bool validSaveFile(char *fname)
void getWeightUpdateVariance(std::vector< double > &var, unsigned int which=0)
double * test(const std::vector< double > &input)
void resetWeightVariance()
double error(double *output)
LinearRegression(int _inputs, int _outputs, double learnrate)
void setUseBinary(bool binary)
void resizeInputs(int newSize, double newVal)
double getInputWeight(int inp, int outp=0)
void getWeightUpdateAverage(std::vector< double > &var, unsigned int which=0)
std::vector< std::vector< double > > weight
double outputerr(std::vector< double > &output, std::vector< double > &expected, int which)
double GetInput(std::vector< double > &input, const std::vector< double > &target)
std::vector< std::vector< updateData > > updates
void load(const FunctionApproximator *fa)
std::vector< double > output
double train(std::vector< double > &input, std::vector< double > &output2)
int getWeightFrequency(unsigned int weightNum, unsigned int whichOutput=0)