|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCOM.hugin.HAPI.Domain
BOBW
public class BOBW
Class for setting up and running a BOBW network, with or without additional content features
Nested Class Summary |
---|
Nested classes/interfaces inherited from class COM.hugin.HAPI.Domain |
---|
COM.hugin.HAPI.Domain.Category, COM.hugin.HAPI.Domain.Constraint, COM.hugin.HAPI.Domain.Endian, COM.hugin.HAPI.Domain.Equilibrium, COM.hugin.HAPI.Domain.EvidenceMode, COM.hugin.HAPI.Domain.Kind, COM.hugin.HAPI.Domain.TriangulationMethod |
Field Summary |
---|
Fields inherited from class COM.hugin.HAPI.Domain |
---|
H_CATEGORY_CHANCE, H_CATEGORY_DECISION, H_CATEGORY_ERROR, H_CATEGORY_UTILITY, H_CONSTRAINT_BACKWARD_EDGE_FORBIDDEN, H_CONSTRAINT_BACKWARD_EDGE_REQUIRED, H_CONSTRAINT_EDGE_FORBIDDEN, H_CONSTRAINT_EDGE_REQUIRED, H_CONSTRAINT_ERROR, H_CONSTRAINT_FORWARD_EDGE_FORBIDDEN, H_CONSTRAINT_FORWARD_EDGE_REQUIRED, H_CONSTRAINT_NONE, H_ENDIAN_BIG, H_ENDIAN_HOST, H_ENDIAN_LITTLE, H_EQUILIBRIUM_MAX, H_EQUILIBRIUM_SUM, H_EVIDENCE_MODE_FAST_RETRACTION, H_EVIDENCE_MODE_NORMAL, H_KIND_CONTINUOUS, H_KIND_DISCRETE, H_KIND_ERROR, H_TM_CLIQUE_SIZE, H_TM_CLIQUE_WEIGHT, H_TM_FILL_IN_SIZE, H_TM_FILL_IN_WEIGHT, H_TM_TOTAL_WEIGHT |
Constructor Summary | |
---|---|
BOBW(String modelType,
String trainingSet,
int numberOfTrainingCases,
String testSet,
int numberOfTestCases,
int numberOfUsers,
int numberOfMovies,
int comCatStates)
Constructs a new network with a user, community, movie, category and rating node, where the four first are LabelledDCNodes and the last is a ContinuousChanceNode Sets the ratings to unnormalized by default. |
Method Summary | |
---|---|
void |
parseError(int position,
String msg)
Method inherited from ParseListener, handles errors regarding the parsing of the data cases in Hugin |
double[] |
runExternal()
The method called to set up the network with the chosen parameters, train it with the given training set, and test it with respect to the given test set |
void |
setNormalized(boolean norm)
Sets the ratings to normalized or unnormalized (they are unnormalized per default) |
void |
setNumberOfIterations(int upperNetwork,
int ratingNode,
int rounds)
Sets the number of EM iterations to be used for the learning of the model (if other than the default is wanted) |
Methods inherited from class COM.hugin.HAPI.Domain |
---|
approximate, compile, compress, delete, INFINITY, isCompiled, JPA100, JPA101, JPA102, JPA103, JPA104, JPA21, JPA47, JPA48, JPA49, JPA50, JPA51, JPA52, JPA53, JPA54, JPA55, JPA56, JPA57, JPA58, JPA59, JPA60, JPA61, JPA62, JPA63, JPA64, JPA65, JPA66, JPA67, JPA68, JPA69, JPA70, JPA71, JPA72, JPA73, JPA74, JPA75, JPA76, JPA77, JPA78, JPA79, JPA80, JPA81, JPA82, JPA83, JPA84, JPA85, JPA86, JPA87, JPA88, JPA89, JPA90, JPA91, JPA92, JPA93, JPA94, JPA95, JPA96, JPA97, JPA98, JPA99, propagate, save, simulate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BOBW(String modelType, String trainingSet, int numberOfTrainingCases, String testSet, int numberOfTestCases, int numberOfUsers, int numberOfMovies, int comCatStates) throws COM.hugin.HAPI.ExceptionHugin
modelType
- The model type is "plain" if no additional features are to be included in the network, "year" to include
movie release year, "dir&act" to include directors and actors, "zip" to include user zip codes, and "age" to include user agetrainingSet
- The path to the training set filenumberOfTrainingCases
- The number of data cases in the training settestSet
- The path to the test set filenumberOfTestCases
- The number of data cases in the test setcomCatStates
- The number of states which is wanted in the two latent nodes Community and Category
COM.hugin.HAPI.ExceptionHugin
Method Detail |
---|
public void setNumberOfIterations(int upperNetwork, int ratingNode, int rounds)
upperNetwork
- The number of EM iterations on the non-continuous nodes for each roundratingNode
- The number of EM iterations on the continuous node for each roundrounds
- the number of times the iterations on the non-continuous and continuous nodes are to be repeatedpublic void setNormalized(boolean norm)
norm
- true if you want normalized ratings, false otherwisepublic double[] runExternal()
public void parseError(int position, String msg)
parseError
in interface COM.hugin.HAPI.ParseListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |