Skip to content

Instantly share code, notes, and snippets.

@Vaguery
Created December 2, 2010 20:51
Show Gist options
  • Select an option

  • Save Vaguery/726035 to your computer and use it in GitHub Desktop.

Select an option

Save Vaguery/726035 to your computer and use it in GitHub Desktop.
Feature: Symbolic regression scoring against x+6 dataset
In order to evaluate how well a Pile script models a given dataset
As a symbolic regression modeler
I want the score of a given script against a dataset to be the RSS value
Scenario: score for a perfect program should be 0.0
Given the Pile script "x 6.0 +"
And the training data is "x_plus_6.csv"
When I score the script
Then the score should be 0.0
Scenario: score is summed squared errors
Given the Pile script "x 8.0 +"
And the training data is "x_plus_6.csv"
When I score the script
Then the score should be 36.0
Scenario: missing return value is important
Given the Pile script "foo bar"
And the training data is "x_plus_6.csv"
When I score the script
Then the score should be close to 10^18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment