Rosetta
|
Classes | |
struct | SolutionInfo |
Public Member Functions | |
Solver () | |
virtual | ~Solver () |
void | Solve (int l, const QMatrix &Q, const double *p_, const schar *y_, double *alpha_, double Cp, double Cn, double eps, SolutionInfo *si, int shrinking) |
Protected Types | |
enum | { LOWER_BOUND, UPPER_BOUND, FREE } |
Protected Member Functions | |
double | get_C (int i) |
void | update_alpha_status (int i) |
bool | is_upper_bound (int i) |
bool | is_lower_bound (int i) |
bool | is_free (int i) |
void | swap_index (int i, int j) |
void | reconstruct_gradient () |
virtual int | select_working_set (int &i, int &j) |
virtual double | calculate_rho () |
virtual void | do_shrinking () |
Protected Attributes | |
int | active_size |
schar * | y |
double * | G |
char * | alpha_status |
double * | alpha |
const QMatrix * | Q |
const double * | QD |
double | eps |
double | Cp |
double | Cn |
double * | p |
int * | active_set |
double * | G_bar |
int | l |
bool | unshrink |
Private Member Functions | |
bool | be_shrunk (int i, double Gmax1, double Gmax2) |
|
protected |
Definition at line 856 of file Svm.cc.
References G, is_lower_bound(), is_upper_bound(), and y.
Referenced by do_shrinking().
|
protectedvirtual |
Reimplemented in Solver_NU.
Definition at line 930 of file Svm.cc.
References active_size, G, INF, is_lower_bound(), is_upper_bound(), max(), min(), and y.
Referenced by Solve().
|
protectedvirtual |
Reimplemented in Solver_NU.
Definition at line 875 of file Svm.cc.
References active_size, be_shrunk(), eps, G, INF, info(), is_lower_bound(), is_upper_bound(), l, reconstruct_gradient(), swap_index(), unshrink, and y.
Referenced by Solve().
Definition at line 429 of file Svm.cc.
References alpha_status, and FREE.
Referenced by reconstruct_gradient().
Definition at line 428 of file Svm.cc.
References alpha_status, and LOWER_BOUND.
Referenced by be_shrunk(), Solver_NU::be_shrunk(), calculate_rho(), Solver_NU::calculate_rho(), do_shrinking(), Solver_NU::do_shrinking(), select_working_set(), Solver_NU::select_working_set(), and Solve().
Definition at line 427 of file Svm.cc.
References alpha_status, and UPPER_BOUND.
Referenced by be_shrunk(), Solver_NU::be_shrunk(), calculate_rho(), Solver_NU::calculate_rho(), do_shrinking(), Solver_NU::do_shrinking(), select_working_set(), Solver_NU::select_working_set(), and Solve().
|
protected |
Definition at line 451 of file Svm.cc.
References active_size, alpha, G, G_bar, QMatrix::get_Q(), info(), is_free(), l, p, and Q.
Referenced by do_shrinking(), Solver_NU::do_shrinking(), and Solve().
Reimplemented in Solver_NU.
Definition at line 763 of file Svm.cc.
References active_size, eps, G, QMatrix::get_Q(), INF, is_lower_bound(), is_upper_bound(), Q, QD, TAU, and y.
Referenced by Solve().
void Solver::Solve | ( | int | l, |
const QMatrix & | Q, | ||
const double * | p_, | ||
const schar * | y_, | ||
double * | alpha_, | ||
double | Cp, | ||
double | Cn, | ||
double | eps, | ||
SolutionInfo * | si, | ||
int | shrinking | ||
) |
Definition at line 496 of file Svm.cc.
References active_set, active_size, alpha, alpha_status, calculate_rho(), clone(), Cn, demo.D060_Folding::counter, Cp, do_shrinking(), eps, G, G_bar, get_C(), QMatrix::get_Q(), QMatrix::get_QD(), info(), is_lower_bound(), is_upper_bound(), l, max(), min(), Solver::SolutionInfo::obj, p, Q, QD, reconstruct_gradient(), Solver::SolutionInfo::rho, select_working_set(), sum(), TAU, unshrink, update_alpha_status(), Solver::SolutionInfo::upper_bound_n, Solver::SolutionInfo::upper_bound_p, test.T850_SubClassing::v, and y.
Referenced by Solver_NU::Solve(), solve_c_svc(), solve_epsilon_svr(), and solve_one_class().
Definition at line 439 of file Svm.cc.
References active_set, alpha, alpha_status, G, G_bar, p, Q, swap(), QMatrix::swap_index(), and y.
Referenced by do_shrinking(), and Solver_NU::do_shrinking().
|
inlineprotected |
Definition at line 419 of file Svm.cc.
References alpha, alpha_status, FREE, get_C(), LOWER_BOUND, and UPPER_BOUND.
Referenced by Solve().
|
protected |
Definition at line 410 of file Svm.cc.
Referenced by Solve(), and swap_index().
|
protected |
Definition at line 399 of file Svm.cc.
Referenced by calculate_rho(), Solver_NU::calculate_rho(), do_shrinking(), Solver_NU::do_shrinking(), reconstruct_gradient(), select_working_set(), Solver_NU::select_working_set(), and Solve().
|
protected |
Definition at line 404 of file Svm.cc.
Referenced by reconstruct_gradient(), Solve(), swap_index(), and update_alpha_status().
|
protected |
Definition at line 403 of file Svm.cc.
Referenced by is_free(), is_lower_bound(), is_upper_bound(), Solve(), swap_index(), and update_alpha_status().
|
protected |
|
protected |
|
protected |
Definition at line 407 of file Svm.cc.
Referenced by do_shrinking(), Solver_NU::do_shrinking(), select_working_set(), Solver_NU::select_working_set(), and Solve().
|
protected |
Definition at line 401 of file Svm.cc.
Referenced by be_shrunk(), Solver_NU::be_shrunk(), calculate_rho(), Solver_NU::calculate_rho(), do_shrinking(), Solver_NU::do_shrinking(), reconstruct_gradient(), select_working_set(), Solver_NU::select_working_set(), Solve(), and swap_index().
|
protected |
Definition at line 411 of file Svm.cc.
Referenced by reconstruct_gradient(), Solve(), and swap_index().
|
protected |
Definition at line 412 of file Svm.cc.
Referenced by do_shrinking(), Solver_NU::do_shrinking(), reconstruct_gradient(), and Solve().
|
protected |
Definition at line 409 of file Svm.cc.
Referenced by reconstruct_gradient(), Solve(), and swap_index().
|
protected |
Definition at line 405 of file Svm.cc.
Referenced by reconstruct_gradient(), select_working_set(), Solver_NU::select_working_set(), Solve(), and swap_index().
|
protected |
Definition at line 406 of file Svm.cc.
Referenced by select_working_set(), Solver_NU::select_working_set(), and Solve().
|
protected |
Definition at line 413 of file Svm.cc.
Referenced by do_shrinking(), Solver_NU::do_shrinking(), and Solve().
|
protected |
Definition at line 400 of file Svm.cc.
Referenced by be_shrunk(), Solver_NU::be_shrunk(), calculate_rho(), Solver_NU::calculate_rho(), do_shrinking(), Solver_NU::do_shrinking(), get_C(), select_working_set(), Solver_NU::select_working_set(), Solve(), and swap_index().