Example #1
0
def deserialize_dbscan_clustering(model_dict):
    model = DBSCAN(**model_dict["params"])
    model.components_ = np.array(model_dict["components_"])
    model.labels_ = np.array(model_dict["labels_"])
    model.core_sample_indices_ = model_dict["core_sample_indices_"]
    model.n_features_in_ = model_dict["n_features_in_"]
    model._estimator_type = model_dict["_estimator_type"]

    return model
def deserialize_dbscan_clustering(model_dict):
    model = DBSCAN(**model_dict['params'])
    #model.eps = model_dict['params']['eps']

    model.components_ = np.array(model_dict['components_'])
    model.labels_ = np.array(model_dict['labels_'])
    model.core_sample_indices_ = model_dict['core_sample_indices_']
    model.n_features_in_ = model_dict['n_features_in_']
    model._estimator_type = model_dict['_estimator_type']

    return model