简体   繁体   中英

Error when running RGFClassifier

I recently tried to run Regularized Greedy Forest algorithm (rgf Classifier) from this package https://pypi.python.org/pypi/rgf_python .

I did run pip install rgf_python, but when I tried to run the example this error pops out in spyder:

  File "C:\Users\me\Anaconda3\lib\site-packages\rgf\sklearn.py", line 111, in <module>
    "config flag 'exe_location' to RGF execution file.".format(_EXE_PATH))

Exception: C:\Users\me\rgf.exe is not executable file. Please set config flag 'exe_location' to RGF execution file.

What should I change in order for config the flag 'exe_location'? May sound beginner but can't find it anywhere.

Official doccument is here. https://github.com/fukatani/rgf_python#installation

For accurate support, I want to know your OS and python version.

In brief, you should do the following two things.

First, you should build rgf execution file.

$ git clone https://github.com/fukatani/rgf_python.git

$ cd rgf_python/include/rgf/build

$ make

If succeeded, you can find rgf_python/include/rgf/bin/rgf if you use linux.

Second, you should register exe_location. There are several methods, but I recommend the method editing ~/.rgfrc. Open ~/.rgfrc by your text editer, and add line. exe_location=/path/to/rgf_python/include/rgf/bin/rgf.exe exe_location should be full path, please do not use relative path.

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM