def save(self):
        Tools.create_dir_if_not_exists(self.save_directory)

        joblib.dump(self.umap_fit,
                    os.path.join(self.save_directory, self.umap_save_name))
        joblib.dump(self.dbscan_fit,
                    os.path.join(self.save_directory, self.dbscan_save_name))
    def save(self):
        Tools.create_dir_if_not_exists(self.save_directory)

        joblib.dump(self.pca_fit,
                    os.path.join(self.save_directory, self.pca_save_name))
        joblib.dump(self.kmeans_fit,
                    os.path.join(self.save_directory, self.kmeans_save_name))
        joblib.dump(self.cah_fit,
                    os.path.join(self.save_directory, self.cah_save_name))
Exemple #3
0
    def save(self):
        Tools.create_dir_if_not_exists(self.config['save_directory'])

        joblib.dump(
            self.pca_fit,
            os.path.join(self.config['save_directory'], self.pca_save_name))
        joblib.dump(
            self.kmeans_fit,
            os.path.join(self.config['save_directory'], self.kmeans_save_name))
        joblib.dump(
            self.dbscan_fit,
            os.path.join(self.config['save_directory'], self.dbscan_save_name))
Exemple #4
0
    def __init__(self, config, pictures_id, pictures_np):

        self.config = config
        self.save_directory = os.path.join(
            self.config['save_directory'], '%s_%s_%s' %
            (self.config['model']['type'], self.config['model']['name'],
             self.config['version']))
        self.pictures_id = pictures_id
        self.pictures_np = pictures_np
        self.final_labels = None
        self.colors = None

        Tools.create_dir_if_not_exists(self.save_directory)