Database Reference
In-Depth Information
*
@param
cond
conditional
probability
(else
unconditional)
* @param transP the transition probability at specified
(state, action) pair
* @throws MiningException
*/
public void setTransP(State state, Action action, boolean
cond, double transP)
throws MiningException {
//...Implementation ...//
}
// ---------------------------
// Other methods
// ---------------------------
...
}
Thus, we use the StateSet and ActionSet classes of the RL Core package to store
the products and rules. Of course, in real recommendation engine implementations,
this storage is implemented in a much more sophisticated way supporting large rule
sets based on hash mappings. The transition probabilities p ða n ( S , S 0 ) including their
step numbers n are stored by the hash tables dpHash and stepHash , respectively.
Again, we use a very simple implementation here which is also not very fast.
After we have designed the recommendation environment, we need to create the
recommendation agent.
/**
* Create DP recommendation agent.
*
* @return the agent object
* @throws MiningException
*/
private
RecommAgent
createDPRecommAgent()
throws
MiningException {
// Create settingsobject:
DPRecommAgentSettings agentSettings ¼ new DPRecommAgen-
tSettings();
agentSettings.setInputDataSpecification(new
MiningDa-
taSpecification("dummy"));
agentSettings.setDpVersionSubtype(PRecommAgen-
tSettings.P_VERSION_SUBTYPE_FULL);
agentSettings.setAlphaType(
RecommAgentSettings.
RL_STEP_SIZE_FIXED );
agentSettings.setAlpha( 0.1 );
Search WWH ::




Custom Search