Newer
Older
//
// Created by martin on 7/15/18.
//
#ifndef INC_4NEURO_ERRORFUNCTION_H
#define INC_4NEURO_ERRORFUNCTION_H
#include "../Network/NeuralNetwork.h"
#include "../DataSet/DataSet.h"

Michal Kravcenko
committed
enum ErrorFunctionType{
ErrorFuncMSE
};
public:
/**
*
* @param weights
* @return
*/
virtual double eval(double* weights) = 0;
/**
*
* @return
*/
virtual size_t get_dimension();
protected:
/**
*
*/
};
class MSE : public ErrorFunction {
public:
/**
* Constructor for single neural network
* @param net
* @param ds
*/
MSE(NeuralNetwork* net, DataSet* ds);
/**
*
* @param weights
* @return
*/
private:
NeuralNetwork* net;
DataSet* ds;
public:
/**
*
*/
/**
*
*/
/**
*
* @param weights
* @return
*/

Michal Kravcenko
committed
virtual double eval(double* weights = nullptr);
/**
*
* @param F
*/
void add_error_function(ErrorFunction *F, double alpha = 1.0);
/**
*
* @return
*/
size_t get_dimension() override;
private:
std::vector<double> *summand_coefficient;