base
logger = logging.getLogger(__name__) module-attribute ¶
Splitter ¶
Bases: ABC
Abstract base class for dataset splitters.
Implementations should split an :class:InteractionMatrix into two parts according to a splitting condition (for example, by timestamp).
Source code in src/streamsight/settings/splitters/base.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
name property ¶
Return the class name of the splitter.
Returns:
| Type | Description |
|---|---|
str | The splitter class name. |
identifier property ¶
Return a string identifier including the splitter's parameters.
The identifier includes the class name and a comma-separated list of attribute name/value pairs from self.__dict__.
Returns:
| Type | Description |
|---|---|
str | Identifier string like |
split(data) abstractmethod ¶
Split an interaction matrix into two parts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data | InteractionMatrix | The interaction dataset to split. | required |
Returns:
| Type | Description |
|---|---|
tuple[InteractionMatrix, InteractionMatrix] | A pair of |
Raises:
| Type | Description |
|---|---|
NotImplementedError | If the concrete splitter does not implement this method. |
Source code in src/streamsight/settings/splitters/base.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |