Packages

object Relation extends Serializable

The Relation companion object provides additional functions for the Relation class.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Relation
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def apply(fileName: String, name: String): Relation

    Read the relation with the given 'name' into memory from a JSON file.

    Read the relation with the given 'name' into memory from a JSON file.

    fileName

    the file name of the JSON file

    name

    the name of the relation to load

  2. def apply(fileName: String, key: Int, domain: String): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the '.arff' file named 'fileName'.

    Read the relation with the given 'name' into memory loading its columns with data from the '.arff' file named 'fileName'.

    fileName

    the file name of the data file

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

  3. def apply(fileName: String, name: String, colName: Seq[String], key: Int, domain: String): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'. This version assumes defaults for 'eSep' and 'skip' of ("," and 0).

    fileName

    the file name of the data file

    name

    the name of the relation

    colName

    the names of columns

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

  4. def apply(fileName: String, name: String, domain: String, key: Int, eSep: String): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'. In this version, the column names are read from the first line of the file.

    fileName

    the file name of the data file

    name

    the name of the relation

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

    key

    the column number for the primary key (< 0 => no primary key)

    eSep

    the element separation string/regex (e.g., "," ";" " +")

  5. def apply(fileName: String, name: String, key: Int, domain: String, eSep: String): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'. In this version, the column names are read from the first line of the file.

    fileName

    the file name of the data file

    name

    the name of the relation

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

    eSep

    the element separation string/regex (e.g., "," ";" " +")

  6. def apply(fileName: String, name: String, colName: Seq[String], key: Int, domain: String, skip: Int, eSep: String): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    fileName

    the file name of the data file

    name

    the name of the relation

    colName

    the names of columns

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

    skip

    the number of lines in the CSV file to skip (e.g., header line(s))

    eSep

    the element separation string/regex (e.g., "," ";" " +")

  7. def apply(name: String): Relation

    Read the relation with the given 'name' into memory using serialization.

    Read the relation with the given 'name' into memory using serialization.

    name

    the name of the relation to load

  8. def apply(name: String, colName: Seq[String], row: Seq[Row], key: Int): Relation

    Create a relation from a sequence of row/tuples.

    Create a relation from a sequence of row/tuples. These rows must be converted to columns.

    name

    the name of the relation

    colName

    the names of columns

    row

    the sequence of rows to be converted to columns for the columnar relation

    key

    the column number for the primary key (< 0 => no primary key)

  9. def apply(name: String, colName: Seq[String], row: Seq[Row], key: Int, domain: String): Relation

    Create a relation from a sequence of row/tuples.

    Create a relation from a sequence of row/tuples. These rows must be converted to columns.

    name

    the name of the relation

    colName

    the names of columns

    row

    the sequence of rows to be converted to columns for the columnar relation

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

  10. def apply(name: String, key: Int, domain: String, colName: String*): Relation

    Create an unpopulated relation.

    Create an unpopulated relation.

    name

    the name of the relation

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

    colName

    the names of columns

  11. def corr(r: Relation, i: Int = 0, j: Int = 1): Double

    Compute the correlation of column 'i' and 'j' within columnar relation 'r'.

    Compute the correlation of column 'i' and 'j' within columnar relation 'r'.

    r

    the given relation

    i

    the first column vector

    j

    the second column vector

  12. def count(r: Relation): Seq[Any]

    Return the count (number of elements) of each of the columns of columnar relation 'r'.

    Return the count (number of elements) of each of the columns of columnar relation 'r'.

    r

    the given relation

  13. def fromMatriD(xy: MatriD, name: String, colName: Seq[String], key: Int = -1, domain: String = null): Relation

    Create a relation from the 'xy' matrix of doubles.

    Create a relation from the 'xy' matrix of doubles.

    xy

    the matrix containing the data

    name

    the name of the relation

    colName

    the names of columns

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

  14. def fromMatriD_(x: MatriD, y: Vec, name: String, colName: Seq[String], key: Int = -1, domain: String = null): Relation

    Create a relation from the 'x' matrix of doubles and 'y' vector of doubles or integers.

    Create a relation from the 'x' matrix of doubles and 'y' vector of doubles or integers.

    x

    the matrix containing the data

    y

    the vector containing the data

    name

    the name of the relation

    colName

    the names of columns

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

  15. def fromMatriI(xy: MatriI, name: String, colName: Seq[String], key: Int = -1, domain: String = null): Relation

    Create a relation from the 'xy' matrix of integers.

    Create a relation from the 'xy' matrix of integers.

    xy

    the matrix containing the data

    name

    the name of the relation

    colName

    the names of columns

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

  16. def fromMatriII(x: MatriI, y: VectorI, name: String, colName: Seq[String], key: Int = -1, domain: String = null): Relation

    Create a relation from the 'xy' matrix of integers and 'y' vector of integers.

    Create a relation from the 'xy' matrix of integers and 'y' vector of integers.

    x

    the matrix containing the data

    y

    the vector containing the data

    name

    the name of the relation

    colName

    the names of columns

    key

    the column number for the primary key (< 0 => no primary key)

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

  17. def max(r: Relation): Seq[Any]

    Return the maximum of each of the columns of columnar relation 'r'.

    Return the maximum of each of the columns of columnar relation 'r'.

    r

    the given relation

  18. def mean(r: Relation): Seq[Any]

    Compute the mean of each of the columns of columnar relation 'r'.

    Compute the mean of each of the columns of columnar relation 'r'.

    r

    the given relation

  19. def min(r: Relation): Seq[Any]

    Return the minimum of each of the columns of columnar relation 'r'.

    Return the minimum of each of the columns of columnar relation 'r'.

    r

    the given relation

  20. def sum(r: Relation): Seq[Any]

    Compute the mean of each of the columns of columnar relation 'r'.

    Compute the mean of each of the columns of columnar relation 'r'.

    r

    the given relation

  21. def variance(r: Relation): Seq[Any]

    Compute the variance of each of the columns of columnar relation 'r'.

    Compute the variance of each of the columns of columnar relation 'r'.

    r

    the given relation

  22. def Ɛ(r: Relation): Seq[Any]

    Compute the mean of each of the columns of columnar relation 'r'.

    Compute the mean of each of the columns of columnar relation 'r'.

    r

    the given relation

  23. def Ʋ(r: Relation): Seq[Any]

    Compute the variance of each of the columns of columnar relation 'r'.

    Compute the variance of each of the columns of columnar relation 'r'.

    r

    the given relation