sync upstream code

This commit is contained in:
Hui Liu
2024-03-20 16:14:38 -07:00
75 changed files with 754 additions and 312 deletions

View File

@@ -429,8 +429,8 @@ def make_categorical(
categories = np.arange(0, n_categories)
for col in df.columns:
if rng.binomial(1, cat_ratio, size=1)[0] == 1:
df[col] = df[col].astype("category")
df[col] = df[col].cat.set_categories(categories)
df.loc[:, col] = df[col].astype("category")
df.loc[:, col] = df[col].cat.set_categories(categories)
if sparsity > 0.0:
for i in range(n_features):