public void setDBN(DynamicBayesianNetwork dbn) { this.dbn = dbn; this.bnTime0 = dbn.toBayesianNetworkTime0(); this.bnTimeT = dbn.toBayesianNetworkTimeT(); }
public DBNSampler(DynamicBayesianNetwork dbn) { this.dbn = dbn; this.bnTime0 = dbn.toBayesianNetworkTime0(); this.bnTimeT = dbn.toBayesianNetworkTimeT(); this.random = new Random(seed); }
/** * {@inheritDoc} */ @Override public void setModel(DynamicBayesianNetwork model_) { this.model = model_; this.bnTime0 = model.toBayesianNetworkTime0(); this.bnTimeT = model.toBayesianNetworkTimeT(); }
/** * Creates a Hugin Bayesian network file from a AMIDST Dynamic Bayesian network model. * In order to simplify, we assume that the Hugin DBN model name is the file name without extension. * @param amidstDBN the <code>DynamicBayesianNetwork</code> in AMIDST format. * @param file the name of the Hugin file in which the model is saved. * @throws ExceptionHugin */ public static void save(DynamicBayesianNetwork amidstDBN, String file) throws ExceptionHugin { BayesianNetworkWriterToHugin.save(amidstDBN.toBayesianNetworkTimeT(),file); /* Class huginDBN = DBNConverterToHugin.convertToHugin(amidstDBN); //The network name must be the same as the file name (without .dbn) String[] parts = file.split("/"); String fileName = parts[parts.length-1]; String networkName = fileName.substring(0,fileName.length()-5); System.out.println(networkName); huginDBN.setName(networkName); huginDBN.saveAsNet(file); */ } }
private void resetInfAlgorithms(){ this.infAlgTime0.setModel(this.model.toBayesianNetworkTime0()); this.infAlgTimeT.setModel(this.model.toBayesianNetworkTimeT()); }