@@ -18,9 +18,6 @@ cdef class Hinge(LossFunction):
18
18
19
19
cdef double threshold
20
20
21
- def __init__ (self , double threshold = 1.0 ):
22
- self .threshold = threshold
23
-
24
21
cpdef double loss(self , double p, double y)
25
22
26
23
cpdef double get_update(self , double p, double y)
@@ -30,9 +27,6 @@ cdef class SmoothHinge(LossFunction):
30
27
31
28
cdef double gamma
32
29
33
- def __init__ (self , double gamma = 1.0 ):
34
- self .gamma = gamma # the larger, the smoother
35
-
36
30
cpdef double loss(self , double p, double y)
37
31
38
32
cpdef double get_update(self , double p, double y)
@@ -42,9 +36,6 @@ cdef class SquaredHinge(LossFunction):
42
36
43
37
cdef double threshold
44
38
45
- def __init__ (self , double threshold = 1.0 ):
46
- self .threshold = threshold
47
-
48
39
cpdef double loss(self , double p, double y)
49
40
50
41
cpdef double get_update(self , double p, double y)
@@ -68,9 +59,6 @@ cdef class Huber(LossFunction):
68
59
69
60
cdef double c
70
61
71
- def __init__ (self , double c ):
72
- self .c = c
73
-
74
62
cpdef double loss(self , double p, double y)
75
63
76
64
cpdef double get_update(self , double p, double y)
@@ -80,9 +68,6 @@ cdef class EpsilonInsensitive(LossFunction):
80
68
81
69
cdef double epsilon
82
70
83
- def __init__ (self , double epsilon ):
84
- self .epsilon = epsilon
85
-
86
71
cpdef double loss(self , double p, double y)
87
72
88
73
cpdef double get_update(self , double p, double y)
0 commit comments