2935cdd098302ff379dd40c23acf088b62934aad,smart_importer/predictor.py,SmartImporterDecorator,train_pipeline,#SmartImporterDecorator#,81
Before Change
if not self.training_data:
raise ValueError("Cannot train the machine learning model "
"because the training data is empty.")
elif len(self.training_data) < 2:
raise ValueError(
"Cannot train the machine learning model "
"because the training data consists of less than two elements."
)
After Change
def train_pipeline(self):
Train the machine learning pipeline.
if not self.training_data:
logger.error("Cannot train the machine learning model "
"because the training data is empty.")
return
self.pipeline.fit(self.training_data, self.targets)
logger.debug("Trained the machine learning model.")
def process_entries(self, imported_entries) -> List[Union[ALL_DIRECTIVES]]:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: beancount/smart_importer
Commit Name: 2935cdd098302ff379dd40c23acf088b62934aad
Time: 2018-09-15
Author: mail@jakobschnitzer.de
File Name: smart_importer/predictor.py
Class Name: SmartImporterDecorator
Method Name: train_pipeline
Project Name: MycroftAI/mycroft-precise
Commit Name: 5ce56ff7e7f0c085bdff9745471c50aa4d0e1faa
Time: 2017-11-03
Author: matthew3311999@gmail.com
File Name: precise/stream.py
Class Name:
Method Name: main
Project Name: deepdrive/deepdrive
Commit Name: 7c29fb2edface03698e2ef6547739f95854a018a
Time: 2018-11-19
Author: cquiter@gmail.com
File Name: agents/dagger/train/data_utils.py
Class Name:
Method Name: get_file_names