-
Notifications
You must be signed in to change notification settings - Fork 8
/
perceptron.h
56 lines (43 loc) · 1.03 KB
/
perceptron.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef PERCEPTRON_H
#define PERCEPTRON_H
#include <QWidget>
#include <QScrollArea>
#include <QDebug>
#include <QtMath>
#include "layer.h"
#include "datasource.h"
class Perceptron : public QWidget
{
Q_OBJECT
QVBoxLayout layout;
DataSource* dataSrc;
double lamda;
public:
QVector<Layer*> layer;
explicit Perceptron(int inputNumber,QWidget *parent = 0);
explicit Perceptron(QWidget *parent = 0);
~Perceptron();
void addLayer(int inputNumber);
const double *getOutput();
DataSource *getDataSrc() const;
void setDataSrc(DataSource *value);
int getTrainigSetNumber();
int getClassesAmount();
void calculateDelta(int index);
void setInput(double* , int);
double cost();
void resetDerivatives();
int getAnswer();
signals:
void statCost(int);
void calculateForExample(int);
public slots:
void gradientDescent();
void slot_cost();
void saveAll();
void loadAll();
void removeLastLayer();
void uiRefresh();
protected:
};
#endif // PERCEPTRON_H