This commit is contained in:
tqchen 2015-02-09 20:35:30 -08:00
parent 4a5b9e5f78
commit d2f252f87a
4 changed files with 39 additions and 5 deletions

View File

@ -8,6 +8,8 @@ It also contain links to the Machine Learning packages that uses rabit.
Toolkits Toolkits
==== ====
* [KMeans Clustering](kmeans) * [KMeans Clustering](kmeans)
* [Linear and Logistic Regression](liner)
* [XGBoost: eXtreme Gradient Boosting](https://github.com/tqchen/xgboost/tree/master/multi-node) * [XGBoost: eXtreme Gradient Boosting](https://github.com/tqchen/xgboost/tree/master/multi-node)
- xgboost is a very fast boosted tree(also known as GBDT) library, that can run more than - xgboost is a very fast boosted tree(also known as GBDT) library, that can run more than
10 times faster than existing packages 10 times faster than existing packages

View File

@ -11,5 +11,3 @@ CFLAGS+=-fopenmp
linear.o: linear.cc ../../src/*.h linear.h ../solver/*.h linear.o: linear.cc ../../src/*.h linear.h ../solver/*.h
# dependenies here # dependenies here
linear.rabit: linear.o lib linear.rabit: linear.o lib

View File

@ -2,3 +2,28 @@ Linear and Logistic Regression
==== ====
* input format: LibSVM * input format: LibSVM
* Example: [run-linear.sh](run-linear.sh) * Example: [run-linear.sh](run-linear.sh)
Parameters
===
All the parameters can be set by param=value
#### Important Parameters
* reg_L1 [default = 0]
- l1 regularization co-efficient
* reg_L2 [default = 1]
- l2 regularization co-efficient
* lbfgs_stop_tol [default = 1e-5]
- relative tolerance level of loss reduction with respect to initial loss
* max_lbfgs_iter [default = 500]
- maximum number of lbfgs iterations
### Optimization Related parameters
* min_lbfgs_iter [default = 5]
- minimum number of lbfgs iterations
* max_linesearch_iter [default = 100]
- maximum number of iterations in linesearch
* linesearch_c1 [default = 1e-4]
- c1 co-efficient in backoff linesearch
* linesarch_backoff [default = 0.5]
- backoff ratio in linesearch

View File

@ -57,12 +57,12 @@ class LBFGSSolver {
LBFGSSolver(void) { LBFGSSolver(void) {
// set default values // set default values
reg_L1 = 0.0f; reg_L1 = 0.0f;
max_linesearch_iter = 1000; max_linesearch_iter = 100;
linesearch_backoff = 0.5f; linesearch_backoff = 0.5f;
linesearch_c1 = 1e-4; linesearch_c1 = 1e-4;
min_lbfgs_iter = 5; min_lbfgs_iter = 5;
max_lbfgs_iter = 1000; max_lbfgs_iter = 500;
lbfgs_stop_tol = 3e-6f; lbfgs_stop_tol = 1e-5f;
silent = 0; silent = 0;
} }
virtual ~LBFGSSolver(void) {} virtual ~LBFGSSolver(void) {}
@ -90,6 +90,15 @@ class LBFGSSolver {
if (!strcmp("max_linesearch_iter", name)) { if (!strcmp("max_linesearch_iter", name)) {
max_linesearch_iter = atoi(val); max_linesearch_iter = atoi(val);
} }
if (!strcmp("max_lbfgs_iter", name)) {
max_lbfgs_iter = atoi(val);
}
if (!strcmp("min_lbfgs_iter", name)) {
min_lbfgs_iter = atoi(val);
}
if (!strcmp("linesearch_c1", name)) {
linesearch_c1 = static_cast<float>(atof(val));
}
} }
/*! /*!
* \brief set objective function to optimize * \brief set objective function to optimize