|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umich.eecs.tac.props.AbstractTransportable edu.umich.eecs.tac.props.UserClickModel
public class UserClickModel
UserClickModel the parameters that generate user viewing behavior. These parameters include (for each query class):
Constructor Summary | |
---|---|
UserClickModel()
Creates an empty user click model with no query classes nor advertisers. |
|
UserClickModel(Query[] queries,
java.lang.String[] advertisers)
Creates a user click model initialized with the queries and advertisers. |
Method Summary | |
---|---|
java.lang.String |
advertiser(int index)
Returns the advertiser at the index. |
int |
advertiserCount()
Returns the advertiser count. |
int |
advertiserIndex(java.lang.String advertiser)
Returns the index for an advertiser and -1 if the advertiser is not in the model. |
double |
getAdvertiserEffect(int queryIndex,
int advertiserIndex)
Returns the advertiser effect for the query and advertiser at the indices. |
double |
getContinuationProbability(int queryIndex)
Returns the continuation probability for the query at the index. |
Query |
query(int index)
Returns the query at the index. |
int |
queryCount()
Returns the query count. |
int |
queryIndex(Query query)
Returns the index for a query and -1 if the query is not in the model. |
protected void |
readWithLock(se.sics.isl.transport.TransportReader reader)
Reads the queries, advertisers, advertiser effects, and continuation probabilities from the reader. |
void |
setAdvertiserEffect(int queryIndex,
int advertiserIndex,
double effect)
Sets the advertiser effect for the query and advertiser at the indices. |
void |
setContinuationProbability(int queryIndex,
double probability)
Sets the continuation probability for the query at the index. |
protected void |
writeWithLock(se.sics.isl.transport.TransportWriter writer)
Writes the queries, advertisers, advertiser effects, and continuation probabilities to the writer. |
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportable |
---|
getTransportName, isLocked, lock, lockCheck, read, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserClickModel()
public UserClickModel(Query[] queries, java.lang.String[] advertisers)
queries
and advertisers.
queries
- the initial queriesadvertisers
- the initial advertisers.Method Detail |
---|
public final int advertiserCount()
public final java.lang.String advertiser(int index)
index
- the index into the advertiser set.
public final int advertiserIndex(java.lang.String advertiser)
-1
if the advertiser is not in the model.
advertiser
- the advertiser.
-1
if the advertiser is not in the model.public final int queryCount()
public final Query query(int index)
index
- the index into the query set.
public final int queryIndex(Query query)
-1
if the query is not in the model.
query
- the query.
-1
if the query is not in the model.public final double getContinuationProbability(int queryIndex)
queryIndex
- the query index.
public final void setContinuationProbability(int queryIndex, double probability)
queryIndex
- the query index.probability
- the continuation probability.public final double getAdvertiserEffect(int queryIndex, int advertiserIndex)
queryIndex
- the query index.advertiserIndex
- the advertiser index.
public final void setAdvertiserEffect(int queryIndex, int advertiserIndex, double effect)
queryIndex
- the query index.advertiserIndex
- the advertiser index.effect
- the advertiser effect.protected final void readWithLock(se.sics.isl.transport.TransportReader reader) throws java.text.ParseException
readWithLock
in class AbstractTransportable
reader
- the reader to read data from.
java.text.ParseException
- if an exception occurs reading the parameters.protected final void writeWithLock(se.sics.isl.transport.TransportWriter writer)
writeWithLock
in class AbstractTransportable
writer
- the writer to write data to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |