File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -65,3 +65,14 @@ cdef class Criterion:
65
65
cdef void node_value(self , double * dest) nogil
66
66
cdef double impurity_improvement(self , double impurity) nogil
67
67
cdef double proxy_impurity_improvement(self ) nogil
68
+
69
+ cdef class ClassificationCriterion(Criterion):
70
+ """ Abstract criterion for classification."""
71
+
72
+ cdef SIZE_t* n_classes
73
+ cdef SIZE_t sum_stride
74
+
75
+ cdef class RegressionCriterion(Criterion):
76
+ """ Abstract regression criterion."""
77
+
78
+ cdef double sq_sum_total
Original file line number Diff line number Diff line change @@ -212,9 +212,6 @@ cdef class Criterion:
212
212
cdef class ClassificationCriterion(Criterion):
213
213
""" Abstract criterion for classification."""
214
214
215
- cdef SIZE_t* n_classes
216
- cdef SIZE_t sum_stride
217
-
218
215
def __cinit__ (self , SIZE_t n_outputs ,
219
216
np.ndarray[SIZE_t , ndim = 1 ] n_classes):
220
217
""" Initialize attributes for this criterion.
@@ -704,8 +701,6 @@ cdef class RegressionCriterion(Criterion):
704
701
= (\sum_i^n y_i ** 2) - n_samples * y_bar ** 2
705
702
"""
706
703
707
- cdef double sq_sum_total
708
-
709
704
def __cinit__ (self , SIZE_t n_outputs , SIZE_t n_samples ):
710
705
""" Initialize parameters for this criterion.
711
706
You can’t perform that action at this time.
0 commit comments