Salome HOME
'/usr/bin/env python' -> '/usr/bin/env python3'
[modules/yacs.git] / src / pmml / Test / samples / unittest_ref_lr_model.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3
4 def myTestFunc(param):
5
6     ############################## 
7     # 
8     # File used by unit test
9     # PMMLBasicsTest1::testExportLinearRegressionPython
10     # 
11     ############################## 
12
13     #  Intercept
14     y = 3.83737;
15
16     #  Attribute : x6
17     y += param[0]*0.475913;
18
19     #  Attribute : x8
20     y += param[1]*0.142884;
21
22     #  Attribute : x6x8
23     y += param[2]*-0.022019;
24
25     #  Attribute : x6x6x8
26     y += param[3]*0.000536256;
27
28     #  Return the value
29     return [y];