Typehint for subset of core API. (#7348)

This commit is contained in:
Jiaming Yuan
2021-10-28 20:47:04 +08:00
committed by GitHub
parent 45aef75cca
commit c6769488b3
7 changed files with 400 additions and 412 deletions

View File

@@ -9,7 +9,9 @@ rng = np.random.RandomState(1994)
class TestInteractionConstraints:
def run_interaction_constraints(self, tree_method, feature_names=None, interaction_constraints='[[0, 1]]'):
def run_interaction_constraints(
self, tree_method, feature_names=None, interaction_constraints='[[0, 1]]'
):
x1 = np.random.normal(loc=1.0, scale=1.0, size=1000)
x2 = np.random.normal(loc=1.0, scale=1.0, size=1000)
x3 = np.random.choice([1, 2, 3], size=1000, replace=True)