@@ -19,7 +19,7 @@ ctypedef fused G_DTYPE_C:
19
19
20
20
21
21
# Struct to return 2 doubles
22
- ctypedef struct double2 :
22
+ ctypedef struct double_pair :
23
23
double val1
24
24
double val2
25
25
@@ -28,48 +28,48 @@ ctypedef struct double2:
28
28
cdef class cLossFunction:
29
29
cdef double closs(self , double y_true, double raw_prediction) nogil
30
30
cdef double cgradient(self , double y_true, double raw_prediction) nogil
31
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
31
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
32
32
33
33
34
34
cdef class cHalfSquaredError(cLossFunction):
35
35
cdef double closs(self , double y_true, double raw_prediction) nogil
36
36
cdef double cgradient(self , double y_true, double raw_prediction) nogil
37
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
37
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
38
38
39
39
40
40
cdef class cAbsoluteError(cLossFunction):
41
41
cdef double closs(self , double y_true, double raw_prediction) nogil
42
42
cdef double cgradient(self , double y_true, double raw_prediction) nogil
43
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
43
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
44
44
45
45
46
46
cdef class cPinballLoss(cLossFunction):
47
47
cdef readonly double quantile # readonly makes it inherited by children
48
48
cdef double closs(self , double y_true, double raw_prediction) nogil
49
49
cdef double cgradient(self , double y_true, double raw_prediction) nogil
50
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
50
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
51
51
52
52
53
53
cdef class cHalfPoissonLoss(cLossFunction):
54
54
cdef double closs(self , double y_true, double raw_prediction) nogil
55
55
cdef double cgradient(self , double y_true, double raw_prediction) nogil
56
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
56
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
57
57
58
58
59
59
cdef class cHalfGammaLoss(cLossFunction):
60
60
cdef double closs(self , double y_true, double raw_prediction) nogil
61
61
cdef double cgradient(self , double y_true, double raw_prediction) nogil
62
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
62
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
63
63
64
64
65
65
cdef class cHalfTweedieLoss(cLossFunction):
66
66
cdef readonly double power # readonly makes it inherited by children
67
67
cdef double closs(self , double y_true, double raw_prediction) nogil
68
68
cdef double cgradient(self , double y_true, double raw_prediction) nogil
69
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
69
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
70
70
71
71
72
72
cdef class cBinaryCrossEntropy(cLossFunction):
73
73
cdef double closs(self , double y_true, double raw_prediction) nogil
74
74
cdef double cgradient(self , double y_true, double raw_prediction) nogil
75
- cdef double2 cgrad_hess(self , double y_true, double raw_prediction) nogil
75
+ cdef double_pair cgrad_hess(self , double y_true, double raw_prediction) nogil
0 commit comments