orkgnlp.clustering.predicates.decoder.PredicatesRecommenderDecoder
- class PredicatesRecommenderDecoder(train_df, predicates)[source]
Bases:
ORKGNLPBaseDecoderThe PredicatesRecommenderDecoder decodes the Predicates’ recommendation service model’s output to a user-friendly one.
- Parameters:
train_df (
DataFrame) – The training dataframe of the service.predicates (
Dict[str,List[Dict[str,str]]]) – Dict object representing the mapping from comparisons to predicates.
Methods
Decodes the model's
outputto a user-friendly format.Releases the memory of all available attributes in a pipeline component.
- decode(model_output, **kwargs)[source]
Decodes the model’s
outputto a user-friendly format.- Parameters:
model_output (
Union[Any,Generator[Any,None,None]]) – The model’s output to be decoded.- Return type:
Any- Returns:
The user-friendly output.
- release_memory()
Releases the memory of all available attributes in a pipeline component.