/** * Creates a new temporal data stream. * @param sampler1 a {@link DynamicBayesianNetworkSampler} object. * @param nSequences1 an {@code int} that represents the number of sequences in the data stream to be sampled. * @param sequenceLength1 an {@code int} that represents the length of each sequence. */ TemporalDataStream(DynamicBayesianNetworkSampler sampler1, int nSequences1, int sequenceLength1){ this.sampler=sampler1; this.nSequences = nSequences1; this.sequenceLength = sequenceLength1; List<Attribute> list = new ArrayList<>(); list.add(new Attribute(0,Attributes.SEQUENCE_ID_ATT_NAME, new RealStateSpace())); list.add(new Attribute(1,Attributes.TIME_ID_ATT_NAME, new RealStateSpace())); list.addAll(this.sampler.network.getDynamicVariables().getListOfDynamicVariables().stream() .filter(var -> !sampler1.getLatentVars().contains(var)) .map(var -> new Attribute(var.getVarID() + 2, var.getName(), var.getStateSpaceType())).collect(Collectors.toList())); this.atts= new Attributes(list); }