protected void initLearning() { if(learningAlgorithm==null) { SVB svb = new SVB(); svb.setWindowsSize(100); svb.getPlateuStructure().getVMP().setTestELBO(false); svb.getPlateuStructure().getVMP().setMaxIter(100); svb.getPlateuStructure().getVMP().setThreshold(0.00001); learningAlgorithm = svb; } learningAlgorithm.setWindowsSize(windowSize); if (this.getDAG()!=null) learningAlgorithm.setDAG(this.getDAG()); else if (this.getPlateuStructure()!=null) ((BayesianParameterLearningAlgorithm)learningAlgorithm).setPlateuStructure(this.getPlateuStructure()); else throw new IllegalArgumentException("Non provided dag or PlateauStructure"); learningAlgorithm.setOutput(true); learningAlgorithm.initLearning(); initialized=true; }
@Override protected void initLearning() { if(learningAlgorithm==null) { SVB svb = new SVB(); plateauLDA = new PlateauLDA(this.atts, "word", "count"); plateauLDA.setNTopics(ntopics); svb.setPlateuStructure(plateauLDA); svb.getPlateuStructure().getVMP().setTestELBO(false); svb.getPlateuStructure().getVMP().setMaxIter(100); svb.getPlateuStructure().getVMP().setThreshold(0.01); learningAlgorithm = svb; } learningAlgorithm.setWindowsSize(100); learningAlgorithm.setOutput(true); learningAlgorithm.initLearning(); initialized=true; }
@Override protected void initLearning() { if (this.getDAG()==null) buildDAG(); if(learningAlgorithm==null) { SVB svb = new SVB(); svb.setSeed(this.seed); svb.setPlateuStructure(new PlateuIIDReplication(hiddenVars)); GaussianHiddenTransitionMethod gaussianHiddenTransitionMethod = new GaussianHiddenTransitionMethod(hiddenVars, 0, this.transitionVariance); gaussianHiddenTransitionMethod.setFading(fading); svb.setTransitionMethod(gaussianHiddenTransitionMethod); svb.setDAG(dag); svb.setOutput(false); svb.getPlateuStructure().getVMP().setMaxIter(1000); svb.getPlateuStructure().getVMP().setThreshold(0.001); learningAlgorithm = svb; } learningAlgorithm.setWindowsSize(windowSize); if (this.getDAG()!=null) learningAlgorithm.setDAG(this.getDAG()); else throw new IllegalArgumentException("Non provided dag"); learningAlgorithm.setOutput(false); learningAlgorithm.initLearning(); initialized=true; }