Statistics
| Branch: | Revision:

chunker-player / chunker_player / QoE_Estimator.c @ e11386c0

History | View | Annotate | Download (3.7 KB)

1
/**
2
 Generated by Multiple Back-Propagation Version 2.2.2
3
 Multiple Back-Propagation can be freely obtained at http://dit.ipg.pt/MBP
4
*/
5

    
6
#include <math.h>
7
/**
8
 inputs  - should be an array of 3 element(s), containing the network input(s).
9
 outputs - should be an array of 1 element(s), that will contain the network output(s).
10
 Note : The array inputs will also be changed.Its values will be rescaled between -1 and 1.
11
*/
12
void QoE_Estimator(double * inputs, double * outputs) {
13
        double mainWeights[] = {-0.788223989025525, -0.094474566726867, 1.496739847656628, 1.763686040718159, -1.903030984102726, 0.642334326063278, -1.151808104642765, 0.195778993761345, -2.438147799676302, -0.593447767630059, 0.602159330161696, 1.841888272109078, -1.668291515410757, 1.132531695902347, 1.770256249167634, -1.543624462297342, -0.300179501200067, 0.218045746602884, 0.549917901597161, -0.420158477741495, 0.165459965494116, 0.626640712066218, -0.317482940512069, -0.165924553270408, -3.316089679297547, 0.901781718110168, -2.227550874229060, -0.468212813041442, -0.254505118375575, 1.753316060915204, -0.471577244624611, 0.276860328465251, -8.533724138983054, -7.815997751844567, 0.062513227206194, -0.028703413820191, -0.355241766960234, -1.014473189203496, 0.239401342551138, -0.891442488512514, 0.040038287080412, 1.014695308785556, 1.716301939415027, -1.836208299980111, -2.218906644053716, -0.002026100423785, 0.325609116530568, 2.762985101033591, 1.081971585914914, -6.798320012264649, -0.435605988610366};
14
        double * mw = mainWeights;
15
        double hiddenLayer1outputs[10];
16
        int c;
17

    
18
        inputs[0] = -1.0 + (inputs[0] - 128.000000000000000) / 1436.000000000000000;
19
        inputs[1] = -1.0 + (inputs[1] - 0.000000000000000) / 10.000000000000000;
20
        inputs[2] = -1.0 + (inputs[2] - 0.000000000000000) / 5.000000000000000;
21
        hiddenLayer1outputs[0] = *mw++;
22
        for(c = 0; c < 3; c++) hiddenLayer1outputs[0] += *mw++ * inputs[c];
23
        hiddenLayer1outputs[0] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[0]));
24
        hiddenLayer1outputs[1] = *mw++;
25
        for(c = 0; c < 3; c++) hiddenLayer1outputs[1] += *mw++ * inputs[c];
26
        hiddenLayer1outputs[1] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[1]));
27
        hiddenLayer1outputs[2] = *mw++;
28
        for(c = 0; c < 3; c++) hiddenLayer1outputs[2] += *mw++ * inputs[c];
29
        hiddenLayer1outputs[2] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[2]));
30
        hiddenLayer1outputs[3] = *mw++;
31
        for(c = 0; c < 3; c++) hiddenLayer1outputs[3] += *mw++ * inputs[c];
32
        hiddenLayer1outputs[3] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[3]));
33
        hiddenLayer1outputs[4] = *mw++;
34
        for(c = 0; c < 3; c++) hiddenLayer1outputs[4] += *mw++ * inputs[c];
35
        hiddenLayer1outputs[4] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[4]));
36
        hiddenLayer1outputs[5] = *mw++;
37
        for(c = 0; c < 3; c++) hiddenLayer1outputs[5] += *mw++ * inputs[c];
38
        hiddenLayer1outputs[5] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[5]));
39
        hiddenLayer1outputs[6] = *mw++;
40
        for(c = 0; c < 3; c++) hiddenLayer1outputs[6] += *mw++ * inputs[c];
41
        hiddenLayer1outputs[6] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[6]));
42
        hiddenLayer1outputs[7] = *mw++;
43
        for(c = 0; c < 3; c++) hiddenLayer1outputs[7] += *mw++ * inputs[c];
44
        hiddenLayer1outputs[7] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[7]));
45
        hiddenLayer1outputs[8] = *mw++;
46
        for(c = 0; c < 3; c++) hiddenLayer1outputs[8] += *mw++ * inputs[c];
47
        hiddenLayer1outputs[8] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[8]));
48
        hiddenLayer1outputs[9] = *mw++;
49
        for(c = 0; c < 3; c++) hiddenLayer1outputs[9] += *mw++ * inputs[c];
50
        hiddenLayer1outputs[9] = 1.0 / (1.0 + exp(-hiddenLayer1outputs[9]));
51
        outputs[0] = *mw++;
52
        for(c = 0; c < 10; c++) outputs[0] += *mw++ * hiddenLayer1outputs[c];
53
        outputs[0] = 1.0 / (1.0 + exp(-outputs[0]));
54
        outputs[0] = 28.546600000000002 + (outputs[0] - 0.000000) * 16.112199999999998;
55
}