# Pseudocode in LyX Revisited

This post is strictly for users of LyX. In a previous post I offered up a LyX module for typesetting pseudocode. Unfortunately, development of that module bumped up against some fundamental incompatibilities between the algorithmicx package and the way LyX layouts work. The repository for it remains open, but I decided to shift my efforts …

More

# Guessing Pareto Solutions: A Test

In yesterday’s post, I described a simple multiple-criterion decision problem (binary decisions, no constraints), and suggested a possible way to identify a portion of the Pareto frontier using what amounts to guesswork: randomly generate weights; use them to combine the multiple criteria into a single objective function; optimize that (trivial); repeat ad nauseam. I ran …

More

# Guessing Pareto Solutions

One of the challenges of multiple-criteria decision-making (MCDM) is that, in the absence of a definitive weighting or prioritization of criteria, you cannot talk meaningfully about a “best” solution. (Optimization geeks such as myself tend to find that a major turn-off.) Instead, it is common to focus on Pareto efficient solutions. We can say that …

More

# Binary / Integer Conversion in R

I’ve been poking around in R with an unconstrained optimization problem involving binary decision variables. (Trust me, it’s not as trivial as it sounds.) I wanted to explore the entire solution space. Assuming $$n$$ binary decisions, this means looking at the set $$\{0,1\}^n$$, which contains $$2^n$$ 0-1 vectors of dimension $$n$$. For reasons I won’t …

More

# Precision Genomic Medicine and the UK

I just returned from the UK, where I attended a Ditchley Foundation Conference on machine learning and genetic engineering. The attendees included scientists, government officials, venture capitalists, ethicists, and medical professionals. The UK could become the world leader in genomic research by combining population-level genotyping with NHS health records. The application of AI to datasets …

More

# The Future of Genomic Precision Medicine

As I mentioned in this earlier post, I’ll be in the UK next week for a Ditchley Foundation conference on the intersection of machine learning and genetic engineering. I’ll present these slides at the meeting. The slides review the rapidly evolving situation in genomic prediction, focusing on disease risk predicted using inexpensive genotyping. There are now …

More

Yesterday I had a rather rude reminder (actually, two) of something I’ve known for a while. I was running a Java program that uses CPLEX to solve an integer programming model. The symptoms were as follows: shortly after the IP solver run started, I ran out of RAM, the operating system started paging memory to …

More

# Genomic Prediction of Complex Disease Risk (bioRxiv)

Our new paper describes over a dozen genomic predictors for common disease risk, constructed via machine learning on hundreds of thousands of genotypes. The predictors use anywhere from a few tens (e.g., 20 or 50) to thousands of SNPs to compute the risk PGS (Poly-Genic Score) for a specific disease. The figure above (Atrial Fibrillation) …

More

# Of Typewriters and Permutations (V)

Okay, this is the last post on the subject. I promise! If you’re coming into this movie on the last reel, you may need to skim the last few posts to see what it’s about. I’m trying not to repeat myself too much. To summarize where we are at: Hardmath123 posted a solution (generated by …

More

# Of Typewriters and Permutations (IV)

I’m continuing the recent theme of solving a quadratic assignment problem that lays out the 26 letters of the English alphabet on a one-dimensional “keyboard” for an 18th century typewriter. I thought this would be the last post, but something new turned up, so there will likely be one more. In the blog post that …

More

# Of Typewriters and Permutations (III)

This continues the discussion (okay, monologue) from the two previous posts about the problem of laying out a one-dimensional typewriter keyboard. This is not the last post in the series, but I can at least guarantee that the series is converging. In the previous post, I gave a MIP model (named MIP1) that used binary …

More

# Of Typewriters and Permutations (II)

This continues my previous post about the problem of optimally laying out a one-dimensional typewriter keyboard, where “optimally” is taken to mean minimizing the expected amount of lateral movement to type a few selected books. As I noted there, Nate Brixius correctly characterized the problem as a quadratic assignment problem (QAP). I’ll in fact try …

More

# Of Typewriters and Permutations (I)

This is going to be the first of a few posts on the same problem. My efforts are based on a blog post by Nate Brixius (@natebrix) titled “Optimizing 19th Century Typewriters“, which in turn is based on a post titled “Tuning a Typewriter” by “Hardmath123”. As the image in Hardmath123’s post shows, an old …

More

# Stepwise Regression Code Revisited

I’ve added a few more tweaks to the stepwise regression code I published back in 2011. (If you wish, see here for the original post and here for a subsequent update.) The code does stepwise regression using F tests (or, equivalently, p-values of coefficients), which is a bit old fashioned but apparently how it is …

More

# Backpropagation in the Brain?

Ask and ye shall receive :-) In an earlier post I recommended a talk by Ilya Sutskever of OpenAI (part of an MIT AGI lecture series). In the Q&A someone asks about the status of backpropagation (used for training of artificial deep neural nets) in real neural nets, and Ilya answers that it’s currently not …

More

# Pseudocode in LyX

Fair warning: This post is for LyX users only. When I’m writing a paper or presentation in LaTeX (using LyX, of course) and want to include a program chunk or algorithm in pseudocode, I favor the algorithmicx package (and specifically the algpseudocode style). There being no intrinsic support for the package in LyX, I have …

More

# B.S.-ing Precisely

In a recent blog post titled “Excessive Precision“, John D. Cook points out the foolishness of articulating results to an arbitrarily high degree of precision when the inputs are themselves not that precise. To quote him: Excessive precision is not the mark of the expert. Nor is it the mark of the layman. It’s the …

More

# Population-wide Genomic Prediction of Health Risks

The UK is ahead of the US in the application of genomics in clinical practice. Part of this is due to their leadership in projects like the UK Biobank (500k genomes with extensive biomedical phenotyping), and part is due to having a single-payer system that can adopt obviously beneficial (and cost-beneficial) practices after some detailed …

More

# Coordinating Variable Signs

Someone asked me today (or yesterday, depending on whose time zone you go by) how to force a group of variables in an optimization model to take the same sign (all nonpositive or all nonnegative). Assuming that all the variables are bounded, you just need one new binary variable and a few constraints. Assume that …

More

# Choosing “Big M” Values

I seem to bring up “big M” models a lot, so apologies if I end up repeating myself in places here. Not long ago, someone passed along highlights of a “big M” type model to me and asked if he could somehow reformulate to get rid of $$M$$. I did not see any good way …

More

# Adding Items to a Sequence

A question posed on OR-Exchange in 2017 asked the following: Given a tour of nodes, how does one best add two new nodes while respecting the ordering of the original tour. Specifically, the author began with a tour 0 – 1 – 2 – 4 – 6 – 0 (where node 0 is a depot) …

More

# NP Confusion

I just finished reading a somewhat provocative article on the CIO website, titled “10 reasons to ignore computer science degrees” (when hiring programmers). While I’m not in the business of hiring coders (although I recent was hired as a “student programmer” on a grant — the Universe has a sense of humor), I find myself …

More

# ICML notes

It’s never been a better time to work on AI/ML. Vast resources are being deployed in this direction, by corporations and governments alike. In addition to the marvelous practical applications in development, a theoretical understanding of Deep Learning may emerge in the next few years. The notes below are to keep track of some interesting …

More

# Selecting Box Sizes

Someone posted an interesting question about box sizes on Mathematics Stack Exchange. He (well, his girlfriend to be precise) has a set of historical documents that need to be preserved in boxes (apparently using a separate box for each document). He wants to find a solution that minimizes the total surface area of the boxes …

More

More

# Finding a “Core Point”

In a famous (or at least relatively famous) paper [1], Magnanti and Wong suggest a method to accelerate the progress of Benders decomposition for certain mixed-integer programs by sharpening “optimality” cuts. Their approach requires the determination of what they call a core point. I’ll try to follow their notation as much as possible. Let $$Y$$ …

More

# Gork revisited, 2018

It’s been almost 10 years since I made the post Are you Gork? Over the last decade, both scientists and non-scientists have become more confident that we will someday create: A. AGI (= sentient AI, named “Gork” :-)  See Rise of the Machines: Survey of AI Researchers. B. Quantum Computers. See Quantum Computing at a Tipping …

More

# Ordering Index Vector with Java Streams

I bumped up against the following problem while doing some coding in Java 8 (and using streams where possible). Given a vector of objects $$x_1, \dots, x_N$$ that come from some domain having an ordering $$\le$$, find the vector of indices $$i_1, \dots, i_N$$ that sorts the original values into ascending order, i.e., such that …

More

# Quantum Computing near a Tipping Point?

I received an email from a physicist colleague suggesting that we might be near a “tipping point” in quantum computation. I’ve sort of followed quantum computation and quantum information as an outsider for about 20 years now, but haven’t been paying close attention recently because it seems that practical general purpose quantum computers are still …

More

# Recursive Cortical Networks: data efficient computer vision

Will knowledge from neuroscience inform the design of better AIs (neural nets)? These results from startup Vicarious AI suggest that the answer is yes! (See also this company blog post describing the research.) It has often been remarked that evolved biological systems (e.g., a baby) can learn much faster and using much less data than existing artificial neural nets. …

More

# Creating A New MIME Type

I struggled a bit this afternoon creating a new MIME type and associating it with a particular application, so I’m going to archive the solution here for future reference. This was on a Linux Mint system, but I found the key information in a GNOME documentation page, so I suspect it works for Ubuntu and …

More

# Robot Overlords and the Academy

In a previous post Half of all jobs (> \$60k/y) coding related? I wrote In the future there will be two kinds of jobs. Workers will either Tell computers what to do or Be told by computers what to do I’ve been pushing Michigan State University to offer a coding bootcamp experience to all undergraduates who want …

More

# Benders Decomposition with Generic Callbacks

Brace yourself. This post is a bit long-winded (and arguably geekier than usual, which is saying something). Also, it involves CPLEX 12.8, which will not ship until some time next month. I have an updated version of an old example, solving a fixed charge transportation problem using Benders decomposition. The example (using Java, naturally) is …

More

As I noted in yesterday’s post, one of the major changes associated with the new “generic” callback structure in CPLEX is that users now bear the responsibility of making their callbacks thread-safe. As I also noted yesterday, this is pretty new stuff for me. So I’m going to try to share what I know about thread …

More

# CPLEX 12.8: Generic Callbacks

IBM is getting ready to release CPLEX 12.8, and I had the opportunity to attend a presentation about by Xavier Nodet at the 2017 INFORMS annual meeting. Here are links to two presentations by Xavier: CPLEX Optimization Studio 12.8 – What’s New and CPLEX 12.8 – the Generic Callback. As with any new release, there …

More

# What “R” qualitative research methods?

I recently stumbled upon a post on R-bloggers entitled “Qualitative Research in R.” This title got me pretty excited, since I’m generally excited about most things R and since I recently helped teach a qualitative methods course, which has had me thinking about adding more ethnographic and other qualitative elements to my work. I’d also heard of …

More

# AlphaGo Zero: algorithms over data and compute

AlphaGo Zero was trained entirely through self-play — no data from human play was used. The resulting program is the strongest Go player ever by a large margin, and is extremely efficient in its use of compute (running on only 4 TPUs). Previous versions of AlphaGo initially trained on thousands of human amateur and professional games …

More

# Information Theory of Deep Neural Nets: “Information Bottleneck”

This talk discusses, in terms of information theory, how the hidden layers of a deep neural net (thought of as a Markov chain) create a compressed (coarse grained) representation of the input information. To date the success of neural networks has been a mainly empirical phenomenon, lacking a theoretical framework that explains how and why …

More

# Where are participants in American and Canadian teacher hashtags?

My dissertation research is focused on Regional Educational Twitter Hashtags (RETHs), which are teacher-focused hashtags that are associated with particular geographic regions, such as American states or Canadian provinces or territories. This isn’t the first time that I’ve done a project on this phenomenon, and it’s rewarding to come back to RETHs to answer some questions that …

More

# A Gentle Introduction to Neural Networks

“A gentle introduction to the principles behind neural networks, including backpropagation. Rated G for general audiences.” This very well done. If you have a quantitative background you can watch it at 1.5x or 2x speed, I think :-) A bit more on the history of backpropagation and convexity: why is the error function convex, or nearly …

More

# Minimizing a Median

$$\def\xorder#1{x_{\left(#1\right)}} \def\xset{\mathbb{X}} \def\xvec{\mathbf{x}}$$A somewhat odd (to me) question was asked on a forum recently. Assume that you have continuous variables $$x_{1},\dots,x_{N}$$ that are subject to some constraints. For simplicity, I’ll just write $$\xvec=(x_{1},\dots,x_{N})\in\xset$$. I’m going to assume that $$\xset$$ is compact, and so in particular the $$x_{i}$$ are bounded. The questioner wanted to …

More