KSquare Utilities
SVM289_BFS::Solver Class Reference
+ Inheritance diagram for SVM289_BFS::Solver:

Classes

struct  SolutionInfo
 

Public Member Functions

 Solver ()
 
virtual ~Solver ()
 
void Solve (kkint32 l, QMatrix &Q, const double *p_, const schar *y_, double *alpha_, double Cp, double Cn, double eps, SolutionInfo *si, kkint32 shrinking)
 

Protected Types

enum  { LOWER_BOUND, UPPER_BOUND, FREE }
 

Protected Member Functions

virtual double calculate_rho ()
 
virtual void do_shrinking ()
 
double get_C (kkint32 i)
 
bool is_free (kkint32 i)
 
bool is_lower_bound (kkint32 i)
 
bool is_upper_bound (kkint32 i)
 
void reconstruct_gradient ()
 
virtual kkint32 select_working_set (kkint32 &i, kkint32 &j)
 
void swap_index (kkint32 i, kkint32 j)
 
void update_alpha_status (kkint32 i)
 

Protected Attributes

kkint32active_set
 
kkint32 active_size
 
double * alpha
 
char * alpha_status
 
double Cn
 
double Cp
 
double eps
 
double * G
 
double * G_bar
 
kkint32 l
 
double * p
 
QMatrixQ
 
const QfloatQD
 
bool unshrink
 
schary
 

Detailed Description

Definition at line 1163 of file svm289_BFS.cpp.

Member Enumeration Documentation

anonymous enum
protected
Enumerator
LOWER_BOUND 
UPPER_BOUND 
FREE 

Definition at line 1192 of file svm289_BFS.cpp.

Constructor & Destructor Documentation

SVM289_BFS::Solver::Solver ( )
inline

Definition at line 1165 of file svm289_BFS.cpp.

1165 {};
virtual SVM289_BFS::Solver::~Solver ( )
inlinevirtual

Definition at line 1166 of file svm289_BFS.cpp.

1166 {};

Member Function Documentation

double SVM289_BFS::Solver::calculate_rho ( )
protectedvirtual

Definition at line 1825 of file svm289_BFS.cpp.

References active_size, G, is_lower_bound(), is_upper_bound(), and y.

Referenced by Solve().

1826 {
1827  double r;
1828  kkint32 nr_free = 0;
1829  double ub = INF;
1830  double lb = -INF;
1831  double sum_free = 0;
1832 
1833  for (kkint32 i = 0; i < active_size; i++)
1834  {
1835  double yG = y[i] * G[i];
1836 
1837  if (is_upper_bound(i))
1838  {
1839  if (y[i] == -1)
1840  ub = Min (ub, yG);
1841  else
1842  lb = Max (lb, yG);
1843  }
1844 
1845  else if (is_lower_bound(i))
1846  {
1847  if (y[i] == +1)
1848  ub = Min (ub,yG);
1849  else
1850  lb = Max (lb,yG);
1851  }
1852  else
1853  {
1854  ++nr_free;
1855  sum_free += yG;
1856  }
1857  }
1858 
1859  if (nr_free > 0)
1860  r = sum_free / nr_free;
1861  else
1862  r = (ub + lb) / 2;
1863 
1864  return r;
1865 } /* calculate_rho */
__int32 kkint32
Definition: KKBaseTypes.h:88
#define INF
Definition: svm289_BFS.cpp:109
bool is_upper_bound(kkint32 i)
T Max(T a, T b)
generic Max function, Both parameters must be of the same type.
Definition: KKBaseTypes.h:181
bool is_lower_bound(kkint32 i)
kkint32 Min(kkint32 x1, kkint32 x2)
Definition: Raster.cpp:229
void Solver::do_shrinking ( )
protectedvirtual

Definition at line 1757 of file svm289_BFS.cpp.

References active_size, eps, G, info(), is_lower_bound(), is_upper_bound(), l, reconstruct_gradient(), swap_index(), unshrink, and y.

Referenced by Solve().

1758 {
1759  kkint32 i;
1760  double Gmax1 = -INF; // Max { -y_i * grad(f)_i | i in I_up(\alpha) }
1761  double Gmax2 = -INF; // Max { y_i * grad(f)_i | i in I_low(\alpha) }
1762 
1763  // find maximal violating pair first
1764  for (i = 0; i < active_size; i++)
1765  {
1766  if (y[i] == +1)
1767  {
1768  if (!is_upper_bound (i))
1769  {
1770  if (-G[i] >= Gmax1)
1771  Gmax1 = -G[i];
1772  }
1773  if (!is_lower_bound (i))
1774  {
1775  if (G[i] >= Gmax2)
1776  Gmax2 = G[i];
1777  }
1778  }
1779 
1780  else
1781  {
1782  if (!is_upper_bound (i))
1783  {
1784  if (-G[i] >= Gmax2)
1785  Gmax2 = -G[i];
1786  }
1787 
1788  if (!is_lower_bound (i))
1789  {
1790  if (G[i] >= Gmax1)
1791  Gmax1 = G[i];
1792  }
1793  }
1794  }
1795 
1796  if ((unshrink == false) && ((Gmax1 + Gmax2) <= (eps * 10)))
1797  {
1798  unshrink = true;
1800  active_size = l;
1801  info ("*");
1802  }
1803 
1804  for (i = 0; i < active_size; i++)
1805  {
1806  if (be_shrunk(i, Gmax1, Gmax2))
1807  {
1808  active_size--;
1809  while (active_size > i)
1810  {
1811  if (!be_shrunk (active_size, Gmax1, Gmax2))
1812  {
1813  swap_index (i, active_size);
1814  break;
1815  }
1816  active_size--;
1817  }
1818  }
1819  }
1820 } /* do_shrinking */
__int32 kkint32
Definition: KKBaseTypes.h:88
#define INF
Definition: svm289_BFS.cpp:109
static void info(const char *fmt,...)
Definition: svm289_BFS.cpp:626
void swap_index(kkint32 i, kkint32 j)
bool is_upper_bound(kkint32 i)
bool is_lower_bound(kkint32 i)
double SVM289_BFS::Solver::get_C ( kkint32  i)
inlineprotected

Definition at line 1207 of file svm289_BFS.cpp.

References Cn, Cp, and y.

Referenced by Solve(), and update_alpha_status().

1208  {
1209  return (y[i] > 0) ? Cp : Cn;
1210  }
bool SVM289_BFS::Solver::is_free ( kkint32  i)
inlineprotected

Definition at line 1227 of file svm289_BFS.cpp.

References alpha_status, and FREE.

Referenced by reconstruct_gradient().

bool SVM289_BFS::Solver::is_lower_bound ( kkint32  i)
inlineprotected
bool SVM289_BFS::Solver::is_upper_bound ( kkint32  i)
inlineprotected
void SVM289_BFS::Solver::reconstruct_gradient ( )
protected

Definition at line 1264 of file svm289_BFS.cpp.

References active_size, alpha, G, G_bar, SVM289_BFS::QMatrix::get_Q(), info(), is_free(), l, p, and Q.

Referenced by do_shrinking(), and Solve().

1265 {
1266  // reconstruct inactive elements of G from G_bar and free variables
1267 
1268  if (active_size == l)
1269  return;
1270 
1271  kkint32 i,j;
1272  kkint32 nr_free = 0;
1273 
1274  for (j = active_size; j < l; j++)
1275  G[j] = G_bar[j] + p[j];
1276 
1277  for (j = 0; j < active_size; j++)
1278  {
1279  if (is_free(j))
1280  nr_free++;
1281  }
1282 
1283  if (2 * nr_free < active_size)
1284  info("\nWarning: using -h 0 may be faster\n");
1285 
1286  if (nr_free*l > 2 * active_size * (l - active_size))
1287  {
1288  for (i = active_size; i < l; i++)
1289  {
1290  Qfloat *Q_i = Q->get_Q (i, active_size);
1291  for (j = 0; j < active_size; j++)
1292  {
1293  if (is_free (j))
1294  G[i] += alpha[j] * Q_i[j];
1295  }
1296  }
1297  }
1298  else
1299  {
1300  for (i = 0; i < active_size; i++)
1301  {
1302  if (is_free (i))
1303  {
1304  Qfloat* Q_i = Q->get_Q (i,l);
1305  double alpha_i = alpha[i];
1306  for (j = active_size; j < l; j++)
1307  G[j] += alpha_i * Q_i[j];
1308  }
1309  }
1310  }
1311 } /* reconstruct_gradient */
__int32 kkint32
Definition: KKBaseTypes.h:88
virtual Qfloat * get_Q(kkint32 column, kkint32 len) const =0
bool is_free(kkint32 i)
static void info(const char *fmt,...)
Definition: svm289_BFS.cpp:626
float Qfloat
Definition: svm289_BFS.h:269
kkint32 SVM289_BFS::Solver::select_working_set ( kkint32 i,
kkint32 j 
)
protectedvirtual

Definition at line 1616 of file svm289_BFS.cpp.

References active_size, eps, G, SVM289_BFS::QMatrix::get_Q(), is_lower_bound(), is_upper_bound(), Q, QD, and y.

Referenced by Solve().

1619 {
1620  // return i,j such that
1621  // i: maximizes -y_i * grad(f)_i, i in I_up(\alpha)
1622  // j: minimizes the decrease of obj value
1623  // (if quadratic coefficient <= 0, replace it with tau)
1624  // -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha)
1625 
1626  double Gmax = -INF;
1627  double Gmax2 = -INF;
1628  kkint32 Gmax_idx = -1;
1629  kkint32 Gmin_idx = -1;
1630  double obj_diff_min = INF;
1631 
1632  for (kkint32 t=0;t<active_size;t++)
1633  {
1634  if (y[t] == +1)
1635  {
1636  if (!is_upper_bound (t))
1637  {
1638  if (-G[t] >= Gmax)
1639  {
1640  Gmax = -G[t];
1641  Gmax_idx = t;
1642  }
1643  }
1644  }
1645  else
1646  {
1647  if (!is_lower_bound (t))
1648  {
1649  if (G[t] >= Gmax)
1650  {
1651  Gmax = G[t];
1652  Gmax_idx = t;
1653  }
1654  }
1655  }
1656  }
1657 
1658 
1659  kkint32 i = Gmax_idx;
1660  const Qfloat *Q_i = NULL;
1661  if (i != -1) // NULL Q_i not accessed: Gmax=-INF if i=-1
1662  Q_i = Q->get_Q(i,active_size);
1663 
1664  for(kkint32 j=0;j<active_size;j++)
1665  {
1666  if(y[j]==+1)
1667  {
1668  if (!is_lower_bound(j))
1669  {
1670  double grad_diff=Gmax+G[j];
1671  if (G[j] >= Gmax2)
1672  Gmax2 = G[j];
1673 
1674  if (grad_diff > 0)
1675  {
1676  double obj_diff;
1677  double quad_coef = Q_i[i] + QD[j] - 2.0 * y[i] * Q_i[j];
1678 
1679  if (quad_coef > 0)
1680  obj_diff = -(grad_diff*grad_diff)/quad_coef;
1681  else
1682  obj_diff = -(grad_diff*grad_diff)/TAU;
1683 
1684  if (obj_diff <= obj_diff_min)
1685  {
1686  Gmin_idx=j;
1687  obj_diff_min = obj_diff;
1688  }
1689  }
1690  }
1691  }
1692  else
1693  {
1694  if (!is_upper_bound(j))
1695  {
1696  double grad_diff= Gmax-G[j];
1697  if (-G[j] >= Gmax2)
1698  Gmax2 = -G[j];
1699  if (grad_diff > 0)
1700  {
1701  double obj_diff;
1702  double quad_coef=Q_i[i]+QD[j]+2.0*y[i]*Q_i[j];
1703  if (quad_coef > 0)
1704  obj_diff = -(grad_diff*grad_diff)/quad_coef;
1705  else
1706  obj_diff = -(grad_diff*grad_diff)/TAU;
1707 
1708  if (obj_diff <= obj_diff_min)
1709  {
1710  Gmin_idx=j;
1711  obj_diff_min = obj_diff;
1712  }
1713  }
1714  }
1715  }
1716  }
1717 
1718  if (Gmax + Gmax2 < eps)
1719  return 1;
1720 
1721  out_i = Gmax_idx;
1722  out_j = Gmin_idx;
1723  return 0;
1724 } /* select_working_set */
__int32 kkint32
Definition: KKBaseTypes.h:88
#define TAU
Definition: svm289_BFS.cpp:110
virtual Qfloat * get_Q(kkint32 column, kkint32 len) const =0
#define INF
Definition: svm289_BFS.cpp:109
float Qfloat
Definition: svm289_BFS.h:269
bool is_upper_bound(kkint32 i)
bool is_lower_bound(kkint32 i)
const Qfloat * QD
void SVM289_BFS::Solver::Solve ( kkint32  l,
QMatrix Q,
const double *  p_,
const schar y_,
double *  alpha_,
double  Cp,
double  Cn,
double  eps,
SolutionInfo si,
kkint32  shrinking 
)

Definition at line 1317 of file svm289_BFS.cpp.

References active_set, active_size, alpha, alpha_status, calculate_rho(), Cn, Cp, do_shrinking(), eps, G, G_bar, get_C(), SVM289_BFS::QMatrix::get_Q(), SVM289_BFS::QMatrix::get_QD(), info(), is_lower_bound(), is_upper_bound(), l, SVM289_BFS::Solver::SolutionInfo::obj, p, Q, QD, reconstruct_gradient(), SVM289_BFS::Solver::SolutionInfo::rho, select_working_set(), unshrink, update_alpha_status(), SVM289_BFS::Solver::SolutionInfo::upper_bound_n, SVM289_BFS::Solver::SolutionInfo::upper_bound_p, and y.

Referenced by SVM289_BFS::Solver_NU::Solve(), SVM289_BFS::solve_c_svc(), SVM289_BFS::solve_epsilon_svr(), and SVM289_BFS::solve_one_class().

1328 {
1329  this->l = l;
1330  this->Q = &Q;
1331  QD=Q.get_QD();
1332  clone(p, p_,l);
1333  clone(y, y_,l);
1334  clone(alpha,alpha_,l);
1335  this->Cp = Cp;
1336  this->Cn = Cn;
1337  this->eps = eps;
1338  unshrink = false;
1339 
1340  // initialize alpha_status
1341  {
1342  alpha_status = new char[l];
1343  for (kkint32 i = 0; i < l; i++)
1344  update_alpha_status (i);
1345  }
1346 
1347  // initialize active set (for shrinking)
1348  {
1349  active_set = new kkint32[l];
1350  for (kkint32 i = 0; i < l; i++)
1351  active_set[i] = i;
1352  active_size = l;
1353  }
1354 
1355  // initialize gradient
1356  {
1357  G = new double[l];
1358  G_bar = new double[l];
1359  kkint32 i;
1360  for (i = 0; i < l; i++)
1361  {
1362  G[i] = p[i];
1363  G_bar[i] = 0;
1364  }
1365 
1366  for(i=0;i<l;i++)
1367  {
1368  if (!is_lower_bound (i))
1369  {
1370  Qfloat *Q_i = Q.get_Q(i,l);
1371  double alpha_i = alpha[i];
1372  kkint32 j;
1373  for (j = 0; j < l; j++)
1374  G[j] += alpha_i*Q_i[j];
1375 
1376  if (is_upper_bound (i))
1377  {
1378  for (j = 0; j < l; j++)
1379  G_bar[j] += get_C(i) * Q_i[j];
1380  }
1381  }
1382  }
1383  }
1384 
1385  // optimization step
1386 
1387  kkint32 iter = 0;
1388  kkint32 counter = Min (l, 1000) + 1;
1389 
1390  while(1)
1391  {
1392  // show progress and do shrinking
1393 
1394  if (--counter == 0)
1395  {
1396  counter = Min (l, 1000);
1397  if (shrinking)
1398  do_shrinking();
1399  info(".");
1400  }
1401 
1402  kkint32 i, j;
1403  if (select_working_set (i, j) != 0) // 'select_working_set' == 1 if already optimal otherwise 0.
1404  {
1405  // reconstruct the whole gradient
1407  // reset active set size and check
1408  active_size = l;
1409  info ("*");
1410  if (select_working_set (i, j) != 0)
1411  break;
1412  else
1413  counter = 1; // do shrinking next iteration
1414  }
1415 
1416  ++iter;
1417 
1418  // update alpha[i] and alpha[j], handle bounds carefully
1419 
1420  const Qfloat *Q_i = Q.get_Q(i,active_size);
1421  const Qfloat *Q_j = Q.get_Q(j,active_size);
1422 
1423  double C_i = get_C(i);
1424  double C_j = get_C(j);
1425 
1426  double old_alpha_i = alpha[i];
1427  double old_alpha_j = alpha[j];
1428 
1429  if (y[i] != y[j])
1430  {
1431  double quad_coef = Q_i[i] + Q_j[j] +2 *Q_i[j];
1432  if (quad_coef <= 0)
1433  quad_coef = TAU;
1434 
1435  double delta = (-G[i] - G[j]) / quad_coef;
1436  double diff = alpha[i] - alpha[j];
1437  alpha[i] += delta;
1438  alpha[j] += delta;
1439 
1440  if (diff > 0)
1441  {
1442  if (alpha[j] < 0)
1443  {
1444  alpha[j] = 0;
1445  alpha[i] = diff;
1446  }
1447  }
1448  else
1449  {
1450  if (alpha[i] < 0)
1451  {
1452  alpha[i] = 0;
1453  alpha[j] = -diff;
1454  }
1455  }
1456  if (diff > C_i - C_j)
1457  {
1458  if(alpha[i] > C_i)
1459  {
1460  alpha[i] = C_i;
1461  alpha[j] = C_i - diff;
1462  }
1463  }
1464  else
1465  {
1466  if (alpha[j] > C_j)
1467  {
1468  alpha[j] = C_j;
1469  alpha[i] = C_j + diff;
1470  }
1471  }
1472  }
1473  else
1474  {
1475  double quad_coef = Q_i[i] + Q_j[j] - 2 * Q_i[j];
1476 
1477  if (quad_coef <= 0)
1478  quad_coef = TAU;
1479 
1480  double delta = (G[i] - G[j]) / quad_coef;
1481  double sum = alpha[i] + alpha[j];
1482  alpha[i] -= delta;
1483  alpha[j] += delta;
1484 
1485  if (sum > C_i)
1486  {
1487  if (alpha[i] > C_i)
1488  {
1489  alpha[i] = C_i;
1490  alpha[j] = sum - C_i;
1491  }
1492  }
1493  else
1494  {
1495  if (alpha[j] < 0)
1496  {
1497  alpha[j] = 0;
1498  alpha[i] = sum;
1499  }
1500  }
1501  if (sum > C_j)
1502  {
1503  if (alpha[j] > C_j)
1504  {
1505  alpha[j] = C_j;
1506  alpha[i] = sum - C_j;
1507  }
1508  }
1509  else
1510  {
1511  if (alpha[i] < 0)
1512  {
1513  alpha[i] = 0;
1514  alpha[j] = sum;
1515  }
1516  }
1517  }
1518 
1519  // update G
1520 
1521  double delta_alpha_i = alpha[i] - old_alpha_i;
1522  double delta_alpha_j = alpha[j] - old_alpha_j;
1523 
1524  for (kkint32 k = 0; k < active_size; k++)
1525  {
1526  G[k] += Q_i[k] * delta_alpha_i + Q_j[k] * delta_alpha_j;
1527  }
1528 
1529  // update alpha_status and G_bar
1530 
1531  {
1532  bool ui = is_upper_bound(i);
1533  bool uj = is_upper_bound(j);
1534  update_alpha_status (i);
1535  update_alpha_status (j);
1536  kkint32 k;
1537  if (ui != is_upper_bound (i))
1538  {
1539  Q_i = Q.get_Q (i,l);
1540  if (ui)
1541  {
1542  for (k = 0; k < l; k++)
1543  G_bar[k] -= C_i * Q_i[k];
1544  }
1545  else
1546  {
1547  for (k = 0; k < l; k++)
1548  G_bar[k] += C_i * Q_i[k];
1549  }
1550  }
1551 
1552  if(uj != is_upper_bound(j))
1553  {
1554  Q_j = Q.get_Q(j,l);
1555  if (uj)
1556  {
1557  for (k = 0; k < l; k++)
1558  G_bar[k] -= C_j * Q_j[k];
1559  }
1560  else
1561  {
1562  for (k = 0; k < l; k++)
1563  G_bar[k] += C_j * Q_j[k];
1564  }
1565  }
1566  }
1567  }
1568 
1569  // calculate rho
1570  si->rho = calculate_rho();
1571 
1572  // calculate objective value
1573  {
1574  double v = 0;
1575  kkint32 i;
1576  for (i = 0; i < l; i++)
1577  v += alpha[i] * (G[i] + p[i]);
1578 
1579  si->obj = v/2;
1580  }
1581 
1582  // put back the solution
1583  {
1584  for (kkint32 i = 0; i < l; i++)
1585  {
1586  alpha_[active_set[i]] = alpha[i];
1587  }
1588  }
1589 
1590  // juggle everything back
1591  /*{
1592  for(kkint32 i=0;i<l;i++)
1593  while(active_set[i] != i)
1594  swap_index(i,active_set[i]);
1595  // or Q.swap_index(i,active_set[i]);
1596  }*/
1597 
1598  si->upper_bound_p = Cp;
1599  si->upper_bound_n = Cn;
1600 
1601  //info("\noptimization finished, #iter = %d\n",iter);
1602 
1603  delete[] p;
1604  delete[] y;
1605  delete[] alpha;
1606  delete[] alpha_status;
1607  delete[] active_set;
1608  delete[] G;
1609  delete[] G_bar;
1610 } /* Solve */
__int32 kkint32
Definition: KKBaseTypes.h:88
#define TAU
Definition: svm289_BFS.cpp:110
virtual Qfloat * get_Q(kkint32 column, kkint32 len) const =0
virtual kkint32 select_working_set(kkint32 &i, kkint32 &j)
void clone(T *&dst, S *src, kkint32 n)
Definition: svm289_BFS.h:274
static void info(const char *fmt,...)
Definition: svm289_BFS.cpp:626
float Qfloat
Definition: svm289_BFS.h:269
virtual double calculate_rho()
double get_C(kkint32 i)
bool is_upper_bound(kkint32 i)
void update_alpha_status(kkint32 i)
virtual void do_shrinking()
virtual Qfloat * get_QD() const =0
bool is_lower_bound(kkint32 i)
kkint32 Min(kkint32 x1, kkint32 x2)
Definition: Raster.cpp:229
const Qfloat * QD
void SVM289_BFS::Solver::swap_index ( kkint32  i,
kkint32  j 
)
protected

Definition at line 1250 of file svm289_BFS.cpp.

References Q, and SVM289_BFS::QMatrix::swap_index().

Referenced by do_shrinking().

1251 {
1252  Q->swap_index (i, j);
1253  SVM289_BFS::swap (y[i], y[j]);
1254  SVM289_BFS::swap (G[i], G[j]);
1256  SVM289_BFS::swap (alpha[i], alpha[j]);
1257  SVM289_BFS::swap (p[i], p[j]);
1259  SVM289_BFS::swap (G_bar[i], G_bar[j]);
1260 } /* swap_index */
virtual void swap_index(kkint32 i, kkint32 j)=0
void swap(T &x, T &y)
Definition: svm289_BFS.h:265
void SVM289_BFS::Solver::update_alpha_status ( kkint32  i)
inlineprotected

Definition at line 1213 of file svm289_BFS.cpp.

References alpha, alpha_status, FREE, get_C(), LOWER_BOUND, and UPPER_BOUND.

Referenced by Solve().

1214  {
1215  if (alpha[i] >= get_C(i))
1217 
1218  else if(alpha[i] <= 0)
1220 
1221  else alpha_status[i] = FREE;
1222  }
double get_C(kkint32 i)

Member Data Documentation

kkint32* SVM289_BFS::Solver::active_set
protected

Definition at line 1201 of file svm289_BFS.cpp.

Referenced by Solve().

kkint32 SVM289_BFS::Solver::active_size
protected
double* SVM289_BFS::Solver::alpha
protected

Definition at line 1194 of file svm289_BFS.cpp.

Referenced by reconstruct_gradient(), Solve(), and update_alpha_status().

char* SVM289_BFS::Solver::alpha_status
protected

Definition at line 1193 of file svm289_BFS.cpp.

Referenced by is_free(), is_lower_bound(), is_upper_bound(), Solve(), and update_alpha_status().

double SVM289_BFS::Solver::Cn
protected

Definition at line 1199 of file svm289_BFS.cpp.

Referenced by get_C(), and Solve().

double SVM289_BFS::Solver::Cp
protected

Definition at line 1198 of file svm289_BFS.cpp.

Referenced by get_C(), and Solve().

double SVM289_BFS::Solver::eps
protected

Definition at line 1197 of file svm289_BFS.cpp.

Referenced by do_shrinking(), select_working_set(), and Solve().

double* SVM289_BFS::Solver::G
protected
double* SVM289_BFS::Solver::G_bar
protected

Definition at line 1202 of file svm289_BFS.cpp.

Referenced by reconstruct_gradient(), and Solve().

kkint32 SVM289_BFS::Solver::l
protected

Definition at line 1203 of file svm289_BFS.cpp.

Referenced by do_shrinking(), reconstruct_gradient(), and Solve().

double* SVM289_BFS::Solver::p
protected

Definition at line 1200 of file svm289_BFS.cpp.

Referenced by reconstruct_gradient(), and Solve().

QMatrix* SVM289_BFS::Solver::Q
protected

Definition at line 1195 of file svm289_BFS.cpp.

Referenced by reconstruct_gradient(), select_working_set(), Solve(), and swap_index().

const Qfloat* SVM289_BFS::Solver::QD
protected

Definition at line 1196 of file svm289_BFS.cpp.

Referenced by select_working_set(), and Solve().

bool SVM289_BFS::Solver::unshrink
protected

Definition at line 1204 of file svm289_BFS.cpp.

Referenced by do_shrinking(), and Solve().

schar* SVM289_BFS::Solver::y
protected

Definition at line 1190 of file svm289_BFS.cpp.

Referenced by calculate_rho(), do_shrinking(), get_C(), select_working_set(), and Solve().


The documentation for this class was generated from the following file: