def setup_scenario02(self): """ Scenario: Successfully building test projections from start: Given I create BigML PCA resources uploading train "<data>" file to test "<test>" and log projections in "<output>" And I check that the source has been created And I check that the dataset has been created And I check that the model has been created And I check that the projections are ready Then the local projection file is like "<projections_file>" Examples: | data | test | output |projections_file | | ../data/grades.csv | ../data/test_grades.csv | ./scenario1_pca/projections.csv | ./check_files/projections_grades_pca.csv | """ print self.setup_scenario02.__doc__ examples = [[ 'data/grades.csv', 'data/test_grades_no_missings.csv', 'scenario1_pca/projections.csv', 'check_files/projections_grades_pca.csv' ]] for example in examples: print "\nTesting with:\n", example pca_proj.i_create_all_pca_resources(self, example[0], example[1], example[2]) test_pred.i_check_create_source(self) test_pred.i_check_create_dataset(self, suffix=None) pca_proj.i_check_create_pca_model(self) test_pred.i_check_create_projections(self) test_pred.i_check_projections(self, example[3])
def test_scenario06(self): """ Scenario: Successfully building batch test projections from model Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML linear regression resources using model to test "<test>" as a batch projection and log projections in "<output>" And I check that the projections are ready Then the local projection file is like "<projections_file>" Examples: |scenario | kwargs | test | output |projections_file | """ print self.test_scenario06.__doc__ examples = [[ 'scenario1_pca', '{"data": "data/grades.csv", "output": "scenario1_pca/projections.csv", "test": "data/test_grades_no_missings.csv"}', 'data/test_grades_no_missings.csv', 'scenario5_pca/projections.csv', 'check_files/projections_grades_pca.csv' ]] for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it( self, example[0], example[1]) pca_proj.i_create_pca_resources_from_model_remote( self, test=example[2], output=example[3]) batch_pred.i_check_create_batch_projection(self) test_pred.i_check_create_projections(self) test_pred.i_check_projections(self, example[4])
def test_scenario03(self): """ Scenario: Successfully building test projections from source Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML linear regression resources using source to test "<test>" and log projections in "<output>" And I check that the dataset has been created And I check that the model has been created And I check that the projections are ready Then the local projections file is like "<projections_file>" Examples: |scenario | kwargs | test | output |projections_file | | scenario1| {"data": "../data/grades.csv", "output": "./scenario1_lrr/projections.csv", "test": "../data/test_grades.csv"} | ../data/test_grades.csv | ./scenario2/projections.csv | ./check_files/projections_grades.csv | """ print self.test_scenario03.__doc__ examples = [[ 'scenario1_pca', '{"data": "data/grades.csv", "output": "scenario1_pca/projections.csv", "test": "data/test_grades_no_missings.csv"}', 'data/test_grades_no_missings.csv', 'scenario2_pca/projections.csv', 'check_files/projections_grades_pca.csv' ]] for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it( self, example[0], example[1]) pca_proj.i_create_pca_resources_from_source(self, test=example[2], output=example[3]) test_pred.i_check_create_dataset(self, suffix=None) pca_proj.i_check_create_pca_model(self) test_pred.i_check_create_projections(self) test_pred.i_check_projections(self, example[4])
def setup_scenario02(self): """ Scenario: Successfully building test projections from start: Given I create BigML PCA resources uploading train "<data>" file to test "<test>" and log projections in "<output>" And I check that the source has been created And I check that the dataset has been created And I check that the model has been created And I check that the projections are ready Then the local projection file is like "<projections_file>" Examples: | data | test | output |projections_file | | ../data/grades.csv | ../data/test_grades.csv | ./scenario1_pca/projections.csv | ./check_files/projections_grades_pca.csv | """ print self.setup_scenario02.__doc__ examples = [ ['data/grades.csv', 'data/test_grades_no_missings.csv', 'scenario1_pca/projections.csv', 'check_files/projections_grades_pca.csv']] for example in examples: print "\nTesting with:\n", example pca_proj.i_create_all_pca_resources(self, example[0], example[1], example[2]) test_pred.i_check_create_source(self) test_pred.i_check_create_dataset(self, suffix=None) pca_proj.i_check_create_pca_model(self) test_pred.i_check_create_projections(self) test_pred.i_check_projections(self, example[3])
def test_scenario03(self): """ Scenario: Successfully building test projections from source Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML linear regression resources using source to test "<test>" and log projections in "<output>" And I check that the dataset has been created And I check that the model has been created And I check that the projections are ready Then the local projections file is like "<projections_file>" Examples: |scenario | kwargs | test | output |projections_file | | scenario1| {"data": "../data/grades.csv", "output": "./scenario1_lrr/projections.csv", "test": "../data/test_grades.csv"} | ../data/test_grades.csv | ./scenario2/projections.csv | ./check_files/projections_grades.csv | """ print self.test_scenario03.__doc__ examples = [ ['scenario1_pca', '{"data": "data/grades.csv", "output": "scenario1_pca/projections.csv", "test": "data/test_grades_no_missings.csv"}', 'data/test_grades_no_missings.csv', 'scenario2_pca/projections.csv', 'check_files/projections_grades_pca.csv']] for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it(self, example[0], example[1]) pca_proj.i_create_pca_resources_from_source(self, test=example[2], output=example[3]) test_pred.i_check_create_dataset(self, suffix=None) pca_proj.i_check_create_pca_model(self) test_pred.i_check_create_projections(self) test_pred.i_check_projections(self, example[4])
def test_scenario06(self): """ Scenario: Successfully building batch test projections from model Given I have previously executed "<scenario>" or reproduce it with arguments <kwargs> And I create BigML linear regression resources using model to test "<test>" as a batch projection and log projections in "<output>" And I check that the projections are ready Then the local projection file is like "<projections_file>" Examples: |scenario | kwargs | test | output |projections_file | """ print self.test_scenario06.__doc__ examples = [ ['scenario1_pca', '{"data": "data/grades.csv", "output": "scenario1_pca/projections.csv", "test": "data/test_grades_no_missings.csv"}', 'data/test_grades_no_missings.csv', 'scenario5_pca/projections.csv', 'check_files/projections_grades_pca.csv']] for example in examples: print "\nTesting with:\n", example test_pred.i_have_previous_scenario_or_reproduce_it(self, example[0], example[1]) pca_proj.i_create_pca_resources_from_model_remote(self, test=example[2], output=example[3]) batch_pred.i_check_create_batch_projection(self) test_pred.i_check_create_projections(self) test_pred.i_check_projections(self, example[4])