Constructor
Parameters
The schema field containing input categories to be considered in the similarity space. Input contains one or more categories in a list if
StringList
is provided. If String
is provided, then the input must be a single value.A list of all the recognized categories. Categories not included in this list will be treated as ‘other’, unless
uncategorized_as_category
is False.A value used to represent unmatched categories in the encoding process. This allows for a penalizing non-matching categories - in contrast to them contributing 0 to similarity, it is possible to influence the similarity score negatively. Defaults to 0.0.
Determines whether categories not listed in
categories
should be treated as a distinct ‘other’ category. Defaults to True.InvalidInputException
- If a schema object does not have a corresponding node in the similarity space, indicating a configuration or implementation error.
Behavior
Negative_filter allows for filtering out unmatched categories, by setting it to a large negative value, effectively resulting in large negative similarity between non-matching category items. A category input not present in categories will be encoded asother
category. These categories will be similar to each other by default. Set uncategorized_as_category parameter to False in order to suppress this behavior - this way other categories are not similar to each other in any case - not even to the same other
category. To make that specific category value similar to only the same category items, consider adding it to categories
.
Inheritance
Inheritance Chain:CategoricalSimilaritySpace
- →
Space
- →
HasTransformationConfig
- →
HasLength
- →
Generic
- →
HasSpaceFieldSet
- →
ABC
Properties
The space field set containing the category fields.
The space field set for this categorical similarity space.
Configuration for transforming category lists into vectors.
Whether uncategorized items should be treated as a distinct category.