重量User Specification
Synopsis
This operator assigns user-defined weights to the specified attributes. The attributes can be selected using regular expressions.
Description
The Weight by User Specification operator assigns user-defined weights to the selected attributes of the given ExampleSet. The higher the weight of an attribute, the more relevant it is considered. Unlike many other weighting operators, this operator can be applied on ExampleSets with both nominal or numerical label.
Thename regex to weightsparameter is used for selecting the attributes and assigning weights to them. The attributes are selected through regular expressions. Multiple regular expressions can be used for different attribute selections. Please note that the weights defined in the regular expression list are set in the order as they are defined in the list, i.e. weights can overwrite weights set before.
If thedistribute weightsparameter is set to true, then the weight specified in thename regex to weightsparameter is divided equally into all the attributes that match the regular expression. Thedefault weightparameter specifies weight of all those attributes that do not match any regular expression. Please Study the attached Example Process for more information.
Input
example set
This input port expects an ExampleSet. It is output of the Retrieve operator in the attached Example Process.
Output
weights
This port delivers the weights of the attributes with respect to the label attribute. The attributes with higher weight are considered more relevant.
example set
ExampleSet that was given as input is passed without changing to the output through this port. This is usually used to reuse the same ExampleSet in further operators or to view the ExampleSet in the Results Workspace.
Parameters
Normalize weights
This parameter indicates if the calculated weights should be normalized or not. If set to true, all weights are normalized in range from 0 to 1.
Sort weights
This parameter indicates if the attributes should be sorted according to their weights in the results. If this parameter is set to true, the order of the sorting is specified using the排序方向parameter.
Sort direction
This parameter is only available when thesort weightsparameter is set to true. This parameter specifies the sorting order of the attributes according to their weights.
Name regex to weights
This parameter is used for selecting the attributes and assigning weights to them. The attributes are selected through regular expressions. Multiple regular expressions can be used for different attribute selections. Please note that the weights defined in the regular expression list are set in the order as they are defined in the list, i.e. weights can overwrite weights set before.
Distribute weights
If this parameter is set to true, the weight specified in thename regex to weightsparameter is split and distributed equally among the attributes matching the corresponding regular expressions.
Default weight
This parameter specifies the weight of all those attributes that do not match any regular expression.