Utils
JudiLing.wh_learn
— Methodwh_learn(
X,
Y;
eta = 0.01,
n_epochs = 1,
weights = nothing,
learn_seq = nothing,
save_history = false,
history_cols = nothing,
history_rows = nothing,
verbose = false,
)
Widrow-Hoff Learning.
Obligatory Arguments
test_mode::Symbol
: which test mode, currently supports :trainonly, :presplit, :carefulsplit and :randomsplit.
Optional Arguments
eta::Float64=0.1
: the learning raten_epochs::Int64=1
: the number of epochs to be trainedweights::Matrix=nothing
: the initial weightslearn_seq::Vector=nothing
: the learning sequencesave_history::Bool=false
: if true, a partical training history will be savedhistory_cols::Vector=nothing
: the list of column indices you want to saved in history, e.g.[1,32,42]
or[2]
history_rows::Vector=nothing
: the list of row indices you want to saved in history, e.g.[1,32,42]
or[2]
verbose::Bool = false
: if true, more information will be printed out
JudiLing.make_learn_seq
— Methodmake_learn_seq(freq; random_seed = 314)
Make Widrow-Hoff learning sequence from frequencies. Creates a randomly ordered sequences of indices where each index appears according to its frequncy.
Though the generation of the learning sequence is controlled by a random seed, it may change across Julia versions, see here: https://docs.julialang.org/en/v1/stdlib/Random/
Obligatory arguments
freq
: Vector with frequencies.
Optional arguments
random_seed = 314
: Random seed to control randomness.
Example
learn_seq = JudiLing.make_learn_seq(data.frequency)