Skip to content

Commit

Permalink
coverage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dvolgyes committed Jun 26, 2017
1 parent 202fc75 commit 4f018be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ install:
- pip${PYVERSION} install scikit-learn
- pip${PYVERSION} install git+https://github.com/natekupp/ffx

before_script:
- export PYTHONPATH=$(pwd):$PYTHONPATH;

script:
- coverage${PYVERSION} erase
# - coverage${PYVERSION} erase
- coverage${PYVERSION} run --source ffx tests/x_square_test.py

after_success:
Expand Down
27 changes: 15 additions & 12 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#FFX: Fast Function Extraction

[![Build Status at Travis CI](https://travis-ci.org/dvolgyes/ffx.svg?branch=master)](https://travis-ci.org/dvolgyes/ffx)
[![Coverage Status](https://coveralls.io/repos/github/dvolgyes/ffx/badge.svg?branch=master)](https://coveralls.io/github/dvolgyes/ffx?branch=master)

FFX is a technique for symbolic regression. It is:

- __Fast__ - runtime 5-60 seconds, depending on problem size (1GHz cpu)
Expand All @@ -9,34 +12,34 @@ FFX is a technique for symbolic regression. It is:
## Installation
To install from PyPI, simply run:

pip install ffx
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
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
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])
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])
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
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()`.

Expand Down

0 comments on commit 4f018be

Please sign in to comment.