コード例 #1
0
 def save_results_as_csv(self):
     FileOperations.save_file_with_fallback(
         save_method_or_function=self._write_results_to_csv_file,
         filename=FileOperations.apply_extension_to_filename(
             original_filename=self.save_file_name, file_extension='.csv'),
         fallback_filename=FileOperations.apply_extension_to_filename(
             original_filename=DefaultFilenames.SAVE_FALLBACK,
             file_extension='.csv'))
コード例 #2
0
    def save(self, filename=DefaultFilenames.MODEL_FILENAME):
        filename_with_extension = FileOperations.apply_extension_to_filename(
            original_filename=filename,
            file_extension=self.file_extension
        )

        FileOperations.save_file_with_fallback(
            save_method_or_function=self._dump_model_to_file_with_pickle,
            filename=filename_with_extension,
            fallback_filename=FileOperations.apply_extension_to_filename(
                original_filename=DefaultFilenames.MODEL_FALLBACK,
                file_extension=self.file_extension
            )
        )
コード例 #3
0
    def save_results_boxplot(self, results_data_category, filename):
        PlotOperations.initialize_figure()
        self._add_default_boxplot_graph_settings()
        results_data = self._determine_results_data(results_data_category)
        labels = self._determine_plot_labels(results_data_category)
        filename_with_extension = FileOperations.apply_extension_to_filename(
            original_filename=filename, file_extension='.png')

        self._queue_boxplots(results_data, labels)
        FileOperations.save_file_with_fallback(
            save_method_or_function=PlotOperations.save_plots,
            filename=filename_with_extension,
            fallback_filename=FileOperations.apply_extension_to_filename(
                original_filename=DefaultFilenames.PLOT_FALLBACK,
                file_extension='.png'))