Package: stochQN 0.1.2-1

David Cortes

stochQN: Stochastic Limited Memory Quasi-Newton Optimizers

Implementations of stochastic, limited-memory quasi-Newton optimizers, similar in spirit to the LBFGS (Limited-memory Broyden-Fletcher-Goldfarb-Shanno) algorithm, for smooth stochastic optimization. Implements the following methods: oLBFGS (online LBFGS) (Schraudolph, N.N., Yu, J. and Guenter, S., 2007 <http://proceedings.mlr.press/v2/schraudolph07a.html>), SQN (stochastic quasi-Newton) (Byrd, R.H., Hansen, S.L., Nocedal, J. and Singer, Y., 2016 <arxiv:1401.7020>), adaQN (adaptive quasi-Newton) (Keskar, N.S., Berahas, A.S., 2016, <arxiv:1511.01169>). Provides functions for easily creating R objects with partial_fit/predict methods from some given objective/gradient/predict functions. Includes an example stochastic logistic regression using these optimizers. Provides header files and registered C routines for using it directly from C/C++.

Authors:David Cortes

stochQN_0.1.2-1.tar.gz
stochQN_0.1.2-1.tar.gz(r-4.5-noble)stochQN_0.1.2-1.tar.gz(r-4.4-noble)
stochQN_0.1.2-1.tgz(r-4.4-emscripten)stochQN_0.1.2-1.tgz(r-4.3-emscripten)
stochQN.pdf |stochQN.html
stochQN/json (API)

# Install 'stochQN' in R:
install.packages('stochQN', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/david-cortes/stochqn/issues

Uses libs:
  • openblas– Optimized BLAS
  • openmp– GCC OpenMP (GOMP) support library

openblasopenmp

1.11 score 1 stars 13 scripts 225 downloads 17 exports 0 dependencies

Last updated 3 years agofrom:c595f81ca7. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 16 2024
R-4.5-linux-x86_64OKDec 16 2024

Exports:adaQNadaQN_freeget_curr_xget_iteration_numberoLBFGSoLBFGS_freepartial_fitpartial_fit_logisticrun_adaQN_freerun_oLBFGS_freerun_SQN_freeSQNSQN_freestochastic.logistic.regressionupdate_funupdate_gradientupdate_hess_vec

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
adaQN guided optimizeradaQN
adaQN Free-Mode OptimizeradaQN_free
Retrieve fitted coefficients from stochastic logistic regression objectcoef.stoch_logistic
Get current values of the optimization variablesget_curr_x
Get current iteration number from the optimizer objectget_iteration_number
oLBFGS guided optimizeroLBFGS
oLBFGS Free-Mode OptimizeroLBFGS_free
Partial fit stochastic model to new datapartial_fit
Update stochastic logistic regression model with new batch of datapartial_fit_logistic
Prediction function for stochastic logistic regressionpredict.stoch_logistic
Predict function for stochastic optimizer objectpredict.stochQN_guided
Print summary info about adaQN guided-mode objectprint.adaQN
Print summary info about adaQN free-mode objectprint.adaQN_free
Print summary info about oLBFGS guided-mode objectprint.oLBFGS
Print summary info about oLBFGS free-mode objectprint.oLBFGS_free
Print summary info about SQN guided-mode objectprint.SQN
Print summary info about SQN free-mode objectprint.SQN_free
Print general info about stochastic logistic regression objectprint.stoch_logistic
Run adaQN optimizer in free-moderun_adaQN_free
Run oLBFGS optimizer in free-moderun_oLBFGS_free
Run SQN optimizer in free-moderun_SQN_free
SQN guided optimizerSQN
SQN Free-Mode OptimizerSQN_free
Stochastic Logistic Regressionstochastic.logistic.regression
Print general info about stochastic logistic regression objectsummary.stoch_logistic
Update objective function value (adaQN)update_fun
Update gradient (oLBFGS, SQN, adaQN)update_gradient
Update Hessian-vector product (SQN)update_hess_vec