# How Weights are Used

All of the shapes (including those with 0 weight) are used for training. At run time, however, shapes are treated differently depending on their effective weight as follows:

- Positive effective weight: Results favor those poses for which the shape matches the image features with high accuracy, although the magnitude of the weight has no effect on accuracy. The shape contributes positively to a PatQuick result score in an amount proportional to the weight, to the shape perimeter, and to the degree of match at the result pose. Image features that match the shape are not considered clutter. Such features instead contribute to the coverage score, but the magnitude of the weight is not used when computing coverage.
- Negative effective weight: Results favor those poses for which the shape does not match the image at all. The shape has no effect on the accuracy of the returned pose. The shape contributes negatively to a PatQuick result score in an amount proportional to the weight, to the shape perimeter, and to the degree of match at the result pose. Image features that match the shape do not contribute to the coverage score. Such features are instead considered clutter.
- Zero effective weight: The shape has no effect on the result pose or its accuracy, and contributes nothing to the PatQuick result score, regardless of degree-of-match. Image features that match the shape do not contribute to the coverage score. Such features are instead considered clutter.

Because the magnitude of a weight does not affect the coverage or clutter scores, a PatMax algorithm result score is only affected by the sign of weights (which determines whether matched features contribute to clutter or coverage, as described above). Therefore, if you wish to experiment with weighting schemes in order to optimize performance with respect to the accept threshold, the PatMax algorithm (if used) should be temporarily disabled. The result score returned will then be the PatQuick result score, which is affected by the magnitudes of the weights. When the PatMax algorithm is again enabled, the PatQuick score will continue to be computed internally and compared to the accept threshold, but it will in general no longer be returned as the score of the results (the PatMax algorithm score will be returned instead).