Utils

JudiLing.wh_learnMethod
wh_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 rate
  • n_epochs::Int64=1: the number of epochs to be trained
  • weights::Matrix=nothing: the initial weights
  • learn_seq::Vector=nothing: the learning sequence
  • save_history::Bool=false: if true, a partical training history will be saved
  • history_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
source
JudiLing.make_learn_seqMethod
make_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.

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)
source