Skip to content

Commit bd005ec

Browse files
committed
rename Objective_Unknown -> Objective_Other
1 parent 3084304 commit bd005ec

File tree

10 files changed

+13
-13
lines changed

10 files changed

+13
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class Native:
6969
Task_MulticlassPlus = 3
7070

7171
# Objectives
72-
Objective_Unknown = 0
72+
Objective_Other = 0
7373
Objective_MonoClassification = 1
7474
Objective_LogLossBinary = 2
7575
Objective_LogLossMulticlass = 3
@@ -830,7 +830,7 @@ def determine_task(self, objective):
830830
return task.decode("ascii")
831831

832832
def determine_link(self, flags, objective, n_classes):
833-
objective_code = ct.c_int32(0)
833+
objective_code = ct.c_int32(Native.Objective_Other)
834834
link = ct.c_int32(0)
835835
link_param = ct.c_double(np.nan)
836836

shared/libebm/DetermineLinkFunction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ EBM_API_BODY ErrorEbm EBM_CALLING_CONVENTION DetermineLinkFunction(LinkFlags fla
104104
LOG_0(Trace_Error, "ERROR DetermineLinkFunction GetObjective failed");
105105

106106
if(nullptr != objectiveOut) {
107-
*objectiveOut = Objective_Unknown;
107+
*objectiveOut = Objective_Other;
108108
}
109109
if(nullptr != linkOut) {
110110
*linkOut = Link_Unknown;
@@ -126,7 +126,7 @@ EBM_API_BODY ErrorEbm EBM_CALLING_CONVENTION DetermineLinkFunction(LinkFlags fla
126126
LOG_0(Trace_Error, "ERROR DetermineLinkFunction cClasses mismatch to objective");
127127

128128
if(nullptr != objectiveOut) {
129-
*objectiveOut = Objective_Unknown;
129+
*objectiveOut = Objective_Other;
130130
}
131131
if(nullptr != linkOut) {
132132
*linkOut = Link_Unknown;
@@ -140,7 +140,7 @@ EBM_API_BODY ErrorEbm EBM_CALLING_CONVENTION DetermineLinkFunction(LinkFlags fla
140140
LOG_0(Trace_Error, "ERROR DetermineLinkFunction cClasses cannot be zero");
141141

142142
if(nullptr != objectiveOut) {
143-
*objectiveOut = Objective_Unknown;
143+
*objectiveOut = Objective_Other;
144144
}
145145
if(nullptr != linkOut) {
146146
*linkOut = Link_Unknown;

shared/libebm/bridge/bridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct ObjectiveWrapper {
160160
inline static void InitializeObjectiveWrapperUnfailing(ObjectiveWrapper* const pObjectiveWrapper) {
161161
pObjectiveWrapper->m_pObjective = NULL;
162162
pObjectiveWrapper->m_bMaximizeMetric = EBM_FALSE;
163-
pObjectiveWrapper->m_objective = Objective_Unknown;
163+
pObjectiveWrapper->m_objective = Objective_Other;
164164
pObjectiveWrapper->m_linkFunction = Link_Unknown;
165165
pObjectiveWrapper->m_linkParam = 0.0;
166166
pObjectiveWrapper->m_learningRateAdjustmentDifferentialPrivacy = 0.0;

shared/libebm/compute/objectives/ExampleRegressionObjective.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ template<typename TFloat> struct ExampleRegressionObjective : RegressionObjectiv
1111
// - this class type
1212
// - MINIMIZE_METRIC or MAXIMIZE_METRIC determines which direction the metric should go for early stopping
1313
// - Link function type. See libebm.h for a list of available link functions
14-
OBJECTIVE_BOILERPLATE(ExampleRegressionObjective, MINIMIZE_METRIC, Objective_Unknown, Link_identity, true)
14+
OBJECTIVE_BOILERPLATE(ExampleRegressionObjective, MINIMIZE_METRIC, Objective_Other, Link_identity, true)
1515

1616
// member variables should be of type TFloat
1717
TFloat m_param0;

shared/libebm/compute/objectives/GammaDevianceRegressionObjective.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// TFloat is a datatype that could hold inside a double, float, or some SIMD intrinsic type.
88
// See cpu_64.cpp, avx2_32.cpp, and cuda_32.cu as examples where TFloat operators are defined.
99
template<typename TFloat> struct GammaDevianceRegressionObjective : RegressionObjective {
10-
OBJECTIVE_BOILERPLATE(GammaDevianceRegressionObjective, MINIMIZE_METRIC, Objective_Unknown, Link_log, true)
10+
OBJECTIVE_BOILERPLATE(GammaDevianceRegressionObjective, MINIMIZE_METRIC, Objective_Other, Link_log, true)
1111

1212
inline GammaDevianceRegressionObjective(const Config& config) {
1313
if(config.cOutputs != 1) {

shared/libebm/compute/objectives/PoissonDevianceRegressionObjective.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// TFloat is a datatype that could hold inside a double, float, or some SIMD intrinsic type.
88
// See cpu_64.cpp, avx2_32.cpp, and cuda_32.cu as examples where TFloat operators are defined.
99
template<typename TFloat> struct PoissonDevianceRegressionObjective : RegressionObjective {
10-
OBJECTIVE_BOILERPLATE(PoissonDevianceRegressionObjective, MINIMIZE_METRIC, Objective_Unknown, Link_log, true)
10+
OBJECTIVE_BOILERPLATE(PoissonDevianceRegressionObjective, MINIMIZE_METRIC, Objective_Other, Link_log, true)
1111

1212
// The constructor parameters following config must match the RegisterObjective parameters in
1313
// objective_registrations.hpp

shared/libebm/compute/objectives/PseudoHuberRegressionObjective.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// TFloat is a datatype that could hold inside a double, float, or some SIMD intrinsic type.
88
// See cpu_64.cpp, avx2_32.cpp, and cuda_32.cu as examples where TFloat operators are defined.
99
template<typename TFloat> struct PseudoHuberRegressionObjective : RegressionObjective {
10-
OBJECTIVE_BOILERPLATE(PseudoHuberRegressionObjective, MINIMIZE_METRIC, Objective_Unknown, Link_identity, true)
10+
OBJECTIVE_BOILERPLATE(PseudoHuberRegressionObjective, MINIMIZE_METRIC, Objective_Other, Link_identity, true)
1111

1212
TFloat m_deltaInverted;
1313
double m_deltaSquared;

shared/libebm/compute/objectives/RmseLogLinkRegressionObjective.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// TFloat is a datatype that could hold inside a double, float, or some SIMD intrinsic type.
88
// See cpu_64.cpp, avx2_32.cpp, and cuda_32.cu as examples where TFloat operators are defined.
99
template<typename TFloat> struct RmseLogLinkRegressionObjective : RegressionObjective {
10-
OBJECTIVE_BOILERPLATE(RmseLogLinkRegressionObjective, MINIMIZE_METRIC, Objective_Unknown, Link_log, false)
10+
OBJECTIVE_BOILERPLATE(RmseLogLinkRegressionObjective, MINIMIZE_METRIC, Objective_Other, Link_log, false)
1111

1212
inline RmseLogLinkRegressionObjective(const Config& config) {
1313
if(config.cOutputs != 1) {

shared/libebm/compute/objectives/TweedieDevianceRegressionObjective.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// TFloat is a datatype that could hold inside a double, float, or some SIMD intrinsic type.
88
// See cpu_64.cpp, avx2_32.cpp, and cuda_32.cu as examples where TFloat operators are defined.
99
template<typename TFloat> struct TweedieDevianceRegressionObjective : RegressionObjective {
10-
OBJECTIVE_BOILERPLATE(TweedieDevianceRegressionObjective, MINIMIZE_METRIC, Objective_Unknown, Link_log, true)
10+
OBJECTIVE_BOILERPLATE(TweedieDevianceRegressionObjective, MINIMIZE_METRIC, Objective_Other, Link_log, true)
1111

1212
TFloat m_variancePowerParamSub1;
1313
TFloat m_variancePowerParamSub2;

shared/libebm/inc/libebm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ typedef struct _InteractionHandle {
262262
#define Task_BinaryClassification (TASK_CAST(2)) // 2 classes
263263
#define Task_MulticlassPlus (TASK_CAST(3)) // 3+ classes (the value is the # of classes)
264264

265-
#define Objective_Unknown (OBJECTIVE_CAST(0))
265+
#define Objective_Other (OBJECTIVE_CAST(0))
266266
#define Objective_MonoClassification (OBJECTIVE_CAST(1))
267267
#define Objective_LogLossBinary (OBJECTIVE_CAST(2))
268268
#define Objective_LogLossMulticlass (OBJECTIVE_CAST(3))

0 commit comments

Comments
 (0)