Skip to content

davidxiaoyuxu/DiscreteChoice.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiscreteChoice.jl

Build Status Coverage Status codecov.io

Discrete choice modeling and estimation in Julia.

Solvers

  • Gradient descent.
  • Newton.
  • Quasi-Newton using inverse BFGS.
  • Trust region using exact Hessian, BFGS or SR1.

Installation

(v1.0) pkg> add https://github.com/brilhana/DiscreteChoice.jl

Usage

The function, and its gradient and Hessian (depending on the method) must be supplied to the solver by the user. An easy way to do it is to use ForwardDiff.

using DiscreteChoice
using ForwardDiff

f(x) = (1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2;

g(x) = ForwardDiff.gradient(f, x);

H(x) = ForwardDiff.hessian(f, x);

# Trust region using Steihaug-Toint.
optimize(f, g, H, tcg, zeros(2))

Examples

About

Discrete choice modeling and estimation in Julia.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Julia 100.0%