Spaces:
Sleeping
Sleeping
from dataclasses import dataclass | |
from typing import Callable | |
import numpy as np | |
class Clusterer: | |
cluster_func: Callable | |
def eval( | |
self, | |
pred_labels: np.array, | |
true_labels: np.array, | |
) -> None: | |
... | |
def from_dict(cls, dct: dict): | |
return cls(**dct) | |