File size: 336 Bytes
932b3cb
 
3cab2dd
932b3cb
 
 
 
 
 
 
3cab2dd
 
 
 
 
 
932b3cb
 
3cab2dd
932b3cb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from dataclasses import dataclass
from typing import Callable

import numpy as np


@dataclass
class Clusterer:
    cluster_func: Callable

    def eval(
        self,
        pred_labels: np.array,
        true_labels: np.array,
    ) -> None:
        ...

    @classmethod
    def from_dict(cls, dct: dict):
        return cls(**dct)