|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.wcohen.ss.CombinedStringDistanceLearner
public abstract class CombinedStringDistanceLearner
Abstract StringDistanceLearner class which combines results of a number of inner distance metrics, learned by a number of inner distance learners.
Nested Class Summary | |
---|---|
protected class |
CombinedStringDistanceLearner.CombinedStringDistance
Abstract class for combining innerDistances's |
protected class |
CombinedStringDistanceLearner.JthDistanceInstanceIterator
Iterate over the j-th field of MultiStringWrapper's in a DistanceInstance of MultiStringWrapper's |
protected class |
CombinedStringDistanceLearner.JthStringWrapperValueIterator
Iterate over the j-th field of MultiStringWrapper |
protected class |
CombinedStringDistanceLearner.MyDistanceInstance
|
protected class |
CombinedStringDistanceLearner.MyMultiDistanceInstance
|
Field Summary | |
---|---|
protected java.lang.String |
delim
|
protected StringDistanceLearner[] |
innerLearners
|
Constructor Summary | |
---|---|
CombinedStringDistanceLearner()
|
|
CombinedStringDistanceLearner(StringDistanceLearner[] innerLearners,
java.lang.String delim)
|
Method Summary | |
---|---|
void |
addExample(DistanceInstance answeredQuery)
Pass new labels to the sublearners. |
protected CombinedStringDistanceLearner.MyMultiDistanceInstance |
asMultiDistanceInstance(DistanceInstance di)
|
protected java.util.List<CombinedStringDistanceLearner.MyMultiDistanceInstance> |
asMultiDistanceInstanceList(DistanceInstanceIterator i)
|
protected MultiStringWrapper |
asMultiStringWrapper(StringWrapper w)
|
protected java.util.List<MultiStringWrapper> |
asMultiStringWrapperList(StringWrapperIterator i)
|
protected abstract void |
comboAddExample(DistanceInstance di)
Pass a labeled example to the score-combination learner. |
protected abstract boolean |
comboHasNextQuery()
Poll the routine that learns to combine inner distance scores to see if it wants to make more queries. |
protected abstract DistanceInstance |
comboNextQuery()
Get the next query from the score-combination learner. |
protected abstract void |
comboSetDistanceInstancePool(java.util.Iterator i)
Set up a pool of (possibly unlabeled) instance distances, for the learner to make queries from. |
protected abstract void |
comboSetStringWrapperPool(java.util.Iterator i)
Pass an iterator over unlabeled string wrappers to the score-combination learner, just in case that's useful. |
abstract StringDistance |
getDistance()
Get the final string distance, which will be based on the distances learned by the inner learners, as well as the combination scheme learned by comboSetAnswer, comboTrain, and etc. |
protected StringDistance[] |
getInnerDistances()
Get an array of trained inner distances. |
boolean |
hasNextQuery()
See if someone has a query |
DistanceInstance |
nextQuery()
Get a next query from one of the sublearners |
DistanceInstanceIterator |
prepare(DistanceInstanceIterator it)
Prepare data for the learners. |
StringWrapperIterator |
prepare(StringWrapperIterator it)
Prepare data for the sublearners. |
void |
setDistanceInstancePool(DistanceInstanceIterator it)
Pass the training data along to the inner learners. |
void |
setStringWrapperPool(StringWrapperIterator it)
Pass the training data along to the inner learners. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected StringDistanceLearner[] innerLearners
protected java.lang.String delim
Constructor Detail |
---|
public CombinedStringDistanceLearner()
public CombinedStringDistanceLearner(StringDistanceLearner[] innerLearners, java.lang.String delim)
Method Detail |
---|
protected abstract void comboSetStringWrapperPool(java.util.Iterator i)
protected abstract void comboSetDistanceInstancePool(java.util.Iterator i)
protected abstract boolean comboHasNextQuery()
protected abstract DistanceInstance comboNextQuery()
protected abstract void comboAddExample(DistanceInstance di)
public abstract StringDistance getDistance()
getDistance
in interface StringDistanceLearner
public void setStringWrapperPool(StringWrapperIterator it)
setStringWrapperPool
in interface StringDistanceLearner
public void setDistanceInstancePool(DistanceInstanceIterator it)
setDistanceInstancePool
in interface StringDistanceLearner
public boolean hasNextQuery()
hasNextQuery
in interface StringDistanceLearner
public DistanceInstance nextQuery()
nextQuery
in interface StringDistanceLearner
public void addExample(DistanceInstance answeredQuery)
addExample
in interface StringDistanceLearner
public StringWrapperIterator prepare(StringWrapperIterator it)
prepare
in interface StringDistanceLearner
public DistanceInstanceIterator prepare(DistanceInstanceIterator it)
prepare
in interface StringDistanceLearner
protected java.util.List<MultiStringWrapper> asMultiStringWrapperList(StringWrapperIterator i)
protected MultiStringWrapper asMultiStringWrapper(StringWrapper w)
protected java.util.List<CombinedStringDistanceLearner.MyMultiDistanceInstance> asMultiDistanceInstanceList(DistanceInstanceIterator i)
protected CombinedStringDistanceLearner.MyMultiDistanceInstance asMultiDistanceInstance(DistanceInstance di)
protected StringDistance[] getInnerDistances()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |