Class ExtMath


  • public class ExtMath
    extends Object
    Helper class that implements scikit-learn functionalities in utils/extmath.py.
    • Constructor Detail

      • ExtMath

        public ExtMath()
    • Method Detail

      • dot

        public static NumpyArray<Double> dot​(NumpyArray<Double> v1,
                                             NumpyArray<Double> v2)
        Dot product of the NumpyArray.
        Parameters:
        v1 - Left-hand side of the expression.
        v2 - Right-hand side of the expression.
        Returns:
        The dot product of the two numpy array.
      • rowNorm

        public static NumpyArray<Double> rowNorm​(NumpyArray<Double> x)
        Row-wise (squared) Euclidean norm of X. Equivalent to np.sqrt((X * X).sum(axis=1))
        Parameters:
        x - The input array.
        Returns:
        The row-wise (squared) Euclidean norm of x.
      • rowNorm

        public static NumpyArray<Double> rowNorm​(NumpyArray<Double> x,
                                                 boolean squared)
        Row-wise (squared) Euclidean norm of X. Equivalent to np.sqrt((X * X).sum(axis=1))
        Parameters:
        x - The input array.
        squared - If True, return squared norms.
        Returns:
        The row-wise (squared) Euclidean norm of x.