def test_scenario1(self): """ Scenario: Successfully comparing predictions for deepnets: Given I create a data source uploading a "<data>" file And I wait until the source is ready less than <time_1> secs And I create a dataset And I wait until the dataset is ready less than <time_2> secs And I create a deepnet with objective "<objective>" and "<params>" And I wait until the deepnet is ready less than <time_3> secs And I create a local deepnet When I create a prediction for "<data_input>" Then the prediction for "<objective>" is "<prediction>" And I create a local prediction for "<data_input>" Then the local prediction is "<prediction>" Examples: | data | time_1 | time_2 | time_3 | data_input | objective | prediction | params, """ examples = [[ 'data/iris.csv', '30', '50', '30000', '{"petal width": 4}', '000004', 'Iris-virginica', '{}' ], [ 'data/iris.csv', '30', '50', '30000', '{"sepal length": 4.1, "sepal width": 2.4}', '000004', 'Iris-setosa', '{}' ], [ 'data/iris_missing2.csv', '30', '50', '30000', '{}', '000004', 'Iris-setosa', '{}' ], [ 'data/grades.csv', '30', '50', '30000', '{}', '000005', 42.15473, '{}' ], [ 'data/spam.csv', '30', '50', '30000', '{}', '000000', 'ham', '{}' ]] show_doc(self.test_scenario1, examples) for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file(self, example[0]) source_create.the_source_is_finished(self, example[1]) dataset_create.i_create_a_dataset(self) dataset_create.the_dataset_is_finished_in_less_than( self, example[2]) model_create.i_create_a_deepnet_with_objective_and_params( self, example[5], example[7]) model_create.the_deepnet_is_finished_in_less_than(self, example[3]) prediction_compare.i_create_a_local_deepnet(self) prediction_create.i_create_a_deepnet_prediction(self, example[4]) prediction_create.the_prediction_is(self, example[5], example[6]) prediction_compare.i_create_a_local_deepnet_prediction( self, example[4]) prediction_compare.the_local_prediction_is(self, example[6])
def test_scenario6(self): """ Scenario: Successfully comparing predictions for deepnets with operating kind: Given I create a data source uploading a "<data>" file And I wait until the source is ready less than <time_1> secs And I create a dataset And I wait until the dataset is ready less than <time_2> secs And I create a deepnet with objective "<objective>" and "<params>" And I wait until the deepnet is ready less than <time_3> secs And I create a local deepnet When I create a prediction with operating kind "<operating_kind>" for "<data_input>" Then the prediction for "<objective>" is "<prediction>" And I create a local prediction with operating point "<operating_kind>" for "<data_input>" Then the local prediction is "<prediction>" Examples: | data | time_1 | time_2 | time_3 | data_input | objective | prediction | params | operating_point, """ examples = [[ 'data/iris.csv', '10', '50', '30000', '{"petal length": 2.46}', '000004', 'Iris-setosa', '{}', "probability" ], [ 'data/iris.csv', '10', '50', '30000', '{"petal length": 2}', '000004', 'Iris-setosa', '{}', "probability" ]] show_doc(self.test_scenario6, examples) for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file(self, example[0]) source_create.the_source_is_finished(self, example[1]) dataset_create.i_create_a_dataset(self) dataset_create.the_dataset_is_finished_in_less_than( self, example[2]) model_create.i_create_a_deepnet_with_objective_and_params( self, example[5], example[7]) model_create.the_deepnet_is_finished_in_less_than(self, example[3]) prediction_compare.i_create_a_local_deepnet(self) prediction_create.i_create_a_deepnet_prediction_op_kind( self, example[4], example[8]) prediction_create.the_prediction_is(self, example[5], example[6]) prediction_compare.i_create_a_local_deepnet_prediction_op_kind( self, example[4], example[8]) prediction_compare.the_local_prediction_is(self, example[6])
def test_scenario1(self): """ Scenario: Successfully comparing predictions for deepnets: Given I create a data source uploading a "<data>" file And I wait until the source is ready less than <time_1> secs And I create a dataset And I wait until the dataset is ready less than <time_2> secs And I create a deepnet with objective "<objective>" and "<params>" And I wait until the deepnet is ready less than <time_3> secs And I create a local deepnet When I create a prediction for "<data_input>" Then the prediction for "<objective>" is "<prediction>" And I create a local prediction for "<data_input>" Then the local prediction is "<prediction>" Examples: | data | time_1 | time_2 | time_3 | data_input | objective | prediction | params, """ examples = [ ['data/iris.csv', '30', '50', '30000', '{"petal width": 4}', '000004', 'Iris-virginica', '{}'], ['data/iris.csv', '30', '50', '30000', '{"sepal length": 4.1, "sepal width": 2.4}', '000004', 'Iris-setosa', '{}'], ['data/iris_missing2.csv', '30', '50', '30000', '{}', '000004', 'Iris-setosa', '{}'], ['data/grades.csv', '30', '50', '30000', '{}', '000005', 42.15473, '{}'], ['data/spam.csv', '30', '50', '30000', '{}', '000000', 'ham', '{}']] show_doc(self.test_scenario1, examples) for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file(self, example[0]) source_create.the_source_is_finished(self, example[1]) dataset_create.i_create_a_dataset(self) dataset_create.the_dataset_is_finished_in_less_than(self, example[2]) model_create.i_create_a_deepnet_with_objective_and_params(self, example[5], example[7]) model_create.the_deepnet_is_finished_in_less_than(self, example[3]) prediction_compare.i_create_a_local_deepnet(self) prediction_create.i_create_a_deepnet_prediction(self, example[4]) prediction_create.the_prediction_is(self, example[5], example[6]) prediction_compare.i_create_a_local_deepnet_prediction(self, example[4]) prediction_compare.the_local_prediction_is(self, example[6])
def test_scenario6(self): """ Scenario: Successfully comparing predictions for deepnets with operating kind: Given I create a data source uploading a "<data>" file And I wait until the source is ready less than <time_1> secs And I create a dataset And I wait until the dataset is ready less than <time_2> secs And I create a deepnet with objective "<objective>" and "<params>" And I wait until the deepnet is ready less than <time_3> secs And I create a local deepnet When I create a prediction with operating kind "<operating_kind>" for "<data_input>" Then the prediction for "<objective>" is "<prediction>" And I create a local prediction with operating point "<operating_kind>" for "<data_input>" Then the local prediction is "<prediction>" Examples: | data | time_1 | time_2 | time_3 | data_input | objective | prediction | params | operating_point, """ examples = [ ['data/iris.csv', '10', '50', '30000', '{"petal length": 2.46}', '000004', 'Iris-setosa', '{}', "probability"], ['data/iris.csv', '10', '50', '30000', '{"petal length": 2}', '000004', 'Iris-setosa', '{}', "probability"]] show_doc(self.test_scenario6, examples) for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file(self, example[0]) source_create.the_source_is_finished(self, example[1]) dataset_create.i_create_a_dataset(self) dataset_create.the_dataset_is_finished_in_less_than(self, example[2]) model_create.i_create_a_deepnet_with_objective_and_params(self, example[5], example[7]) model_create.the_deepnet_is_finished_in_less_than(self, example[3]) prediction_compare.i_create_a_local_deepnet(self) prediction_create.i_create_a_deepnet_prediction_op_kind(self, example[4], example[8]) prediction_create.the_prediction_is(self, example[5], example[6]) prediction_compare.i_create_a_local_deepnet_prediction_op_kind(self, example[4], example[8]) prediction_compare.the_local_prediction_is(self, example[6])