SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
DensityEstimatorDoubleArray.java
1package umontreal.ssj.stat.density;
2
3import java.util.ArrayList;
4
5import umontreal.ssj.probdist.ContinuousDistribution;
6import umontreal.ssj.stat.PgfDataTable;
7
21public abstract class DensityEstimatorDoubleArray {
22
26 protected double[][] data;
27
35 public abstract void setData(double[][] data);
36
42 public double[][] getData() {
43 return data;
44 }
45
53
54 public abstract double evalDensity(double x);
55
65 public double[] evalDensity(double[] evalPoints) {
66 int k = evalPoints.length;
67 double[] dens = new double[k];
68 for (int j = 0; j < k; j++)
69 dens[j] = evalDensity(evalPoints[j]);
70 return dens;
71 }
72
82 public double[] evalDensity(double[] evalPoints, double[][] data) {
84 return evalDensity(evalPoints);
85 }
86
114 public double[][] evalDensity(double[] evalPoints, double[][][] data) {
115 int m = data.length;
116 double[][] density = new double[m][];
117 for (int r = 0; r < m; r++)
118 density[r] = evalDensity(evalPoints, data[r]);
119
120 return density;
121 }
122
144 public static void evalDensity(ArrayList<DensityEstimatorDoubleArray> listDE, double[] evalPoints, double[][][] data,
145 ArrayList<double[][]> listDensity) {
146 for (DensityEstimatorDoubleArray de : listDE)
147 listDensity.add(de.evalDensity(evalPoints, data));
148 }
149
155 public abstract String toString();
156
157}
Same as DensityEstimator but here the observations of the underlying model are -dimensional.
abstract String toString()
Gives a short description of the estimator.
double[] evalDensity(double[] evalPoints)
Evaluates the density estimator at the points in evalPoints.
double[] evalDensity(double[] evalPoints, double[][] data)
Sets the observations for the density estimator to data and evaluates the density at each point in ev...
static void evalDensity(ArrayList< DensityEstimatorDoubleArray > listDE, double[] evalPoints, double[][][] data, ArrayList< double[][]> listDensity)
This function is particularly designed for experiments with many different types of density estimator...
double[][] getData()
Gives the observations for this density estimator, if any.
double[][] data
The data associated with this DensityEstimatorDoubleArray object, if any.
abstract void setData(double[][] data)
Sets the observations for the density estimator to data.
double[][] evalDensity(double[] evalPoints, double[][][] data)
This method is particularly designed to evaluate the density estimator in such a way that the result ...
abstract double evalDensity(double x)
Evaluates the density estimator at x.
Tools for univariate density estimation.