Package au.com.bytecode.opencsv

Examples of au.com.bytecode.opencsv.CSVWriter.writeNext()


          mkfWatch.start();
          rsFilter.update(rsDistribution, obsState);
          mkfWatch.stop();
          final long latency = mkfWatch.elapsed(TimeUnit.MILLISECONDS);
          mkfLatency.accumulate(new MutableDouble(latency));
          writer.writeNext(new String[] {
              Integer.toString(k), Integer.toString(i),
              "mkf", "latency", "NA",
              Long.toString(latency)
          });
        }
View Full Code Here


            wfWatch.start();
            wfFilter.update(wfDistribution, obsState);
            wfWatch.stop();
            final long latency = wfWatch.elapsed(TimeUnit.MILLISECONDS);
            wfLatency.accumulate(new MutableDouble(latency));
            writer.writeNext(new String[] {
                Integer.toString(k), Integer.toString(i),
                "wf-pl", "latency", "NA",
                Long.toString(latency)
            });
          }
View Full Code Here

    wfFilter.setNumParticles(N);
    wfFilter.setResampleOnly(false);

    CSVWriter writer = new CSVWriter(new FileWriter(outputFilename), ',');
    String[] header = "rep,t,filter.type,measurement.type,resample.type,measurement".split(",");
    writer.writeNext(header);

    GaussianArHmmClassEvaluator wfClassEvaluator = new GaussianArHmmClassEvaluator("wf-pl",
        writer);
    GaussianArHmmRmseEvaluator wfRmseEvaluator = new GaussianArHmmRmseEvaluator("wf-pl",
        writer);
View Full Code Here

            wfWatch.start();
            wfFilter.update(wfDistribution, simulation.get(i));
            wfWatch.stop();
            final long latency = wfWatch.elapsed(TimeUnit.MILLISECONDS);
            wfLatency.accumulate(new MutableDouble(latency));
            writer.writeNext(new String[] {
                Integer.toString(k), Integer.toString(i),
                "wf-pl", "latency", "NA",
                Long.toString(latency)
            });
          }
View Full Code Here

        RingAccumulator<MutableDouble> viterbiRate = new RingAccumulator<MutableDouble>();
        RingAccumulator<MutableDouble> pfRunningRate = new RingAccumulator<MutableDouble>();
   
        CSVWriter writer = new CSVWriter(new FileWriter(outputFilename), ',');
        String[] header = "rep,t,measurement.type,filter.type,resample.type,measurement".split(",");
        writer.writeNext(header);
   
        for (int k = 0; k < K; k++) {
          CountedDataDistribution<P> wfDistribution =
              ((HmmPlFilter.HmmPlUpdater<H, P, T>) wfFilter.getUpdater()).baumWelchInitialization(obsValues, N);
   
View Full Code Here

            ResampleType rsResampleType = rsDistribution.getMaxValueKey().getResampleType();
            Vector rsStateProbDiffs = computeStateDiffs(i, hmm.getNumStates(), rsDistribution, forwardResults);
            String[] rsLine = {Integer.toString(k), Integer.toString(i), "p(x_t=0|y^t)",
               rsResampleType.toString(),
               Double.toString(rsStateProbDiffs.getElement(0))};
            writer.writeNext(rsLine);
            log.info("rsStateProbDiffs=" + rsStateProbDiffs);
   
     
            if (i > numPreRuns) {
              wfFilter.update(wfDistribution, obsState);
View Full Code Here

              ResampleType wfResampleType = wfDistribution.getMaxValueKey().getResampleType();
              Vector wfStateProbDiffs = computeStateDiffs(i, hmm.getNumStates(), wfDistribution, forwardResults);
              String[] wfLine = {Integer.toString(k), Integer.toString(i), "p(x_t=0|y^t)", "water-filling",
                 wfResampleType.toString(),
                 Double.toString(wfStateProbDiffs.getElement(0))};
              writer.writeNext(wfLine);
              log.info("wfStateProbDiffs=" + wfStateProbDiffs);
   
            }
     
          }
View Full Code Here

              rsStateProbDiffs.setElement(j, gammas.get(t).getElement(j) - rsStateProb);
            }
            String[] wfLine = {Integer.toString(k), Integer.toString(t), "p(x_t=0|y^T)", "water-filling",
                  wfDistribution.getMaxValueKey().getResampleType().toString(),
                  Double.toString(wfStateProbDiffs.getElement(0))};
            writer.writeNext(wfLine);
            String[] rsLine = {Integer.toString(k), Integer.toString(t), "p(x_t=0|y^T)", "resample",
                rsDistribution.getMaxValueKey().getResampleType().toString(),
                Double.toString(rsStateProbDiffs.getElement(0))};
            writer.writeNext(rsLine);
          }
View Full Code Here

                  Double.toString(wfStateProbDiffs.getElement(0))};
            writer.writeNext(wfLine);
            String[] rsLine = {Integer.toString(k), Integer.toString(t), "p(x_t=0|y^T)", "resample",
                rsDistribution.getMaxValueKey().getResampleType().toString(),
                Double.toString(rsStateProbDiffs.getElement(0))};
            writer.writeNext(rsLine);
          }
        }
        writer.close();
      }
View Full Code Here

        new RingAccumulator<MutableDouble>();

    String outputFilename = args[0] + "/nar-" + N + "-" + K + "-wf.csv";
    CSVWriter writer = new CSVWriter(new FileWriter(outputFilename), ',');
    String[] header = "rep,t,filter.type,measurement.type,resample.type,measurement".split(",");
    writer.writeNext(header);

    for (int k = 0; k < K; k++) {
      log.info("Processing replication " + k);

      GaussianArHpEvaluator wfEvaluator = new GaussianArHpEvaluator("wf-pl",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.