Package

io.github.mandar2812.dynaml

utils

Permalink

package utils

A set of pre-processing utilities and library functions.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. utils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class ConfigEncoding(keys: List[String]) extends Encoder[Map[String, Double], DenseVector[Double]] with Product with Serializable

    Permalink

    An encoding which converts a hyper-parameter configuration from a Map to a breeze DenseVector and back.

    An encoding which converts a hyper-parameter configuration from a Map to a breeze DenseVector and back.

    keys

    A list of hyper-parameter strings.

  2. case class GaussianScaler(mean: DenseVector[Double], sigma: DenseVector[Double]) extends ReversibleScaler[DenseVector[Double]] with Product with Serializable

    Permalink

    Scales attributes of a vector pattern using the sample mean and variance of each dimension.

    Scales attributes of a vector pattern using the sample mean and variance of each dimension. This assumes that there is no covariance between the data dimensions.

    mean

    Sample mean of the data

    sigma

    Sample variance of each data dimension

  3. abstract class HasHyperParameters extends AnyRef

    Permalink

  4. case class MVGaussianScaler(mean: DenseVector[Double], sigma: DenseMatrix[Double]) extends ReversibleScaler[DenseVector[Double]] with Product with Serializable

    Permalink

    Scales the attributes of a data pattern using the sample mean and covariance matrix calculated on the data set.

    Scales the attributes of a data pattern using the sample mean and covariance matrix calculated on the data set. This allows standardization of multivariate data sets where the covariance of individual data dimensions is not negligible.

    mean

    Sample mean of data

    sigma

    Sample covariance matrix of data.

  5. case class MeanScaler(center: DenseVector[Double]) extends ReversibleScaler[DenseVector[Double]] with Product with Serializable

    Permalink

  6. case class MinMaxScaler(min: DenseVector[Double], max: DenseVector[Double]) extends ReversibleScaler[DenseVector[Double]] with Product with Serializable

    Permalink

  7. case class PCAScaler(center: DenseVector[Double], covmat: DenseMatrix[Double]) extends ReversibleScaler[DenseVector[Double]] with Product with Serializable

    Permalink

    Transforms data by projecting on the principal components (eigen-vectors) of the sample covariance matrix.

    Transforms data by projecting on the principal components (eigen-vectors) of the sample covariance matrix.

    center

    The empirical mean of the data features

    covmat

    The empirical covariance matrix of the data features

  8. case class UnivariateGaussianScaler(mean: Double, sigma: Double) extends ReversibleScaler[Double] with Product with Serializable

    Permalink
  9. case class UnivariateMeanScaler(center: Double) extends ReversibleScaler[Double] with Product with Serializable

    Permalink

Value Members

  1. def H(x: Double): Double

    Permalink

    Calculates the Harmonic number function for positive real arguments.

  2. object MinMaxAccumulator extends AccumulatorParam[DenseVector[Double]]

    Permalink
  3. object Renjin

    Permalink

    Encapsulates renjin script engine and its capabilities.

  4. def chebyshev(n: Int, x: Double, kind: Int = 1): Double

    Permalink

    Calculates the Chebyshev polynomials of the first and second kind, in a tail recursive manner, using their recurrence relations.

  5. def combine[A](xs: Traversable[Traversable[A]]): Seq[Seq[A]]

    Permalink
  6. def diagonal[M <: PartitionedMatrix](pm: M): PartitionedMatrix

    Permalink

    Extract the diagonal elements of a PartitionedMatrix

  7. def diagonal(m: DenseMatrix[Double]): DenseMatrix[Double]

    Permalink

    Extract the diagonal elements of a breeze DenseMatrix

  8. def downloadURL(url: String, saveAs: String): Unit

    Permalink
  9. def extractColumns(lines: Stream[String], sep: String, columns: List[Int], naStrings: Map[Int, String]): Stream[String]

    Permalink
  10. def factorial(n: Int, accumulator: Long = 1): Long

    Permalink
    Annotations
    @tailrec()
  11. def getCSVReader(file: String, delim: Char): CSVReader

    Permalink

    Get a CSVReader object from a file name and delimiter character.

    Get a CSVReader object from a file name and delimiter character.

    file

    The file pathname as a String

    delim

    The delimiter character used to split the csv file.

    returns

    A CSVReader object which can be iterated for each line.

  12. def getMinMax(data: List[DenseVector[Double]]): (DenseVector[Double], DenseVector[Double])

    Permalink
  13. def getPriorMapDistr(d: Map[String, ContinuousDistr[Double]]): ContinuousDistr[Map[String, Double]]

    Permalink

    Convert a hyper-prior specification to a continuous distribution over Map

  14. def getStats(data: List[DenseVector[Double]]): (DenseVector[Double], DenseVector[Double])

    Permalink

    Get the mean and variance of a data set which is a List of DenseVector.

    Get the mean and variance of a data set which is a List of DenseVector.

    data

    The data set.

    returns

    A Tuple2 containing the mean and variance * n-1.

  15. def getStatsMult(data: List[DenseVector[Double]]): (DenseVector[Double], DenseMatrix[Double])

    Permalink

    Get the mean and variance of a data set which is a List of DenseVector.

    Get the mean and variance of a data set which is a List of DenseVector.

    data

    The data set.

    returns

    A Tuple2 containing the mean and variance.

  16. def getTypeTag[T](obj: T)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): scala.reflect.api.JavaUniverse.TypeTag[T]

    Permalink
  17. def haarMatrix(n: Int): DenseMatrix[Double]

    Permalink

    Construct a Haar transform matrix of size n

    Construct a Haar transform matrix of size n

    NOTE: n must be a power of 2.

  18. def hermite(n: Int, x: Double): Double

    Permalink

    Calculate the value of the hermite polynomials tail recursively.

    Calculate the value of the hermite polynomials tail recursively. This is needed to calculate the Gaussian derivatives at a point x.

  19. def isSquareMatrix[V](mat: Matrix[V]): Unit

    Permalink
  20. def isSymmetricMatrix[V](mat: Matrix[V]): Unit

    Permalink
  21. def legendre(n: Int, x: Double): Double

    Permalink

    Calculate the value of the Legendre polynomials tail recursively.

  22. val log1pExp: (Double) ⇒ Double

    Permalink
  23. def median(list: Stream[Double]): Double

    Permalink
  24. object mvlgamma extends UFunc

    Permalink

  25. def productField[Domain, Domain1](ev: Field[Domain], ev1: Field[Domain1])(implicit eqq: Eq[Domain], eqq1: Eq[Domain1]): Field[(Domain, Domain1)]

    Permalink
  26. def quickselect(list: Stream[Double], k: Int): Double

    Permalink

    Implementation of the quick-select algorithm.

  27. def replace(find: String)(replace: String)(input: String): String

    Permalink
  28. def strReplace(fileName: String)(findStringRegex: String, replaceString: String): Stream[String]

    Permalink
  29. def textFileToStream(fileName: String): Stream[String]

    Permalink
  30. def transformData(transform: (String) ⇒ String)(lines: Stream[String]): Stream[String]

    Permalink
  31. def writeToFile(destination: String)(lines: Stream[String]): Unit

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped