public class DyadDatasetPoolProvider extends java.lang.Object implements IDyadRankingPoolProvider
DyadRankingDataset. Each
SparseDyadRankingInstance or DyadRankingInstance of the
DyadRankingDataset must represent a full ranking. Only queries of
rankings over the same instance features can be answered.| Constructor and Description |
|---|
DyadDatasetPoolProvider(DyadRankingDataset dataset) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<Dyad> |
getDyadsByAlternative(ai.libs.jaicore.math.linearalgebra.Vector alternativeFeatures)
Returns the set of all
Dyads with the given Vector of
alternative features. |
java.util.Set<Dyad> |
getDyadsByInstance(ai.libs.jaicore.math.linearalgebra.Vector instanceFeatures)
Returns the set of all
Dyads with the given Vector of
instance features. |
java.util.Collection<ai.libs.jaicore.math.linearalgebra.Vector> |
getInstanceFeatures()
Returns a
Collection that contains all instance features contained in
the pool. |
int |
getNumberQueries()
Returns the number of queries the pool provider has answered so far.
|
java.util.Collection<IDyadRankingInstance> |
getPool()
Returns the pool of unlabeled instances.
|
int |
getPoolSize() |
DyadRankingDataset |
getQueriedRankings() |
IDyadRankingInstance |
query(IDyadRankingInstance queryInstance)
Labels the given instance.
|
void |
setRemoveDyadsWhenQueried(boolean flag) |
public DyadDatasetPoolProvider(DyadRankingDataset dataset)
public java.util.Collection<IDyadRankingInstance> getPool()
IActiveLearningPoolProvidergetPool in interface IActiveLearningPoolProvider<IDyadRankingInstance>public IDyadRankingInstance query(IDyadRankingInstance queryInstance)
IActiveLearningPoolProviderquery in interface IActiveLearningPoolProvider<IDyadRankingInstance>queryInstance - IInstance to be labeled.IInstance.public java.util.Set<Dyad> getDyadsByInstance(ai.libs.jaicore.math.linearalgebra.Vector instanceFeatures)
IDyadRankingPoolProviderDyads with the given Vector of
instance features.getDyadsByInstance in interface IDyadRankingPoolProviderinstanceFeatures - Vector of instance features.Set of dyads with the given Vector of instance
features.public java.util.Set<Dyad> getDyadsByAlternative(ai.libs.jaicore.math.linearalgebra.Vector alternativeFeatures)
IDyadRankingPoolProviderDyads with the given Vector of
alternative features.getDyadsByAlternative in interface IDyadRankingPoolProvideralternativeFeatures - Vector of alternative features.Set of dyads with the given Vector of alternative
features.public java.util.Collection<ai.libs.jaicore.math.linearalgebra.Vector> getInstanceFeatures()
IDyadRankingPoolProviderCollection that contains all instance features contained in
the pool.getInstanceFeatures in interface IDyadRankingPoolProviderCollection that contains all instance features contained in
the pool.public void setRemoveDyadsWhenQueried(boolean flag)
setRemoveDyadsWhenQueried in interface IDyadRankingPoolProviderpublic int getPoolSize()
getPoolSize in interface IDyadRankingPoolProviderpublic int getNumberQueries()
public DyadRankingDataset getQueriedRankings()
getQueriedRankings in interface IDyadRankingPoolProvider