-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathneuron.h
37 lines (28 loc) · 800 Bytes
/
neuron.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
#ifndef NEURON_H
#define NEURON_H
class Neuron
{
public:
Neuron();
int sign(double net);
double sigmoid(double net);
double derivativeOfSigmoid(double net);
double calculateNet();
double calculateNetfromThStep(int step);
void setInputDimension(int dimension);
void setInputs(double* inputArray);
void setInputs(double* x, double* y);
void setWeights(double* weightArray);
void updateWeights(double c,double diff,int step);
void updateWeightsDelta(double c,double diff,double derivation, int step);
void setLabels(int* labelArray);
double *getWeights();
void setRandomWeights();
private:
int inputDimension;
int *labels;
double* inputs, *xInputs,*yInputs;
double* outputs;
double* weights;
};
#endif // NEURON_H