LRN

File structure

The *.lrn file contains the input data as tab separated values. Features in columns, datasets in rows. The first column should be a unique integer key. The optional header contains descriptions of the columns.

# comment
#
% n
% m
% s1          s2          ..      sm
% var_name1   var_name2   ..      var_namem
x11           x12         ..      x1m
x21           x22         ..      x2m
.             .           .       .
.             .           .       .
xn1           xn2         ..      xnm
ElementDescription
$n$Number of datasets
$m$Number of columns (including index)
$s_i$Type of column: 9 for unique key, 1 for data, 0 to ignore column
$var\_name_i$Name for the i-th feature
$x_{ij}$Elements of the data matrix. Decimal numbers denoted by '.', not by ','

Writing and Reading

DataIO.writeLRNFunction
writeLRN(filename::String, lrn::LRNData, directory=pwd())

Write the contents of a LRNData struct into a file.

DataIO.readLRNFunction
readLRN(filename::String, directory=pwd())

Read the contents of a *.lrn and return a LRNData struct.

Types and Constructors

DataIO.LRNDataType
LRNData

LRNData represents the contents of a *.lrn file with the following fields:

  • data::Matrix{Float64}

    Matrix of data, cases in rows, variables in columns

  • column_types::Array{LRNCType, 1}

    Column types, see LRNCType

  • key::Array{Integer, 1}

    Unique key for each line

  • names::Array{String, 1}

    Column names

  • key_name::String

    Name for key column

  • comment::String

    Comments about the data

DataIO.LRNDataMethod
LRNData(data::AbstractMatrix{Float64})

Convenience constructor for LRNData. Uses sensible defaults:

column_types=[9,1,1...]
key=[1,2,3...]
names=["C1","C2","C3"...]
key_name="Key"
comment=""
Missing docstring.

Missing docstring for LRNCType. Check Documenter's build log for details.