streamsight.settings.Processor

class streamsight.settings.Processor

Bases: ABC

Base class for processing data.

Abstract class for processing data. The process method should be implemented by the subclass to process the data. The programmer can create a subclass of preferred processing of data split.

__init__()

Methods

__init__()

process(past_interaction, future_interaction)

Injects the user ID to indicate ID for prediction.

_abc_impl = <_abc._abc_data object>
abstract process(past_interaction: InteractionMatrix, future_interaction: InteractionMatrix) Tuple[InteractionMatrix, InteractionMatrix]

Injects the user ID to indicate ID for prediction.

User ID to be predicted by the model will be indicated with item ID of “-1” as the corresponding label. The matrix with past interactions will contain the user ID to be predicted which will be derived from the set of user IDs in the future interaction matrix. Timestamp of the masked interactions will be preserved as the item ID are simply masked with “-1”.

Parameters:
Returns:

Tuple of past interaction with injected user ID to predict and ground truth future interactions of the actual interaction

Return type:

Tuple[InteractionMatrix, InteractionMatrix]