-
Notifications
You must be signed in to change notification settings - Fork 1
/
perceptroncontext.h
50 lines (44 loc) · 1.61 KB
/
perceptroncontext.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
#ifndef PERCEPTRONCONTEXT_H
#define PERCEPTRONCONTEXT_H
#include "vector"
#include "perceptron.h"
#include "sample.h"
#include "netslayer.h"
#include "firstlayernets.h"
#include <QGraphicsView>
#include <QGraphicsItem>
#include <QVector>
#include <QMap>
#include <EnterRange.h>
class PerceptronContext
{
public:
PerceptronContext();
~PerceptronContext();
public:
void addNewNet(Perceptron * perceptron, int neironNetType);
void teachNets(QVBoxLayout * normalErrorPL);
std::vector<int> getExamplesIntersect(std::vector<Sample> samples);
FirstLayerNets * getFirstLayerNets();
QGraphicsScene * getStructureVisualObj();
QList<QString> getEntersName();
QList<QString> getNeironsName();
void addEnters(QMap<QString, int> enters);
void addNeirons(QMap<QString, int> neirons);
QMap<QString, int> getEnters();
QMap<QString, double> getResults(QMap<int, double> example);
public:
FirstLayerNets * firstLayerNets;
Perceptron * resultPerceptron;
public:
QMap<QString, int> neirons;
QMap<QString, int> enters;
public:
std::vector<int> getResultVectorIntersect(std::vector<int> v1, std::vector<int> v2);
std::vector<int> getResultNeironNumUnion(std::vector<int> v1, std::vector<int> v2);
Sample * setResultNet();
std::vector<double> optimizeAlpha(double startAlpha, double endAlpha, double step, int optimizeParam, int netNum);
void setNeirons(QMap<QString, int> enters);
std::vector<std::vector<double> > calcRange(std::vector<EnterRange> range, std::vector<QString> *names, QLabel * rangePrBInfoLab, QProgressBar *saveRangePrB);
};
#endif // PERCEPTRONCONTEXT_H