Logistic Regression
Logistic regression is a well known technique in statistics. Here we show how we can solve the Maximum Likelihood estimation problem in GAMS. We use the data from...
View ArticlePage rank in GAMS
The Google PageRank algorithm is a well known algorithm to calculate web page rankings in a search engine. It is surprisingly simple (for smaller data sets). The basic update equation for the page rank...
View ArticleList 64 bit and 32 bit ODBC drivers
It is sometimes a bit confusing to find out which ODBC drivers are installed (especially when we need to know precisely which drivers are 32bit or 64bit). This script when run from a 64 bit GAMS...
View ArticleLogistic Regression (2): least squares is non-convex
In http://yetanothermathprogrammingconsultant.blogspot.nl/2015/02/logistic-regression.html we implemented a simple maximum likelihood problem which replicates the results from R on a medium size data...
View ArticleGurobi vs R: subset selection
The R package leaps (http://cran.r-project.org/web/packages/leaps/leaps.pdf) provided a convenient way to perform feature selection. The methods are based on work by Alan Miller, described in:Alan...
View ArticleGDX2SQLite –small option
In the tool GDX2SQLITE we export a GAMS GDX file to a SQLite database file.The –small option mimics how GAMS stores data internally. All strings (called UELs or Unique Elements) are stored in a pool...
View Articlegdx2sqlite –fast option
The –fast option in the tool gdx2sqlite is sometimes really helpful. This is especially the case if there are many tables:The column avg table size indicates the average number of rows in a table. It...
View ArticleSparse sum: set cover problem in GAMS
In a set cover problem (http://en.wikipedia.org/wiki/Set_cover_problem) we can organize the sets in two different ways:Use a (sparse) two dimensional set. The cover equation will contain a construct...
View ArticleOligopolistic producer behavior or why airline tickets are not cheaper
Small example from the literature: Note: John Nash just won the Abel prize (http://www.nature.com/news/beautiful-mind-john-nash-adds-abel-prize-to-his-nobel-1.17179). We implement different behaviors...
View ArticleK-means clustering formulated as MIQCP optimization problem
It is instructive to formulate the k-means clustering problem as a Mixed-Integer Quadratically Constrained Problem (MIQCP) in GAMS. It looks trivial at first sight but in fact requires a little bit of...
View ArticleMIP Links
Ed Klotz (Cplex): Identification, Assessment and Correction of Ill-Conditioning and Numerical Instability in Linear and Integer Programs [slides and recording]. Performance VariabilityPerformance...
View ArticleMore oligopolistic behavior
Even very simple models require attention to detail. In [link] we described simple model from the literature. A related model with a coupling constraint that limits pollution emissions is described...
View Articlek-means clustering heuristic in GAMS and the XOR operator
In http://yetanothermathprogrammingconsultant.blogspot.com/2015/03/k-means-clustering-formulated-as-miqcp.html we were quite underwhelmed by the performance of MIQCPs (Mixed Integer Quadratically...
View ArticleReliability of NLP solvers
NLP solvers can fail for a number of reasons. One way to increase the reliability of a production run is to use a back-up solver in case the main solver fails. In GAMS primal and dual information is...
View ArticleInteresting Xpress log
On a very small (convex) MIQCP model (it solves within the limits of the demo version of GAMS/Xpress) we see Xpress struggling mightily. Commercial solvers like Xpress are very robust for LP and MIP...
View ArticleMore fun with quadratic models
This model seems to be solving just fine:MODEL STATISTICS BLOCKS OF EQUATIONS 81 SINGLE EQUATIONS 81BLOCKS OF VARIABLES 127 SINGLE VARIABLES 127 NON ZERO...
View ArticleDiagonalization Algorithm
Followingwe can write a simple diagonalization / relaxation algorithm in GAMS that computes the oligopolistic market equilibrium of the problem described here:...
View Articleoperating on an empty set
See: http://www.johndcook.com/blog/2015/04/14/empty-sum-product/Of course modeling systems should do this correctly.GAMS$onempty; set e(*) //; display e; scalars s,p; s = sum(e,1); p = prod(e,1);...
View ArticleDoes not happen a lot
Often Gurobi and Cplex are in the same ballpark when solving my models. But sometimes you can see something like this:The model is related to scheduling maintenance for power generators.Note: I also...
View Article