Skip to content

Commit

Permalink
fixed types in impurity_improvement definition in criterion
Browse files Browse the repository at this point in the history
  • Loading branch information
gdaiha committed May 10, 2024
1 parent 2dfa2db commit 9030a93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions econml/tree/_criterion.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9030a93

Please sign in to comment.