Database Reference
In-Depth Information
private Hashtable
<
String, Integer
>
stepHash
¼
new
Hashtable
<
String, Integer
>
();
/** Hashtable of DP. */
private
Hashtable
<
String,
double[]
>
dpHash
¼
new
Hashtable
<
String, double[]
>
();
// ---------------------------
// Constructor
// ---------------------------
/**
* Empty constructor.
*/
public RecommEngineEnvironment(){
}
// ---------------------------
// Initialization
// ---------------------------
/**
* Init.
*
* @param args array of strings
* @exception MiningException general exception
*/
public void init(String[] args) throws MiningException {
// Create state meta data:
metaDataState
¼
new MiningDataSpecification("itemID");
int nstates
¼
6;
for (int i
¼
0; i
<
nstates; i++)
itemIDAtt.addCategory( new Category( String.valueOf(i
+1) ) );
metaDataState.addMiningAttribute(itemIDAtt);
// Create metadata for actions:
metaDataAction
¼
new
MiningDataSpecification
("actions");
int nactions
¼
nstates;
for (int i
¼
0; i
<
nactions; i++)
recoIDAtt.addCategory( new Category( String.valueOf(i
+1) ) );
metaDataAction.addMiningAttribute(recoIDAtt);
// Create states and action arrays:
MiningStoredData msd
¼
new MiningStoredData();
msd.setMetaData(metaDataState);