• package root
    Definition Classes
  • package lamp

    Lamp provides utilities to build state of the art machine learning applications

    Lamp provides utilities to build state of the art machine learning applications


    Notable types and packages:

    • lamp.STen is a memory managed wrapper around aten.ATen, an off the heap, native n-dimensionl array backed by libtorch.
    • lamp.autograd implements reverse mode automatic differentiation.
    • lamp.nn contains neural network building blocks, see e.g. lamp.nn.Linear.
    • implements a training loop and other data related abstractions.
    • lamp.knn implements k-nearest neighbor search on the CPU and GPU
    • lamp.umap.Umap implements the UMAP dimension reduction algorithm
    • lamp.onnx implements serialization of computation graphs into ONNX format
    • contains CSV and NPY readers
    How to get data into lamp

    Use one of the file readers in or one of the factories in lamp.STen$.

    How to define a custom neural network layer

    See the documentation on lamp.nn.GenericModule

    How to compose neural network layers

    See the documentation on lamp.nn

    How to train models

    See the training loops in

    Definition Classes
  • package autograd

    Implements reverse mode automatic differentiaton

    Implements reverse mode automatic differentiaton

    The main types in this package are lamp.autograd.Variable and lamp.autograd.Op. The computational graph built by this package consists of vertices representing values (as lamp.autograd.Variable) and vertices representing operations (as lamp.autograd.Op).

    Variables contain the value of a Rn => Rm function. Variables may also contain the partial derivative of their argument with respect to a single scalar. A Variable whose value is a scalar (m=1) can trigger the computation of partial derivatives of all the intermediate upstream Variables. Computing partial derivatives with respect to non-scalar variables is not supported.

    A constant Variable may be created with the const or param factory method in this package. const may be used for constants which do not need their partial derivatives to be computed. param on the other hand create Variables which will fill in their partial derivatives. Further variables may be created by the methods in this class, eventually expressing more complex Rn => Rm functions.

    lamp.Scope.root{ implicit scope =>
      // x is constant (depends on no other variables) and won't compute a partial derivative
      val x = lamp.autograd.const(STen.eye(3, STenOptions.d))
      // y is constant but will compute a partial derivative
      val y = lamp.autograd.param(STen.ones(List(3,3), STenOptions.d))
      // z is a Variable with x and y dependencies
      val z = x+y
      // w is a Variable with z as a direct and x, y as transient dependencies
      val w = z.sum
      // w is a scalar (number of elements is 1), thus we can call backprop() on it.
      // calling backprop will fill out the partial derivatives of the upstream variables
      // partialDerivative is empty since we created `x` with `const`
      // `y`'s partial derivatie is defined and is computed
      // it holds `y`'s partial derivative with respect to `w`, the scalar which we called backprop() on

    This package may be used to compute the derivative of any function, provided the function can be composed out of the provided methods. A particular use case is gradient based optimization.

    Definition Classes
    See also for a review of the algorithm

    lamp.autograd.Op for how to implement a new operation

  • package data
    Definition Classes
  • package distributed
    Definition Classes
  • package extratrees
    Definition Classes
  • package knn
    Definition Classes
  • package nn

    Provides building blocks for neural networks

    Provides building blocks for neural networks

    Notable types:


    Modules facilitating composing other modules:

    • nn.Sequential composes a homogenous list of modules (analogous to List)
    • nn.sequence composes a heterogeneous list of modules (analogous to tuples)
    • nn.EitherModule composes two modules in a scala.Either

    Examples of neural network building blocks, layers etc:

    Definition Classes
  • package onnx
    Definition Classes
  • package saddle
    Definition Classes
  • package table
    Definition Classes
  • package io
  • BooleanColumnType
  • Column
  • ColumnDataType
  • ColumnExpression
  • ColumnIndex
  • ColumnOps
  • DateTimeColumnType
  • DoubleIndex
  • EquExpression
  • F32ColumnType
  • F64ColumnType
  • FloatIndex
  • I64ColumnType
  • LongIndex
  • RelationalAlgebra
  • StringIndex
  • Table
  • TableExpression
  • TableWithGroups
  • TextColumnType
  • csv
  • package umap
    Definition Classes
  • package util
    Definition Classes



package table

Linear Supertypes
AnyRef, Any
  1. Alphabetic
  2. By Inheritance
  1. table
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
  1. Public
  2. Protected

Package Members

  1. package io

Type Members

  1. final class BooleanColumnType extends ColumnDataType
  2. case class Column(values: STen, tpe: ColumnDataType, index: Option[ColumnIndex[_]]) extends ColumnOps with Product with Serializable
  3. sealed trait ColumnDataType extends AnyRef
  4. case class ColumnExpression(c: Column) extends Product with Serializable
  5. sealed trait ColumnIndex[T] extends AnyRef
  6. trait ColumnOps extends AnyRef
  7. final class DateTimeColumnType extends ColumnDataType
  8. case class DoubleIndex(index: Index[Double]) extends ColumnIndex[Double] with Product with Serializable
  9. case class EquExpression[A](column: Column, equalsWith: A) extends Product with Serializable
  10. case class FloatIndex(index: Index[Float]) extends ColumnIndex[Float] with Product with Serializable
  11. case class LongIndex(index: Index[Long]) extends ColumnIndex[Long] with Product with Serializable
  12. trait RelationalAlgebra extends AnyRef
  13. case class StringIndex(index: Index[String]) extends ColumnIndex[String] with Product with Serializable
  14. case class Table(columns: Vector[Column], colNames: Index[String]) extends RelationalAlgebra with Product with Serializable
  15. case class TableExpression(t: Table) extends Product with Serializable
  16. case class TableWithGroups(table: Table, groups: IndexedSeq[STen]) extends Product with Serializable
  17. final case class TextColumnType(maxLength: Int, pad: Long, vocabulary: Option[Map[Char, Long]]) extends ColumnDataType with Product with Serializable

Value Members

  1. implicit def i2CS(i: Int): ColumnSelection
  2. implicit def i2CS(i: Int*): Seq[ColumnSelection]
  3. implicit def i2CS(i: Range): Seq[ColumnSelection]
  4. implicit def s2CS(i: String): ColumnSelection
  5. object BooleanColumnType
  6. object Column extends Serializable
  7. object DateTimeColumnType
  8. case object F32ColumnType extends ColumnDataType with Product with Serializable
  9. case object F64ColumnType extends ColumnDataType with Product with Serializable
  10. case object I64ColumnType extends ColumnDataType with Product with Serializable
  11. object Table extends Serializable
  12. object csv

Inherited from AnyRef

Inherited from Any