Package com.netrics.likeit
Class ConfidenceQlt
- java.lang.Object
-
- com.netrics.likeit.ConfidenceQlt
-
- All Implemented Interfaces:
java.io.Serializable
public class ConfidenceQlt extends java.lang.Object implements java.io.Serializable
Holds additional data about a query needed for FirstValid score combiner. This class is used in conjunction with the NetricsQuery.FirstValid score combiner. It holds the additional data about each querylet that the FirstValid combiner needs. It also validates the data.
-
-
Field Summary
Fields Modifier and Type Field Description static double
DFLT_CONFIDENCE_CUTOFF
The default confidence cutoff to be used with most Learn Models.
-
Constructor Summary
Constructors Constructor Description ConfidenceQlt(NetricsQuery qlt, double match_score_cutoff)
Create a Confidence Querylet with default values.ConfidenceQlt(NetricsQuery qlt, double match_score_cutoff, double confidence_cutoff, boolean preindex_it)
Create a Confidence Querylet with values explicitly set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfidenceQlt
doNotPreindex()
Mark this querylet as to be ignored by the prefilter index.double
getConfidenceCutoff()
Return the confidence cutoff value for this querylet.double
getMatchCutoff()
Return the match cutoff value for this querylet.NetricsQuery
getQuery()
Return the querylet as a NetricsQuery object.boolean
isPreIndexed()
Return true if this querylet is sent to the prefilter index.ConfidenceQlt
setConfidenceCutoff(double confidence_cutoff)
Set the confidence cut off value.
-
-
-
Field Detail
-
DFLT_CONFIDENCE_CUTOFF
public static final double DFLT_CONFIDENCE_CUTOFF
The default confidence cutoff to be used with most Learn Models.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConfidenceQlt
public ConfidenceQlt(NetricsQuery qlt, double match_score_cutoff)
Create a Confidence Querylet with default values. The default values for the confidence cutoff is DFLT_CONFIDENCE_CUTOFF defined in this class. The default value for the preindex flag is true.- Parameters:
qlt
- the querylet that is wrapped by this object.match_score_cutoff
- the match score cutoff value. This is the score that forms the boundary between what is considered a match and what isn't a match. If the value is given as -1.0 the absolute cutoff value for the search is used. If the search has no absolute cutoff set, either in in the search opts, or via a Learn Model threshold, then the -1.0 cutoff value is treated as an error by the Patterns server.- Throws:
java.lang.IllegalArgumentException
- if qlet is null or match_score_cutoff is less than 0.0 or greater than 1.0.
-
ConfidenceQlt
public ConfidenceQlt(NetricsQuery qlt, double match_score_cutoff, double confidence_cutoff, boolean preindex_it)
Create a Confidence Querylet with values explicitly set.- Parameters:
qlt
- the querylet that is wrapped by this object.match_score_cutoff
- the match score cutoff value. This is the score that forms the boundary between what is considered a match and what isn't a match. If the value is given as -1.0 the absolute cutoff value for the search is used. If the search has no absolute cutoff set, either in in the search opts, or via a Learn Model threshold, then the -1.0 cutoff value is treated as an error by the Patterns server.confidence_cutoff
- use the querylet only if its confidence meets or exceeds this value (if the "invalid only" option is used in FirstValid, use the querylet if the confidence is below this value). A value of -1.0 implies the default confidence cutoff should be used.preindex_it
- if true this querylet is passed to the prefilter index. If false this querylet is ignored by the prefilter: this can both improve response times and accuracy if this querylet contains information that is completely redundant with other querylets.- Throws:
java.lang.IllegalArgumentException
- if a value is out of range or null.
-
-
Method Detail
-
setConfidenceCutoff
public ConfidenceQlt setConfidenceCutoff(double confidence_cutoff)
Set the confidence cut off value. This sets the confidence cut off value for this querylet. The confidence of the querylet match must meet or exceed this value. (If the "invalid only" option is used in FirstValid, the querylet is used if the confidence is below this value). A value of -1.0 implies the default confidence value for Learn Models should be used.- Parameters:
confidence_cutoff
- the confidence cut off value for this querylet.- Returns:
- this object.
- Throws:
java.lang.IllegalArgumentException
- if confidence_cutoff is not -1.0 and is either less than 0.0 or greater than 1.0.
-
doNotPreindex
public ConfidenceQlt doNotPreindex()
Mark this querylet as to be ignored by the prefilter index. If this method is called this querylet will be ignored in the prefilter selection phase of matching. This can both improve response times and accuracy if this querylet contains information that is completely redundant with other querylets.- Returns:
- this object.
-
getQuery
public NetricsQuery getQuery()
Return the querylet as a NetricsQuery object.- Returns:
- this querylet as a NetricsQuery.
-
getConfidenceCutoff
public double getConfidenceCutoff()
Return the confidence cutoff value for this querylet.- Returns:
- the confidence cutoff value for this querylet.
-
getMatchCutoff
public double getMatchCutoff()
Return the match cutoff value for this querylet.- Returns:
- the match cutoff value.
-
isPreIndexed
public boolean isPreIndexed()
Return true if this querylet is sent to the prefilter index.- Returns:
- true if this querylet is used by the prefilter, false if it is ignored by the prefilter.
-
-