Examples of outerProduct()


Examples of gov.sandia.cognition.math.matrix.Vector.outerProduct()

       */
      final Vector Hv = H.convertToVector();
      /*
       * TODO FIXME inverse!  ewww.
       */
      final Matrix postAInv = priorAInv.plus(Hv.outerProduct(Hv)).inverse();
      final Vector postPsiMean = postAInv.times(priorAInv.times(psiPriorSmpl).plus(
          H.transpose().times(postStateSample)));
      final MultivariateGaussian postPsi = predState.getPsiSS().clone();
      postPsi.setMean(postPsiMean);
      postPsi.setCovariance(postAInv);
View Full Code Here

Examples of gov.sandia.cognition.math.matrix.Vector.outerProduct()

      /*
       * TODO FIXME: we don't have a generalized outer product, so we're only
       * supporting the 1d case for now.
       */
      final Vector Hv = H.convertToVector();
      final Matrix postAInv = priorAInv.plus(Hv.outerProduct(Hv)).inverse();
      // TODO FIXME: ewww.  inverse.
      final Vector postPhiMean = postAInv.times(priorAInv.times(phiPriorSmpl).plus(
          H.transpose().times(postStateSample)));
      final MultivariateGaussian postPhi = systemOffsetsSS;
      postPhi.setMean(postPhiMean);
View Full Code Here

Examples of gov.sandia.cognition.math.matrix.Vector.outerProduct()

            sampledComponentDist
                .getCovariance()
                .plus(data.outerProduct(data))
                .plus(oldComponentMean.outerProduct(oldComponentMean).scale(oldComponentCount))
                .minus(
                    updatedComponentMean.outerProduct(updatedComponentMean).scale(
                        updatedComponentCount));

        sampledComponentDist.setCovariance(updatedComponentSS);
        sampledComponentDist.setMean(updatedComponentMean);
      }
View Full Code Here

Examples of gov.sandia.cognition.math.matrix.Vector.outerProduct()

        final Vector componentCenteringMeanDiff =
            centeringDist.getGaussian().getMean().minus(component.getMean());
        final Matrix componentD =
            component.getCovariance().plus(
                componentCenteringMeanDiff.outerProduct(componentCenteringMeanDiff).scale(
                    kappa * componentN / (kappa + componentN)));

        final Matrix componentPriorPredCovariance =
            centeringDist
                .getInverseWishart()
View Full Code Here

Examples of gov.sandia.cognition.math.matrix.Vector.outerProduct()

      /*
       * TODO FIXME: we don't have a generalized outer product, so we're only
       * supporting the 1d case for now.
       */
      final Vector Hv = H.convertToVector();
      final Matrix postAInv = priorAInv.plus(Hv.outerProduct(Hv)).inverse();
      // TODO FIXME: ewww.  inverse.
      final Vector postPhiMean = postAInv.times(priorAInv.times(phiPriorSmpl).plus(
          H.transpose().times(postStateSample)));
      final MultivariateGaussian postPhi = systemOffsetsSS.get(predState.getClassId());
      postPhi.setMean(postPhiMean);
View Full Code Here

Examples of mikera.vectorz.AVector.outerProduct()

    assertTrue(a instanceof AMatrix);
  }
 
  @Test public void testOuterProducts() {
    AVector v=Vectorz.createUniformRandomVector(5);
    INDArray a=v.outerProduct(v);
    assertTrue(a instanceof AMatrix);
   
    AMatrix m=(AMatrix)a;
    AVector v2=v.clone();
    v2.square();
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array.outerProduct()

    final Array m = mean();
    final /*@Real*/ double inv = 1.0/sampleWeight;

    final Matrix result = quadraticSum.mul(inv);
    result.subAssign(m.outerProduct(m));

    result.mulAssign( sampleNumber/(sampleNumber-1.0) );
    return result;
  }

View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array.outerProduct()

      QL.require(dimension > 0, NULL_DIMENSION);
      reset(/* @Size */dimension);
    }
    QL.require(datum.length == dimension_, SAMPLE_SIZE_MISMATCH);
    final Array array = new Array(datum);
    quadraticSum.addAssign(array.outerProduct(array).mulAssign(weight));
    for (/* @Size */int i = 0; i < dimension_; i++) {
      stats[i].add(datum[i], weight);
    }
  }

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.