trees with one leaf set missing to left to avoid unnecessary is_nan check (#435)
This commit is contained in:
Родитель
95f01ea83d
Коммит
c04a3a2efe
|
@ -210,7 +210,7 @@ def get_parameters_for_tree_trav_common(lefts, rights, features, thresholds, val
|
|||
features = [0, 0, 0]
|
||||
thresholds = [0, 0, 0]
|
||||
if missings is not None:
|
||||
missings = [2, -1, -1]
|
||||
missings = [1, -1, -1]
|
||||
n_classes = values.shape[1] if type(values) is np.ndarray else 1
|
||||
values = np.array([np.zeros(n_classes), values[0], values[0]])
|
||||
values.reshape(3, n_classes)
|
||||
|
@ -328,13 +328,13 @@ def get_parameters_for_gemm_common(lefts, rights, features, thresholds, values,
|
|||
features = [0, 0, 0]
|
||||
thresholds = [0, 0, 0]
|
||||
if missings is not None:
|
||||
missings = [2, -1, -1]
|
||||
missings = [1, -1, -1]
|
||||
n_classes = values.shape[1]
|
||||
values = np.array([np.zeros(n_classes), values[0], values[0]])
|
||||
values.reshape(3, n_classes)
|
||||
|
||||
if missings is None:
|
||||
missings = rights
|
||||
missings = lefts
|
||||
|
||||
# First hidden layer has all inequalities.
|
||||
hidden_weights = []
|
||||
|
|
Загрузка…
Ссылка в новой задаче