fitTensors static method

TensorDistribution fitTensors(
  1. Iterable<Tensor<double>> iterable
)

Constructs a distribution for the tensors.

Each tensor index is assumed to have independent normal distribution.

If you are fitting normal distribution to scalars, use fitScalars.

Implementation

static TensorDistribution fitTensors(Iterable<Tensor<double>> iterable) {
  return TensorDistribution.fitScalarsIndependently(
    iterable,
    (iterable) => NormalDistribution.fit(iterable),
  );
}