def feature_count(dataset): ''' This method saves the number of features that can be expected in a given observation with respect to 'id_entity'. @dataset, we assume that validation has occurred, and safe to assume the data associated with the first dataset instance is identical to any instance n within the overall collection of dataset(s). @dataset['count_features'], is defined within the 'dataset_to_dict' method. Note: this method needs to execute after 'dataset_to_dict' ''' db_save = Save_Feature({ 'id_entity': dataset['id_entity'], 'count_features': dataset['count_features'] }) # save dataset element, append error(s) db_return = db_save.save_count() if db_return['error']: return {'error': db_return['error']} else: return {'error': None}
def feature_count(dataset): '''@feature_count This method saves the number of features that can be expected in a given observation with respect to 'id_entity'. @dataset, we assume that validation has occurred, and safe to assume the data associated with the first dataset instance is identical to any instance n within the overall collection of dataset(s). @dataset['count_features'], is defined within the 'dataset_to_dict' method. Note: this method needs to execute after 'dataset_to_dict' ''' db_save = Save_Feature({ 'id_entity': dataset['id_entity'], 'count_features': dataset['count_features'] }) # save dataset element, append error(s) db_return = db_save.save_count() if db_return['error']: return {'error': db_return['error']} else: return {'error': None}
def save_svm_info(self): """@save_svm_info This method saves the number of features that can be expected in a given observation with respect to 'id_entity'. @self.dataset[0], we assume that validation has occurred, and safe to assume the data associated with the first dataset instance is identical to any instance n within the overall collection of dataset(s). @self.dataset['count_features'], is defined within the 'dataset_to_dict' method. Note: this method needs to execute after 'dataset_to_dict' """ svm_data = self.dataset[0] db_save = Save_Feature({ 'id_entity': svm_data['id_entity'], 'count_features': svm_data['count_features'] }) # save dataset element, append error(s) db_return = db_save.save_count() if db_return['error']: self.list_error.append(db_return['error'])
def save_feature_count(self): '''@save_feature_count This method saves the number of features that can be expected in a given observation with respect to 'id_entity'. @self.dataset[0], we assume that validation has occurred, and safe to assume the data associated with the first dataset instance is identical to any instance n within the overall collection of dataset(s). @self.dataset['count_features'], is defined within the 'dataset_to_dict' method. Note: this method needs to execute after 'dataset_to_dict' ''' premodel_data = self.dataset[0] db_save = Save_Feature({ 'id_entity': premodel_data['id_entity'], 'count_features': premodel_data['count_features'] }) # save dataset element, append error(s) db_return = db_save.save_count() if db_return['error']: self.list_error.append(db_return['error'])
def save_svm_info(self): svm_data = self.dataset[0] db_save = Save_Feature({'id_entity': svm_data['id_entity'], 'count_features': svm_data['count_features']}) # save dataset element, append error(s) db_return = db_save.save_count() if db_return['error']: self.list_error.append(db_return['error'])