Make Yt Matrix
JudiLing.make_Yt_matrix
— FunctionMake Yt matrix for timestep t.
JudiLing.make_Yt_matrix
— Methodmake_Yt_matrix(t, data, f2i)
Make Yt matrix for timestep t. A given column of the Yt matrix specifies the support for the corresponding n-gram predicted for timestep t for each of the observations (rows of Yt).
Obligatory Arguments
t::Int64
: the timestep tdata::DataFrame
: the datasetf2i::Dict
: the dictionary returning indices given features
Optional Arguments
tokenized::Bool=false
: if true, the dataset target is assumed to be tokenizedsep_token::Union{Nothing, String, Char}=nothing
: separator tokenverbose::Bool=false
: if verbose, more information will be printed
Examples
latin = DataFrame(CSV.File(joinpath("data", "latin_mini.csv")))
JudiLing.make_Yt_matrix(2, latin)