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

Method _read

catboost/python-package/catboost/core.py:1339–1380  ·  view source on GitHub ↗

Read Pool from file.

(
        self,
        pool_file,
        column_description,
        pairs,
        graph,
        feature_names_path,
        delimiter,
        has_header,
        ignore_csv_quoting,
        thread_count,
        quantization_params=None,
        log_cout=None,
        log_cerr=None
    )

Source from the content-addressed store, hash-verified

1337 return label
1338
1339 def _read(
1340 self,
1341 pool_file,
1342 column_description,
1343 pairs,
1344 graph,
1345 feature_names_path,
1346 delimiter,
1347 has_header,
1348 ignore_csv_quoting,
1349 thread_count,
1350 quantization_params=None,
1351 log_cout=None,
1352 log_cerr=None
1353 ):
1354 """
1355 Read Pool from file.
1356 """
1357
1358 with log_fixup(log_cout, log_cerr):
1359 self._check_files(pool_file, column_description, pairs, graph)
1360 self._check_delimiter(delimiter)
1361 if column_description is None:
1362 column_description = ''
1363 else:
1364 self._check_column_description_type(column_description)
1365 for item in [pairs, feature_names_path, graph]:
1366 if item is None:
1367 item = ''
1368 self._check_thread_count(thread_count)
1369 self._read_pool(
1370 pool_file,
1371 column_description,
1372 pairs,
1373 graph,
1374 feature_names_path,
1375 delimiter[0],
1376 has_header,
1377 ignore_csv_quoting,
1378 thread_count,
1379 quantization_params
1380 )
1381
1382 def _infer_feature_names(self, data_as_data_frame, embedding_features_data=None, embedding_features=None):
1383 non_embedding_data_feature_names = list(data_as_data_frame.columns)

Callers 2

__init__Method · 0.95
quantizeFunction · 0.95

Calls 5

_check_filesMethod · 0.95
_check_delimiterMethod · 0.95
_check_thread_countMethod · 0.95
log_fixupFunction · 0.70

Tested by

no test coverage detected