MCPcopy Create free account
hub / github.com/catboost/catboost / test_load_series

Function test_load_series

catboost/python-package/ut/medium/test.py:708–717  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

706
707
708def test_load_series():
709 pool = Pool(TRAIN_FILE, column_description=CD_FILE)
710 data = pd.read_csv(TRAIN_FILE, header=None, delimiter='\t')
711 labels = pd.Series(data.iloc[:, TARGET_IDX])
712 data.drop([TARGET_IDX], axis=1, inplace=True)
713 data = pd.Series(list(data.values))
714 cat_features = pool.get_cat_feature_indices()
715 pool2 = Pool(data, labels, cat_features)
716 assert _have_equal_features(pool, pool2)
717 assert _check_data([int(label) for label in pool.get_label()], pool2.get_label())
718
719
720def test_pool_cat_features():

Callers

nothing calls this directly

Calls 7

PoolClass · 0.90
dropMethod · 0.80
get_labelMethod · 0.80
_check_dataFunction · 0.70
listClass · 0.50
intFunction · 0.50

Tested by

no test coverage detected