Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 1.2 KB

README.md

File metadata and controls

15 lines (9 loc) · 1.2 KB

lmito

Linear Model Interaction Terms Optimizer

Applies particle swarm optimization to the set of interaction terms to include in an ordinary least squares regression (OLS).

For a discussion and example results, please see https://neilalex.com/discovering-variable-interactions-using-particle-swarm-and-apache-spark/.

Running / Getting Started

The algorithm itself is in R/lmito.R. An example driver using data from the Panel Study of Income Dynamics (PSID) is in example.R.

To run the core algorithm in serial mode using 4 particles and 4 iterations, just source example.R.

To run the algorithm on Apache Spark (with a larger / potentially more-robust number of particles and iterations), follow instructions inside example.R to enable the correct parameters. This mode will require Apache Spark 2.0 or higher. Here and here are some instructions for setting up a SparkR on Amazon Web Services.

Please contact [email protected] with questions or comments.