[735bb5]: / test / features / test_random_forest_features.py

Download this file

10 lines (7 with data), 309 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Local Dependencies
# ------------------
from features import RandomForestFeaturesNegation
def test_rf_feature_names(n2c2_small_collection):
rf = RandomForestFeaturesNegation("n2c2")
features = rf.fit_transform(n2c2_small_collection)
assert len(rf.get_feature_names()) == features.shape[1]