Skip to content

Instantly share code, notes, and snippets.

@natekupp
Created March 15, 2012 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natekupp/2047390 to your computer and use it in GitHub Desktop.
Save natekupp/2047390 to your computer and use it in GitHub Desktop.
FFX Performance Test
def buildmodel():
EPS = 0.001
data = pandas.read_csv('iris.csv')
xtrain = data.ix[:50,0:2]
xtest = data.ix[51:100,0:2]
ytrain = data.ix[:50,2]
ytest = data.ix[51:100,2]
# Use pandas.DataFrame
models = ffx.run(xtrain, ytrain, xtest, ytest)
return models
start = time.time()
models = buildmodel()
print 'total:', time.time()-start
## Main branch:
## >>> total: 3.5075340271
## Cython branch:
## >>> total: 2.82764983177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment