From e1c149866c48ce807c526ea6fd8c00368a2900ea Mon Sep 17 00:00:00 2001 From: Gabriel Daiha Date: Fri, 10 May 2024 14:01:47 -0300 Subject: [PATCH] fixed types in impurity_improvement definition in criterion Signed-off-by: Gabriel Daiha --- econml/tree/_criterion.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/econml/tree/_criterion.pyx b/econml/tree/_criterion.pyx index c0b00d351..a2f9acdb3 100644 --- a/econml/tree/_criterion.pyx +++ b/econml/tree/_criterion.pyx @@ -209,9 +209,9 @@ cdef class Criterion: return (- self.weighted_n_right * impurity_right - self.weighted_n_left * impurity_left) - cdef double impurity_improvement(self, float64_t impurity_parent, - float64_t impurity_left, - float64_t impurity_right) nogil: + cdef double impurity_improvement(self, double impurity_parent, + double impurity_left, + double impurity_right) nogil: """Compute the improvement in impurity This method computes the improvement in impurity when a split occurs. The weighted impurity improvement equation is the following: