edu.umich.eecs.tac.props
Class UserClickModel

java.lang.Object
  extended by edu.umich.eecs.tac.props.AbstractTransportable
      extended by edu.umich.eecs.tac.props.UserClickModel
All Implemented Interfaces:
java.io.Serializable, se.sics.isl.transport.Transportable

public class UserClickModel
extends AbstractTransportable

UserClickModel the parameters that generate user viewing behavior. These parameters include (for each query class):

Author:
Patrick Jordan
See Also:
TAC Documentation, Serialized Form

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

UserClickModel

public UserClickModel()
Creates an empty user click model with no query classes nor advertisers.


UserClickModel

public UserClickModel(Query[] queries,
                      java.lang.String[] advertisers)
Creates a user click model initialized with the queries and advertisers.

Parameters:
queries - the initial queries
advertisers - the initial advertisers.
Method Detail

advertiserCount

public final int advertiserCount()
Returns the advertiser count.

Returns:
the advertiser count.

advertiser

public final java.lang.String advertiser(int index)
Returns the advertiser at the index.

Parameters:
index - the index into the advertiser set.
Returns:
the advertiser at the index.

advertiserIndex

public final int advertiserIndex(java.lang.String advertiser)
Returns the index for an advertiser and -1 if the advertiser is not in the model.

Parameters:
advertiser - the advertiser.
Returns:
the index for an advertiser and -1 if the advertiser is not in the model.

queryCount

public final int queryCount()
Returns the query count.

Returns:
the query count.

query

public final Query query(int index)
Returns the query at the index.

Parameters:
index - the index into the query set.
Returns:
the query at the index.

queryIndex

public final int queryIndex(Query query)
Returns the index for a query and -1 if the query is not in the model.

Parameters:
query - the query.
Returns:
the index for a query and -1 if the query is not in the model.

getContinuationProbability

public final double getContinuationProbability(int queryIndex)
Returns the continuation probability for the query at the index.

Parameters:
queryIndex - the query index.
Returns:
the continuation probability for the query at the index.
See Also:
TAC Documentation

setContinuationProbability

public final void setContinuationProbability(int queryIndex,
                                             double probability)
Sets the continuation probability for the query at the index.

Parameters:
queryIndex - the query index.
probability - the continuation probability.
See Also:
TAC Documentation

getAdvertiserEffect

public final double getAdvertiserEffect(int queryIndex,
                                        int advertiserIndex)
Returns the advertiser effect for the query and advertiser at the indices.

Parameters:
queryIndex - the query index.
advertiserIndex - the advertiser index.
Returns:
the advertiser effect for the query and advertiser at the indices.
See Also:
TAC Documentation

setAdvertiserEffect

public final void setAdvertiserEffect(int queryIndex,
                                      int advertiserIndex,
                                      double effect)
Sets the advertiser effect for the query and advertiser at the indices.

Parameters:
queryIndex - the query index.
advertiserIndex - the advertiser index.
effect - the advertiser effect.
See Also:
TAC Documentation

readWithLock

protected final void readWithLock(se.sics.isl.transport.TransportReader reader)
                           throws java.text.ParseException
Reads the queries, advertisers, advertiser effects, and continuation probabilities from the reader.

Specified by:
readWithLock in class AbstractTransportable
Parameters:
reader - the reader to read data from.
Throws:
java.text.ParseException - if an exception occurs reading the parameters.

writeWithLock

protected final void writeWithLock(se.sics.isl.transport.TransportWriter writer)
Writes the queries, advertisers, advertiser effects, and continuation probabilities to the writer.

Specified by:
writeWithLock in class AbstractTransportable
Parameters:
writer - the writer to write data to.


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.