/ffx

Fast Function Extraction

Primary LanguagePythonOtherNOASSERTION

#FFX: Fast Function Extraction

FFX is a technique for symbolic regression. It is:

  • Fast - runtime 5-60 seconds, depending on problem size (1GHz cpu)
  • Scalable - 1000 input variables, no problem!
  • Deterministic - no need to "hope and pray".

Installation

To install from PyPI, simply run:

pip install ffx

Usage

FFX can either be run in stand-alone mode, or within your existing Python code. It installs both a command-line utility runffx and the Python module ffx.

Standalone

runffx test train_X.csv train_y.csv test_X.csv test_y.csv

Use runffx help for more information on using the command-line utility.

Python Module

The following snippet is a simple example of how to use FFX. Note that all arguments are expected to be of type numpy.ndarray or pandas.DataFrame.

import numpy as np
import ffx

train_X = np.array( [ (1.5,2,3), (4,5,6) ] ).T
train_y = np.array( [1,2,3])

test_X = np.array( [ (5.241,1.23, 3.125), (1.1,0.124,0.391) ] ).T
test_y = np.array( [3.03,0.9113,1.823])

models = ffx.run(train_X, train_y, test_X, test_y, ["predictor_a", "predictor_b"])
for model in models:
    yhat = model.simulate(test_X)
    print model

Presently, the FFX Python module only exposes a single API method, ffx.run().

Dependencies

  • python (tested on 2.5, 2.6, and 2.7)
  • numpy (1.6.0+)
  • scipy (0.9.0+)
  • scikit-learn (0.9+)
  • pandas (optional, enables support for labeled pandas.DataFrame datasets)

Technical details

References

  1. McConaghy, FFX: Fast, Scalable, Deterministic Symbolic Regression Technology, Genetic Programming Theory and Practice IX, Edited by R. Riolo, E. Vladislavleva, and J. Moore, Springer, 2011.
  2. McConaghy, High-Dimensional Statistical Modeling and Analysis of Custom Integrated Circuits, Proc. Custom Integrated Circuits Conference, Sept. 2011