There have something wrong


#1

i used xgboost in python
and i code this
“”"
xgb_train = xgb.DMatrix(‘agaricus.txt.train’)
xgb_test = xgb.DMatrix(‘agaricus.txt.test’)
“”"
and i have these file in my folder
but console have error like this
“”"
XGBoostError Traceback (most recent call last)

in
1 # 数据读取
2 # xgb_train = xgb.DMatrix(‘agaricus.txt.train’)
----> 3 xgb_test = xgb.DMatrix(‘text.agaricus.txt’)

C:\ProgramData\Anaconda3\lib\site-packages\xgboost\core.py in init(self, data, label, weight, base_margin, missing, silent, feature_names, feature_types, nthread)
463 _check_call(_LIB.XGDMatrixCreateFromFile(c_str(os_fspath(data)),
464 ctypes.c_int(silent),
–> 465 ctypes.byref(handle)))
466 self.handle = handle
467 elif isinstance(data, scipy.sparse.csr_matrix):

C:\ProgramData\Anaconda3\lib\site-packages\xgboost\core.py in _check_call(ret)
187 “”"
188 if ret != 0:
–> 189 raise XGBoostError(py_str(_LIB.XGBGetLastError()))
190
191

XGBoostError: [17:32:53] D:\Build\xgboost\xgboost-1.0.1.git\dmlc-core\src\io\local_filesys.cc:86: LocalFileSystem.GetPathInfo: text.agaricus.txt error: No such file or directory
“”"
i dont know how to solve
plz someone help me


#2

i solve it
try to write the file you load complete file path