com.sun.labs.minion.classification
Class BigQuery

java.lang.Object
  extended by com.sun.labs.minion.classification.BigQuery

public class BigQuery
extends java.lang.Object

A helper class for running a big query during classification operations. The query is run against a single partition.


Field Summary
protected  PostingsIterator[] featureIterators
          The postings iterators that can be used to fetch weights for each of the features making up this big query.
protected  FeatureCluster[] features
           
protected  int fromFieldID
          The field we'll be pulling data from, if there is one.
protected static java.lang.String logTag
           
protected  DiskPartition part
          The partition upon which we're operating.
protected  float[] scores
          Combined scores for our big query.
protected  java.util.Set<java.lang.Integer> seenIDs
          A set containing the document IDs of the training examples that we've already seen.
protected  ScoredGroup sg
          A scored array group that we can use to store final query results
protected  TermCache tc
           
protected  java.util.Set<java.lang.Integer> trainingIDs
          A set containing the document IDs of the training examples for this query.
protected  WeightingComponents wc
          A set of weighting components to use when calculating term weights.
protected  WeightingFunction wf
          A weighting function to use to calculate term weights.
 
Constructor Summary
BigQuery(BigQuery bq)
          A copy constructor.
BigQuery(TermCache tc, ArrayGroup tg, java.lang.String fromField, WeightingFunction wf, WeightingComponents wc)
          Creates a big query helper for a given partition.
 
Method Summary
 void addFeatureCluster(FeatureCluster cluster)
          Adds a cluster to the helper.
 void addFeatureClusters(FeatureClusterSet features)
          Adds a number of features clusters to the helper.
 ScoredGroup getGroup()
          Gets the scored group associated with this partition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

part

protected DiskPartition part
The partition upon which we're operating.


fromFieldID

protected int fromFieldID
The field we'll be pulling data from, if there is one.


tc

protected TermCache tc

wf

protected WeightingFunction wf
A weighting function to use to calculate term weights.


wc

protected WeightingComponents wc
A set of weighting components to use when calculating term weights.


scores

protected float[] scores
Combined scores for our big query.


trainingIDs

protected java.util.Set<java.lang.Integer> trainingIDs
A set containing the document IDs of the training examples for this query.


seenIDs

protected java.util.Set<java.lang.Integer> seenIDs
A set containing the document IDs of the training examples that we've already seen.


sg

protected ScoredGroup sg
A scored array group that we can use to store final query results


logTag

protected static java.lang.String logTag

featureIterators

protected PostingsIterator[] featureIterators
The postings iterators that can be used to fetch weights for each of the features making up this big query.


features

protected FeatureCluster[] features
Constructor Detail

BigQuery

public BigQuery(TermCache tc,
                ArrayGroup tg,
                java.lang.String fromField,
                WeightingFunction wf,
                WeightingComponents wc)
Creates a big query helper for a given partition.

Parameters:
tc - a cache of postings for terms
tg - the array group containing training data for this partition
fromField - the name of the field terms are coming from
wf - a weighting function to use for weighting terms
wc - a set of weighting components

BigQuery

public BigQuery(BigQuery bq)
A copy constructor.

Parameters:
bq - the query that we want to copy.
Method Detail

addFeatureClusters

public void addFeatureClusters(FeatureClusterSet features)
Adds a number of features clusters to the helper.

Parameters:
features - the set of features to add

addFeatureCluster

public void addFeatureCluster(FeatureCluster cluster)
Adds a cluster to the helper.

Parameters:
cluster - the cluster to be added

getGroup

public ScoredGroup getGroup()
Gets the scored group associated with this partition

Returns:
the group associated with this partition.