Post process
Step 6 of the pipeline.
Post-process modifies the user and global models, typically with the goal of yielding more human-readible scores.
PostProcess
¶
Bases: ABC
__call__
¶
__call__(
user_models: Mapping[int, ScoringModel],
global_model: ScoringModel,
entities: DataFrame,
) -> tuple[Mapping[int, ScoringModel], ScoringModel]
Post-processes user models and global models, typically to yield human-readible scores
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_models
|
Mapping[int, ScoringModel]
|
|
required |
global_model
|
ScoringModel
|
|
required |
entities
|
DataFrame
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
user_models |
post-processed user models
|
|
global_model |
post-processed global model
|
|
NoPostProcess
¶
Bases: PostProcess
__call__
¶
__call__(
user_models: dict[int, ScoringModel],
global_model: ScoringModel,
entities: DataFrame,
) -> tuple[dict[int, ScoringModel], ScoringModel]
Post-processes user models and global models, typically to yield human-readible scores
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_models
|
dict[int, ScoringModel]
|
|
required |
global_model
|
ScoringModel
|
|
required |
entities
|
DataFrame
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
user_models |
post-processed user models
|
|
global_model |
post-processed global model
|
|
Squash
¶
Squash(score_max: float = 100.0)
Bases: PostProcess
__call__
¶
__call__(
user_models: Mapping[int, ScoringModel],
global_model: ScoringModel,
entities: Optional[DataFrame] = None,
) -> tuple[Mapping[int, ScoringModel], ScoringModel]
Post-processes user models and global models, typically to yield human-readable scores
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_models
|
Mapping[int, ScoringModel]
|
|
required |
global_model
|
ScoringModel
|
|
required |
entities
|
Optional[DataFrame]
|
|
None
|
Returns:
Name | Type | Description |
---|---|---|
user_models |
post-processed user models
|
|
global_model |
post-processed global model
|
|