Skip to content

Commit e1c1498

Browse files
committed
fixed types in impurity_improvement definition in criterion
Signed-off-by: Gabriel Daiha <gabriel.alves@picpay.com>
1 parent fc6bb84 commit e1c1498

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

econml/tree/_criterion.pyx

+3-3
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ cdef class Criterion:
209209
return (- self.weighted_n_right * impurity_right
210210
- self.weighted_n_left * impurity_left)
211211

212-
cdef double impurity_improvement(self, float64_t impurity_parent,
213-
float64_t impurity_left,
214-
float64_t impurity_right) nogil:
212+
cdef double impurity_improvement(self, double impurity_parent,
213+
double impurity_left,
214+
double impurity_right) nogil:
215215
"""Compute the improvement in impurity
216216
This method computes the improvement in impurity when a split occurs.
217217
The weighted impurity improvement equation is the following:

0 commit comments

Comments
 (0)