Skip to content

Commit 1d45042

Browse files
committed
add corner boosting option
1 parent 811fe13 commit 1d45042

File tree

11 files changed

+901
-157
lines changed

11 files changed

+901
-157
lines changed

R/src/Makevars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ OBJECTS = \
3434
$(NATIVEDIR)/interpretable_numerics.o \
3535
$(NATIVEDIR)/PartitionOneDimensionalBoosting.o \
3636
$(NATIVEDIR)/PartitionRandomBoosting.o \
37+
$(NATIVEDIR)/PartitionMultiDimensionalCorner.o \
3738
$(NATIVEDIR)/PartitionMultiDimensionalTree.o \
3839
$(NATIVEDIR)/PartitionMultiDimensionalStraight.o \
3940
$(NATIVEDIR)/Purify.o \

R/src/Makevars.interpret

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ OBJECTS = \
3434
$(NATIVEDIR)/interpretable_numerics.o \
3535
$(NATIVEDIR)/PartitionOneDimensionalBoosting.o \
3636
$(NATIVEDIR)/PartitionRandomBoosting.o \
37+
$(NATIVEDIR)/PartitionMultiDimensionalCorner.o \
3738
$(NATIVEDIR)/PartitionMultiDimensionalTree.o \
3839
$(NATIVEDIR)/PartitionMultiDimensionalStraight.o \
3940
$(NATIVEDIR)/Purify.o \

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ if [ $is_conda -eq 1 ]; then
342342
${CXX} -c ${CPPFLAGS} ${CXXFLAGS} ${extras} "$code_path/interpretable_numerics.cpp" -o "$tmp_path/interpretable_numerics.o"
343343
${CXX} -c ${CPPFLAGS} ${CXXFLAGS} ${extras} "$code_path/PartitionOneDimensionalBoosting.cpp" -o "$tmp_path/PartitionOneDimensionalBoosting.o"
344344
${CXX} -c ${CPPFLAGS} ${CXXFLAGS} ${extras} "$code_path/PartitionRandomBoosting.cpp" -o "$tmp_path/PartitionRandomBoosting.o"
345+
${CXX} -c ${CPPFLAGS} ${CXXFLAGS} ${extras} "$code_path/PartitionMultiDimensionalCorner.cpp" -o "$tmp_path/PartitionMultiDimensionalCorner.o"
345346
${CXX} -c ${CPPFLAGS} ${CXXFLAGS} ${extras} "$code_path/PartitionMultiDimensionalTree.cpp" -o "$tmp_path/PartitionMultiDimensionalTree.o"
346347
${CXX} -c ${CPPFLAGS} ${CXXFLAGS} ${extras} "$code_path/PartitionMultiDimensionalStraight.cpp" -o "$tmp_path/PartitionMultiDimensionalStraight.o"
347348
${CXX} -c ${CPPFLAGS} ${CXXFLAGS} ${extras} "$code_path/Purify.cpp" -o "$tmp_path/Purify.o"
@@ -381,6 +382,7 @@ if [ $is_conda -eq 1 ]; then
381382
"$tmp_path/interpretable_numerics.o" \
382383
"$tmp_path/PartitionOneDimensionalBoosting.o" \
383384
"$tmp_path/PartitionRandomBoosting.o" \
385+
"$tmp_path/PartitionMultiDimensionalCorner.o" \
384386
"$tmp_path/PartitionMultiDimensionalTree.o" \
385387
"$tmp_path/PartitionMultiDimensionalStraight.o" \
386388
"$tmp_path/Purify.o" \

python/interpret-core/interpret/develop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"learning_rate_scale": 1.0,
2020
"max_cat_threshold": 9223372036854775807,
2121
"cat_include": 1.0,
22+
"boost_corners": False,
2223
"purify_boosting": False,
2324
"purify_result": False,
2425
"randomize_initial_feature_order": True,

python/interpret-core/interpret/glassbox/_ebm/_ebm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,8 @@ def fit(self, X, y, sample_weight=None, bags=None, init_score=None):
957957
term_boost_flags = Native.TermBoostFlags_Default
958958
if develop.get_option("purify_boosting"):
959959
term_boost_flags |= Native.TermBoostFlags_PurifyUpdate
960+
if develop.get_option("boost_corners"):
961+
term_boost_flags |= Native.TermBoostFlags_Corners
960962
inner_bags = self.inner_bags
961963
greedy_ratio = self.greedy_ratio
962964
smoothing_rounds = self.smoothing_rounds

python/interpret-core/interpret/utils/_native.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class Native:
4141
TermBoostFlags_MissingLow = 0x00000080
4242
TermBoostFlags_MissingHigh = 0x00000100
4343
TermBoostFlags_MissingSeparate = 0x00000200
44+
TermBoostFlags_Corners = 0x00000400
4445

4546
# CreateInteractionFlags
4647
CreateInteractionFlags_Default = 0x00000000

0 commit comments

Comments
 (0)