Package org.terrier.learning
Interface FeaturedResultSet
-
- All Superinterfaces:
ResultSet,java.io.Serializable
- All Known Implementing Classes:
FeaturedQueryResultSet
public interface FeaturedResultSet extends ResultSet
A result set to accommodate multiple feature scores. Features scores are managed as "dense" arrays, ordered by the current ordering of docids in the ResultSet (i.e. as returned by getDocids()).- Since:
- 4.0
- Author:
- Rodrygo Santos
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDefaultLabel()java.lang.String[]getFeatureNames()Gets the names of the features that have been added to this ResultSetdouble[]getFeatureScores(int feature_id)Get the feature scores for a given feature iddouble[]getFeatureScores(java.lang.String name)Get all scores for the enabled docids given a feature namejava.lang.String[]getLabels()intgetNumberOfFeatures()Number of features decorated for this resultsetvoidputFeatureScores(java.lang.String name, double[] scores)Add a feature to this result setvoidsetDefaultLabel(java.lang.String label)voidsetLabels(java.lang.String[] labels)-
Methods inherited from interface org.terrier.matching.ResultSet
addMetaItem, addMetaItems, allMetaItems, getDocids, getExactResultSize, getLock, getMetaItem, getMetaItems, getMetaKeys, getOccurrences, getResultSet, getResultSet, getResultSize, getScores, getStatusCode, hasMetaItems, initialise, initialise, setExactResultSize, setResultSize, setStatusCode, sort, sort
-
-
-
-
Method Detail
-
getNumberOfFeatures
int getNumberOfFeatures()
Number of features decorated for this resultset
-
getFeatureNames
java.lang.String[] getFeatureNames()
Gets the names of the features that have been added to this ResultSet
-
putFeatureScores
void putFeatureScores(java.lang.String name, double[] scores)Add a feature to this result set
-
getFeatureScores
double[] getFeatureScores(java.lang.String name)
Get all scores for the enabled docids given a feature name
-
getFeatureScores
double[] getFeatureScores(int feature_id)
Get the feature scores for a given feature id
-
setLabels
void setLabels(java.lang.String[] labels)
-
getLabels
java.lang.String[] getLabels()
-
setDefaultLabel
void setDefaultLabel(java.lang.String label)
-
getDefaultLabel
java.lang.String getDefaultLabel()
-
-