Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Shared Weights + Tests #33

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
12 changes: 11 additions & 1 deletion sklearn/tree/_criterion.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ cdef class Criterion:
cdef double impurity_improvement(self, double impurity) nogil
cdef double proxy_impurity_improvement(self) nogil

cdef double node_impurity2(self, double* pred_weights)
cdef void children_impurity2(self, double* impurity_left,
double* impurity_right, double* pred_weights)
cdef double proxy_impurity_improvement2(self, double* pred_weights) nogil
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@morgsmss7 is this used?


cdef class ClassificationCriterion(Criterion):
"""Abstract criterion for classification."""

Expand All @@ -75,4 +80,9 @@ cdef class RegressionCriterion(Criterion):
"""Abstract regression criterion."""

cdef double sq_sum_total
cdef object random_state # Random state for predictor weights (Projection-Based Splitters)

cdef class ObliqueProjection(RegressionCriterion):
pass
cdef class AxisProjection(RegressionCriterion):
pass

Loading