picasso
picasso copied to clipboard
Regularizer mapping is different in c_api and python interface
Greetings.
According to python-package/pycasso/lib/core.py, the mapping of regularizer is as follows:
- MCP = 2, SCAD = 3, and 1 for others
However, in src/c_api/c_api.cpp, the mapping of regularizer is as follows:
- L1 = 1, MCP = 2, SCAP for all the others
This will cause incompatible situations. An exception should be raised for number not in 1~3, and mapping logic should be the same.
On the other hand, when it comes to ActGDSolver::solve(), regfunc is determined by enum defined in include/picasso/solver_params.hpp. However, according to the cpp standard, the default value of enum is set to 0, which means L1 = 0, SCAD =1 and MCP = 2, and this will cause wrong regfunc to be applied.
Please correct me if I was wrong, thank you. Wenny