def test_scenario04(self): """ Scenario: Successfully building test predictions from dataset Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML resources using dataset to test "<test>" and log predictions in "<output>" And I check that the model has been created And I check that the predictions are ready Then the local prediction file is like "<predictions_file>" Examples: |scenario | kwargs | test | output |predictions_file | | scenario1| {"data": "../data/iris.csv", "output": "./scenario1/predictions.csv", "test": "../data/test_iris.csv"} | ../data/test_iris.csv | ./scenario3/predictions.csv | ./check_files/predictions_iris.csv | """ print self.test_scenario04.__doc__ examples = [[ 'scenario1', '{"data": "data/iris.csv", "output": "scenario1/predictions.csv", "test": "data/test_iris.csv"}', 'data/test_iris.csv', 'scenario3/predictions.csv', 'check_files/predictions_iris.csv' ]] for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it( self, example[0], example[1]) test_pred.i_create_resources_from_dataset(self, None, test=example[2], output=example[3]) test_pred.i_check_create_model(self) test_pred.i_check_create_predictions(self) test_pred.i_check_predictions(self, example[4])
def test_scenario3(self): """ Scenario: Successfully building test predictions from dataset Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML multi-label resources using dataset to test "<test>" and log predictions in "<output>" And I check that the models have been created And I check that the predictions are ready Then the local prediction file is like "<predictions_file>" Examples: |scenario | kwargs | test | output |predictions_file | | scenario_ml_1| {"tag": "my_multilabel_1", "data": "../data/multilabel.csv", "label_separator": ":", "number_of_labels": 7, "training_separator": ",", "output": "./scenario_ml_1/predictions.csv", "test": "../data/test_multilabel.csv"} | ../data/test_multilabel.csv | ./scenario_ml_3/predictions.csv | ./check_files/predictions_ml_comma.csv | """ print self.test_scenario3.__doc__ examples = [[ 'scenario_ml_1', '{"tag": "my_multilabel_1", "data": "data/multilabel.csv", "label_separator": ":", "number_of_labels": 7, "training_separator": ",", "output": "scenario_ml_1/predictions.csv", "test": "data/test_multilabel.csv"}', 'data/test_multilabel.csv', 'scenario_ml_3/predictions.csv', 'check_files/predictions_ml_comma.csv' ]] for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it( self, example[0], example[1]) test_pred.i_create_resources_from_dataset( self, multi_label='multi-label', test=example[2], output=example[3]) test_pred.i_check_create_models(self) test_pred.i_check_create_predictions(self) test_pred.i_check_predictions(self, example[4])
def test_scenario04(self): """ Scenario: Successfully building test predictions from dataset Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML resources using dataset to test "<test>" and log predictions in "<output>" And I check that the model has been created And I check that the predictions are ready Then the local prediction file is like "<predictions_file>" Examples: |scenario | kwargs | test | output |predictions_file | """ examples = [ ['scenario1', '{"data": "data/iris.csv", "output": "scenario1/predictions.csv", "test": "data/test_iris.csv"}', 'data/test_iris.csv', 'scenario3/predictions.csv', 'check_files/predictions_iris.csv']] show_doc(self.test_scenario04, examples) for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it(self, example[0], example[1]) test_pred.i_create_resources_from_dataset(self, None, test=example[2], output=example[3]) test_pred.i_check_create_model(self) test_pred.i_check_create_predictions(self) test_pred.i_check_predictions(self, example[4])
def test_scenario3(self): """ Scenario: Successfully building test predictions from dataset Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML multi-label resources using dataset to test "<test>" and log predictions in "<output>" And I check that the models have been created And I check that the predictions are ready Then the local prediction file is like "<predictions_file>" Examples: |scenario | kwargs | test | output |predictions_file | | scenario_ml_1| {"tag": "my_multilabel_1", "data": "../data/multilabel.csv", "label_separator": ":", "number_of_labels": 7, "training_separator": ",", "output": "./scenario_ml_1/predictions.csv", "test": "../data/test_multilabel.csv"} | ../data/test_multilabel.csv | ./scenario_ml_3/predictions.csv | ./check_files/predictions_ml_comma.csv | """ print self.test_scenario3.__doc__ examples = [ ['scenario_ml_1', '{"tag": "my_multilabel_1", "data": "data/multilabel.csv", "label_separator": ":", "number_of_labels": 7, "training_separator": ",", "output": "scenario_ml_1/predictions.csv", "test": "data/test_multilabel.csv"}', 'data/test_multilabel.csv', 'scenario_ml_3/predictions.csv', 'check_files/predictions_ml_comma.csv']] for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it(self, example[0], example[1]) test_pred.i_create_resources_from_dataset(self, multi_label='multi-label', test=example[2], output=example[3]) test_pred.i_check_create_models(self) test_pred.i_check_create_predictions(self) test_pred.i_check_predictions(self, example[4])