Create a Matchcase query expression node.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
Visual Basic (Declaration) |
---|
Public�Shared�Function�MatchCase(�_� ���ByVal�querylets�As�NetricsQuery(), �_� ���ByVal�core_strength�As�Double, �_� ���ByVal�thresholds�As�Double(), �_� ���ByVal�weights�As�Double(), �_� ���ByVal�penalty_weights�As�Double()�_� )�As�NetricsQuery |
C# |
---|
public�static�NetricsQuery�MatchCase( ���NetricsQuery[]�querylets, ���double�core_strength, ���double[]�thresholds, ���double[]�weights, ���double[]�penalty_weights ) |
C++ |
---|
public: �static�NetricsQuery�MatchCase( ���array<NetricsQuery>^�querylets, ���double�core_strength, ���array<double>^�thresholds, ���array<double>^�weights, ���array<double>^�penalty_weights ) |
J# |
---|
public�static�NetricsQuery�MatchCase( ���NetricsQuery[]�querylets, ���double�core_strength, ���double[]�thresholds, ���double[]�weights, ���double[]�penalty_weights ) |
JScript |
---|
public�static�
function�MatchCase( ���querylets�:�NetricsQuery[], ���core_strength�:�double, ���thresholds�:�double[], ���weights�:�double[], ���penalty_weights�:�double[] )�:�NetricsQuery |
Parameters
- querylets
- this is an array of all querylets, both core and secondary.
- core_strength
- this is the core match strength factor as described above. It must be >= 0.0 and <= 1.0
- thresholds
- this provides the threshold values for all querylets. It also defines which querylets are considered core querylets and which are secondary. Threshold values that are less than 0.0 (negative) are considered core querylets. The threshold is the absolute value. Threshold values greater than or equal to 0.0 are considered secondary querylets. These values must be >= -1.0 and <= 1.0.
- weights
- For values corresponding to the core querylets (i.e. whose threshold value is less than 0.0) this is a querylet weighting factor similar to the weighting factor for the And score combiner. For values corresponding to secondary querylets this is the reward factor. These values must be >= 0.0 and <= 1.0.
- penalty_weights
- This is the penalty weight factor for the secondary querylets. Values corresponding to core querylets are ignored. If this value is null the penalty weights default to the reward weights. These values must be >= 0.0 and <= 1.0 for secondary querylets. Other values are ignored and may be any value.
Remarks
This creates a Matchcase score combiner. This combiner is intended for use in queries that match records. It is not intended for "search" queries that a looking for the closest matches to a search term.
When matching records it is often the case that a record is deemed to match if some core set of fields match "well enough". For example when matching person records it may be considered a match if there is a strong match on the name and SSN. The other fields may tend to support or refute the match, but they are not strictly needed to determine the match. There may be a number of these core sets of fields. In the case of person match in addition to name and SSN a match on name, DOB and address may also suffice to establish these records represent the same person. This match case score combiner represents one match case, i.e. one set of core fields. A complete match query typically consists of a number of these match case queries OR'ed together to produce the full record matching query.
A match case then consists of a set of core querylets and a set of secondary querylets. The core querylets hava a core strength. This defines the maximum score of a perfect match on just the core querylets with no other supporting or refuting data from the secondary querylets. The core querylets also have a threshold value. If one or more of the core querylets are below their threshold value it is not considered to have matched "well enough", and thus is not considered to be an instance of this match case. The score returned by the MatchCase combiner is zero if the match case threshold criteria is not met.
The secondary querylets may either add to the basic core match score, or subtract from it, depending on whether their score is above or below a threshold score. This threshold score is the boundary between a value that is considered to have matched and one that has not.
Secondary querylets have two other parameters associated with them, a reward factor and a penalty factor. This determines by how much a match above or below the threshold value will increase or descrease the core score. If a secondary querylet has a reward factor of 1.0, and a perfect match, it would push the core score to 1.0. Similarly if a secondary querylet has a penalty factor of 1.0 and is a perfect non-match, the core score would be pulled down to 0.0. Generally the reward and penalty factors are much less than 1.0. They should be adjusting the score up or down by a small factor, and not pushing it to one extreme or the other. Note that rewards and penalties are accumulated across all secondary querylets. Thus if the sum of rewards or penalty factors is greater than one, the sum of all rewards or penalties could push the score outside of the allowed range of 0.0 to 1.0. If this should happen the score is truncated to the allowed range.