From dd652c136ddc24c1222fcece3f77bfcf8fbe0dac Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 28 Sep 2023 11:31:30 +0000 Subject: [PATCH] build based on ae1c20d --- dev/index.html | 2 +- dev/man/all_manual/index.html | 2 +- dev/man/cholesky/index.html | 8 +++--- dev/man/display/index.html | 4 +-- dev/man/eval/index.html | 24 ++++++++-------- dev/man/find_path/index.html | 4 +-- dev/man/make_adjacency_matrix/index.html | 6 ++-- dev/man/make_cue_matrix/index.html | 10 +++---- dev/man/make_semantic_matrix/index.html | 36 ++++++++++++------------ dev/man/make_yt_matrix/index.html | 4 +-- dev/man/output/index.html | 14 ++++----- dev/man/pickle/index.html | 2 +- dev/man/preprocess/index.html | 2 +- dev/man/pyndl/index.html | 2 +- dev/man/test_combo/index.html | 2 +- dev/man/utils/index.html | 6 ++-- dev/man/wh/index.html | 2 +- dev/search/index.html | 2 +- 18 files changed, 66 insertions(+), 66 deletions(-) diff --git a/dev/index.html b/dev/index.html index b988e70..197132e 100644 --- a/dev/index.html +++ b/dev/index.html @@ -638,4 +638,4 @@ n_features_inflections = ["Person","Number","Tense","Voice","Mood"], output_dir = joinpath(@__DIR__, "latin_out"), verbose = true - )

Citation

If you find this package helpful, please cite this as follow:

Luo, X., Chuang, Y. Y., Baayen, R. H. JudiLing: an implementation in Julia of Linear Discriminative Learning algorithms for language model. Eberhard Karls Universität Tübingen, Seminar für Sprachwissenschaft.

The following studies have made use of several algorithms now implemented in JudiLing instead of WpmWithLdl:

+ )

Citation

If you find this package helpful, please cite this as follow:

Luo, X., Chuang, Y. Y., Baayen, R. H. JudiLing: an implementation in Julia of Linear Discriminative Learning algorithms for language model. Eberhard Karls Universität Tübingen, Seminar für Sprachwissenschaft.

The following studies have made use of several algorithms now implemented in JudiLing instead of WpmWithLdl:

diff --git a/dev/man/all_manual/index.html b/dev/man/all_manual/index.html index 4411acd..7768fba 100644 --- a/dev/man/all_manual/index.html +++ b/dev/man/all_manual/index.html @@ -1,2 +1,2 @@ -All Manual index · JudiLing.jl
+All Manual index · JudiLing.jl
diff --git a/dev/man/cholesky/index.html b/dev/man/cholesky/index.html index 2f5ec40..034e924 100644 --- a/dev/man/cholesky/index.html +++ b/dev/man/cholesky/index.html @@ -1,5 +1,5 @@ -Cholesky · JudiLing.jl

Cholesky

JudiLing.make_transform_facFunction

The first part of make transform matrix, usually used by the learn_paths function to save time and computing resources.

source
JudiLing.make_transform_matrixMethod
make_transform_matrix(fac::Union{LinearAlgebra.Cholesky, SuiteSparse.CHOLMOD.Factor}, X::Union{SparseMatrixCSC, Matrix}, Y::Union{SparseMatrixCSC, Matrix})

Second step in calculating the Cholesky decomposition for the transformation matrix.

source
JudiLing.make_transform_matrixMethod
make_transform_matrix(X::SparseMatrixCSC, Y::Matrix)

Use Cholesky decomposition to calculate the transformation matrix from X to Y, where X is a sparse matrix and Y is a dense matrix.

Obligatory Arguments

  • X::SparseMatrixCSC: the X matrix, where X is a sparse matrix
  • Y::Matrix: the Y matrix, where Y is a dense matrix

Optional Arguments

  • method::Symbol = :additive: whether :additive or :multiplicative decomposition is required
  • shift::Float64 = 0.02: shift value for :additive decomposition
  • multiplier::Float64 = 1.01: multiplier value for :multiplicative decomposition
  • output_format::Symbol = :auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Float64 = 0.05: the ratio to decide whether a matrix is sparse
  • verbose::Bool = false: if true, more information will be printed out

Examples

# additive mode
+Cholesky · JudiLing.jl

Cholesky

JudiLing.make_transform_facFunction

The first part of make transform matrix, usually used by the learn_paths function to save time and computing resources.

source
JudiLing.make_transform_matrixMethod
make_transform_matrix(fac::Union{LinearAlgebra.Cholesky, SuiteSparse.CHOLMOD.Factor}, X::Union{SparseMatrixCSC, Matrix}, Y::Union{SparseMatrixCSC, Matrix})

Second step in calculating the Cholesky decomposition for the transformation matrix.

source
JudiLing.make_transform_matrixMethod
make_transform_matrix(X::SparseMatrixCSC, Y::Matrix)

Use Cholesky decomposition to calculate the transformation matrix from X to Y, where X is a sparse matrix and Y is a dense matrix.

Obligatory Arguments

  • X::SparseMatrixCSC: the X matrix, where X is a sparse matrix
  • Y::Matrix: the Y matrix, where Y is a dense matrix

Optional Arguments

  • method::Symbol = :additive: whether :additive or :multiplicative decomposition is required
  • shift::Float64 = 0.02: shift value for :additive decomposition
  • multiplier::Float64 = 1.01: multiplier value for :multiplicative decomposition
  • output_format::Symbol = :auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Float64 = 0.05: the ratio to decide whether a matrix is sparse
  • verbose::Bool = false: if true, more information will be printed out

Examples

# additive mode
 JudiLing.make_transform_matrix(
     C,
     S,
@@ -20,7 +20,7 @@
   ...
     output_format = :auto,
     sparse_ratio = 0.05,
-  ...)
source
JudiLing.make_transform_matrixMethod
make_transform_matrix(X::Matrix, Y::Union{SparseMatrixCSC, Matrix})

Use the Cholesky decomposition to calculate the transformation matrix from X to Y, where X is a dense matrix and Y is either a dense matrix or a sparse matrix.

Obligatory Arguments

  • X::Matrix: the X matrix, where X is a dense matrix
  • Y::Union{SparseMatrixCSC, Matrix}: the Y matrix, where Y is either a sparse or a dense matrix

Optional Arguments

  • method::Symbol = :additive: whether :additive or :multiplicative decomposition is required
  • shift::Float64 = 0.02: shift value for :additive decomposition
  • multiplier::Float64 = 1.01: multiplier value for :multiplicative decomposition
  • output_format::Symbol = :auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Float64 = 0.05: the ratio to decide whether a matrix is sparse
  • verbose::Bool = false: if true, more information will be printed out

Examples

# additive mode
+  ...)
source
JudiLing.make_transform_matrixMethod
make_transform_matrix(X::Matrix, Y::Union{SparseMatrixCSC, Matrix})

Use the Cholesky decomposition to calculate the transformation matrix from X to Y, where X is a dense matrix and Y is either a dense matrix or a sparse matrix.

Obligatory Arguments

  • X::Matrix: the X matrix, where X is a dense matrix
  • Y::Union{SparseMatrixCSC, Matrix}: the Y matrix, where Y is either a sparse or a dense matrix

Optional Arguments

  • method::Symbol = :additive: whether :additive or :multiplicative decomposition is required
  • shift::Float64 = 0.02: shift value for :additive decomposition
  • multiplier::Float64 = 1.01: multiplier value for :multiplicative decomposition
  • output_format::Symbol = :auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Float64 = 0.05: the ratio to decide whether a matrix is sparse
  • verbose::Bool = false: if true, more information will be printed out

Examples

# additive mode
 JudiLing.make_transform_matrix(
     C,
     S,
@@ -41,7 +41,7 @@
     ...
     output_format = :auto,
     sparse_ratio = 0.05,
-    ...)
source
JudiLing.make_transform_matrixMethod
make_transform_matrix(X::SparseMatrixCSC, Y::SparseMatrixCSC)

Use the Cholesky decomposition to calculate the transformation matrix from X to Y, where X is a sparse matrix and Y is a sparse matrix.

Obligatory Arguments

  • X::SparseMatrixCSC: the X matrix, where X is a sparse matrix
  • Y::SparseMatrixCSC: the Y matrix, where Y is a sparse matrix

Optional Arguments

  • method::Symbol = :additive: whether :additive or :multiplicative decomposition is required
  • shift::Float64 = 0.02: shift value for :additive decomposition
  • multiplier::Float64 = 1.01: multiplier value for :multiplicative decomposition
  • output_format::Symbol = :auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Float64 = 0.05: the ratio to decide whether a matrix is sparse
  • verbose::Bool = false: if true, more information will be printed out

Examples

# additive mode
+    ...)
source
JudiLing.make_transform_matrixMethod
make_transform_matrix(X::SparseMatrixCSC, Y::SparseMatrixCSC)

Use the Cholesky decomposition to calculate the transformation matrix from X to Y, where X is a sparse matrix and Y is a sparse matrix.

Obligatory Arguments

  • X::SparseMatrixCSC: the X matrix, where X is a sparse matrix
  • Y::SparseMatrixCSC: the Y matrix, where Y is a sparse matrix

Optional Arguments

  • method::Symbol = :additive: whether :additive or :multiplicative decomposition is required
  • shift::Float64 = 0.02: shift value for :additive decomposition
  • multiplier::Float64 = 1.01: multiplier value for :multiplicative decomposition
  • output_format::Symbol = :auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Float64 = 0.05: the ratio to decide whether a matrix is sparse
  • verbose::Bool = false: if true, more information will be printed out

Examples

# additive mode
 JudiLing.make_transform_matrix(
     C,
     S,
@@ -62,4 +62,4 @@
     ...
     output_format = :auto,
     sparse_ratio = 0.05,
-    ...)
source
JudiLing.format_matrixFunction
format_matrix(M::Union{SparseMatrixCSC, Matrix}, output_format=:auto)

Convert output matrix format to either a dense matrix or a sparse matrix.

source
+ ...)
source
JudiLing.format_matrixFunction
format_matrix(M::Union{SparseMatrixCSC, Matrix}, output_format=:auto)

Convert output matrix format to either a dense matrix or a sparse matrix.

source
diff --git a/dev/man/display/index.html b/dev/man/display/index.html index fa9cc75..ad23c63 100644 --- a/dev/man/display/index.html +++ b/dev/man/display/index.html @@ -1,9 +1,9 @@ -Display · JudiLing.jl

Cholesky

JudiLing.display_matrixMethod
display_matrix(data, target_col, cue_obj, M, M_type)

Display matrix with rownames and colnames.

Obligatory Arguments

  • data::DataFrame: the dataset
  • target_col::Union{String, Symbol}: the target column name
  • cue_obj::Cue_Matrix_Struct: the cue matrix structure
  • M::Union{SparseMatrixCSC, Matrix}: the matrix
  • M_type::Union{String, Symbol}: the type of the matrix, currently support :C, :S, :F, :G, :Chat, :Shat, :A and :R

Optional Arguments

  • nrow::Int64 = 6: the number of rows to display
  • ncol::Int64 = 6: the number of columns to display
  • return_matrix::Bool = false: whether the created dataframe should be returned (and not only displayed)

Examples

JudiLing.display_matrix(latin, :Word, cue_obj, cue_obj.C, :C)
+Display · JudiLing.jl

Cholesky

JudiLing.display_matrixMethod
display_matrix(data, target_col, cue_obj, M, M_type)

Display matrix with rownames and colnames.

Obligatory Arguments

  • data::DataFrame: the dataset
  • target_col::Union{String, Symbol}: the target column name
  • cue_obj::Cue_Matrix_Struct: the cue matrix structure
  • M::Union{SparseMatrixCSC, Matrix}: the matrix
  • M_type::Union{String, Symbol}: the type of the matrix, currently support :C, :S, :F, :G, :Chat, :Shat, :A and :R

Optional Arguments

  • nrow::Int64 = 6: the number of rows to display
  • ncol::Int64 = 6: the number of columns to display
  • return_matrix::Bool = false: whether the created dataframe should be returned (and not only displayed)

Examples

JudiLing.display_matrix(latin, :Word, cue_obj, cue_obj.C, :C)
 JudiLing.display_matrix(latin, :Word, cue_obj, S, :S)
 JudiLing.display_matrix(latin, :Word, cue_obj, G, :G)
 JudiLing.display_matrix(latin, :Word, cue_obj, Chat, :Chat)
 JudiLing.display_matrix(latin, :Word, cue_obj, F, :F)
 JudiLing.display_matrix(latin, :Word, cue_obj, Shat, :Shat)
 JudiLing.display_matrix(latin, :Word, cue_obj, A, :A)
-JudiLing.display_matrix(latin, :Word, cue_obj, R, :R)
source
+JudiLing.display_matrix(latin, :Word, cue_obj, R, :R)
source
diff --git a/dev/man/eval/index.html b/dev/man/eval/index.html index 6029719..7d0dd2e 100644 --- a/dev/man/eval/index.html +++ b/dev/man/eval/index.html @@ -1,5 +1,5 @@ -Evaluation · JudiLing.jl

Evaluation

JudiLing.eval_SCFunction

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. Homophones support option is implemented.

source
JudiLing.eval_SC_looseFunction

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Count it as correct if one of the top k candidates is correct. Homophones support option is implemented.

source
JudiLing.accuracy_comprehensionMethod
accuracy_comprehension(S, Shat, data)

Evaluate comprehension accuracy.

Obligatory Arguments

  • S::Matrix: the (gold standard) S matrix
  • Shat::Matrix: the (predicted) Shat matrix
  • data::DataFrame: the dataset

Optional Arguments

  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • base::Vector=nothing: base features (typically a lexeme)
  • inflections::Union{Nothing, Vector}=nothing: other features (typically in inflectional features)

Examples

accuracy_comprehension(
+Evaluation · JudiLing.jl

Evaluation

JudiLing.eval_SCFunction

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. Homophones support option is implemented.

source
JudiLing.eval_SC_looseFunction

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Count it as correct if one of the top k candidates is correct. Homophones support option is implemented.

source
JudiLing.accuracy_comprehensionMethod
accuracy_comprehension(S, Shat, data)

Evaluate comprehension accuracy.

Obligatory Arguments

  • S::Matrix: the (gold standard) S matrix
  • Shat::Matrix: the (predicted) Shat matrix
  • data::DataFrame: the dataset

Optional Arguments

  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • base::Vector=nothing: base features (typically a lexeme)
  • inflections::Union{Nothing, Vector}=nothing: other features (typically in inflectional features)

Examples

accuracy_comprehension(
     S_train,
     Shat_train,
     latin_val,
@@ -15,27 +15,27 @@
     target_col=:Words,
     base=["Lexeme"],
     inflections=[:Person, :Number, :Tense, :Voice, :Mood]
-    )
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C)
+    )
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C)
 eval_SC(Chat_val, cue_obj_val.C)
 eval_SC(Shat_train, S_train)
-eval_SC(Shat_val, S_val)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, SC_rest::AbstractArray)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices.

Note

The order is important. The fist gold standard matrix has to be corresponing to the SChat matrix, such as eval_SC(Shat_train, S_train, S_val) or eval_SC(Shat_val, S_val, S_train)

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the training/validation C or S matrix
  • SC_rest::Union{SparseMatrixCSC, Matrix}: the validation/training C or S matrix

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C, cue_obj_val.C)
+eval_SC(Shat_val, S_val)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, SC_rest::AbstractArray)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices.

Note

The order is important. The fist gold standard matrix has to be corresponing to the SChat matrix, such as eval_SC(Shat_train, S_train, S_val) or eval_SC(Shat_val, S_val, S_train)

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the training/validation C or S matrix
  • SC_rest::Union{SparseMatrixCSC, Matrix}: the validation/training C or S matrix

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C, cue_obj_val.C)
 eval_SC(Chat_val, cue_obj_val.C, cue_obj_train.C)
 eval_SC(Shat_train, S_train, S_val)
-eval_SC(Shat_val, S_val, S_train)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, data::DataFrame, target_col::Union{String, Symbol})

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. Support for homophones.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix
  • data::DataFrame: datasets
  • target_col::Union{String, Symbol}: target column name

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C, latin, :Word)
+eval_SC(Shat_val, S_val, S_train)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, data::DataFrame, target_col::Union{String, Symbol})

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. Support for homophones.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix
  • data::DataFrame: datasets
  • target_col::Union{String, Symbol}: target column name

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C, latin, :Word)
 eval_SC(Chat_val, cue_obj_val.C, latin, :Word)
 eval_SC(Shat_train, S_train, latin, :Word)
-eval_SC(Shat_val, S_val, latin, :Word)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, SC_rest::AbstractArray, data::DataFrame, data_rest::DataFrame, target_col::Union{String, Symbol})

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices.

Note

The order is important. The fist gold standard matrix has to be corresponing to the SChat matrix, such as eval_SC(Shat_train, S_train, S_val, latin, :Word) or eval_SC(Shat_val, S_val, S_train, latin, :Word)

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the training/validation C or S matrix
  • SC_rest::Union{SparseMatrixCSC, Matrix}: the validation/training C or S matrix
  • data::DataFrame: the training/validation datasets
  • data_rest::DataFrame: the validation/training datasets
  • target_col::Union{String, Symbol}: target column name

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C, cue_obj_val.C, latin, :Word)
+eval_SC(Shat_val, S_val, latin, :Word)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, SC_rest::AbstractArray, data::DataFrame, data_rest::DataFrame, target_col::Union{String, Symbol})

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices.

Note

The order is important. The fist gold standard matrix has to be corresponing to the SChat matrix, such as eval_SC(Shat_train, S_train, S_val, latin, :Word) or eval_SC(Shat_val, S_val, S_train, latin, :Word)

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the training/validation C or S matrix
  • SC_rest::Union{SparseMatrixCSC, Matrix}: the validation/training C or S matrix
  • data::DataFrame: the training/validation datasets
  • data_rest::DataFrame: the validation/training datasets
  • target_col::Union{String, Symbol}: target column name

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • R::Bool=false: if true, pairwise correlation matrix R is return
eval_SC(Chat_train, cue_obj_train.C, cue_obj_val.C, latin, :Word)
 eval_SC(Chat_val, cue_obj_val.C, cue_obj_train.C, latin, :Word)
 eval_SC(Shat_train, S_train, S_val, latin, :Word)
-eval_SC(Shat_val, S_val, S_train, latin, :Word)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, batch_size::Int64)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. For large datasets, pass batch_size to process evaluation in chucks.

Obligatory Arguments

  • SChat: the Chat or Shat matrix
  • SC: the C or S matrix
  • data: datasets
  • target_col: target column name
  • batch_size: batch size

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed
eval_SC(Chat_train, cue_obj_train.C, latin, :Word)
+eval_SC(Shat_val, S_val, S_train, latin, :Word)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, batch_size::Int64)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. For large datasets, pass batch_size to process evaluation in chucks.

Obligatory Arguments

  • SChat: the Chat or Shat matrix
  • SC: the C or S matrix
  • data: datasets
  • target_col: target column name
  • batch_size: batch size

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed
eval_SC(Chat_train, cue_obj_train.C, latin, :Word)
 eval_SC(Chat_val, cue_obj_val.C, latin, :Word)
 eval_SC(Shat_train, S_train, latin, :Word)
-eval_SC(Shat_val, S_val, latin, :Word)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, data::DataFrame, target_col::Union{String, Symbol}, batch_size::Int64)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. For large datasets, pass batch_size to process evaluation in chucks. Support homophones.

Obligatory Arguments

  • SChat::AbstractArray: the Chat or Shat matrix
  • SC::AbstractArray: the C or S matrix
  • data::DataFrame: datasets
  • target_col::Union{String, Symbol}: target column name
  • batch_size::Int64: batch size

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed
eval_SC(Chat_train, cue_obj_train.C, latin, :Word, 5000)
+eval_SC(Shat_val, S_val, latin, :Word)
source
JudiLing.eval_SCMethod
eval_SC(SChat::AbstractArray, SC::AbstractArray, data::DataFrame, target_col::Union{String, Symbol}, batch_size::Int64)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Ideally the target words have highest correlations on the diagonal of the pertinent correlation matrices. For large datasets, pass batch_size to process evaluation in chucks. Support homophones.

Obligatory Arguments

  • SChat::AbstractArray: the Chat or Shat matrix
  • SC::AbstractArray: the C or S matrix
  • data::DataFrame: datasets
  • target_col::Union{String, Symbol}: target column name
  • batch_size::Int64: batch size

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed
eval_SC(Chat_train, cue_obj_train.C, latin, :Word, 5000)
 eval_SC(Chat_val, cue_obj_val.C, latin, :Word, 5000)
 eval_SC(Shat_train, S_train, latin, :Word, 5000)
-eval_SC(Shat_val, S_val, latin, :Word, 5000)
source
JudiLing.eval_SC_looseMethod
eval_SC_loose(SChat, SC, k)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Count it as correct if one of the top k candidates is correct.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix
  • k: top k candidates

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
eval_SC_loose(Chat, cue_obj.C, k)
-eval_SC_loose(Shat, S, k)
source
JudiLing.eval_SC_looseMethod
eval_SC_loose(SChat, SC, k, data, target_col)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Count it as correct if one of the top k candidates is correct. Support for homophones.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix
  • k: top k candidates
  • data: datasets
  • target_col: target column name

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
eval_SC_loose(Chat, cue_obj.C, k, latin, :Word)
-eval_SC_loose(Shat, S, k, latin, :Word)
source
JudiLing.eval_manualMethod
eval_manual(res, data, i2f)

Create extensive reports for the outputs from build_paths and learn_paths.

source
JudiLing.eval_accMethod
eval_acc(res, gold_inds::Array)

Evaluate the accuracy of the results from learn_paths or build_paths.

Obligatory Arguments

  • res::Array: the results from learn_paths or build_paths
  • gold_inds::Array: the gold paths' indices

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed

Examples

# evaluation on training data
+eval_SC(Shat_val, S_val, latin, :Word, 5000)
source
JudiLing.eval_SC_looseMethod
eval_SC_loose(SChat, SC, k)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Count it as correct if one of the top k candidates is correct.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix
  • k: top k candidates

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
eval_SC_loose(Chat, cue_obj.C, k)
+eval_SC_loose(Shat, S, k)
source
JudiLing.eval_SC_looseMethod
eval_SC_loose(SChat, SC, k, data, target_col)

Assess model accuracy on the basis of the correlations of row vectors of Chat and C or Shat and S. Count it as correct if one of the top k candidates is correct. Support for homophones.

Obligatory Arguments

  • SChat::Union{SparseMatrixCSC, Matrix}: the Chat or Shat matrix
  • SC::Union{SparseMatrixCSC, Matrix}: the C or S matrix
  • k: top k candidates
  • data: datasets
  • target_col: target column name

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
eval_SC_loose(Chat, cue_obj.C, k, latin, :Word)
+eval_SC_loose(Shat, S, k, latin, :Word)
source
JudiLing.eval_manualMethod
eval_manual(res, data, i2f)

Create extensive reports for the outputs from build_paths and learn_paths.

source
JudiLing.eval_accMethod
eval_acc(res, gold_inds::Array)

Evaluate the accuracy of the results from learn_paths or build_paths.

Obligatory Arguments

  • res::Array: the results from learn_paths or build_paths
  • gold_inds::Array: the gold paths' indices

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed

Examples

# evaluation on training data
 acc_train = JudiLing.eval_acc(
     res_train,
     cue_obj_train.gold_ind,
@@ -47,7 +47,7 @@
     res_val,
     cue_obj_val.gold_ind,
     verbose=false
-)
source
JudiLing.eval_accMethod
eval_acc(res, cue_obj::Cue_Matrix_Struct)

Evaluate the accuracy of the results from learn_paths or build_paths.

Obligatory Arguments

  • res::Array: the results from learn_paths or build_paths
  • cue_obj::Cue_Matrix_Struct: the C matrix object

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed

Examples

acc = JudiLing.eval_acc(res, cue_obj)
source
JudiLing.eval_acc_looseMethod
eval_acc_loose(res, gold_inds)

Lenient evaluation of the accuracy of the results from learn_paths or build_paths, counting a prediction as correct when the correlation of the predicted and gold standard semantic vectors is among the n top correlations, where n is equal to max_can in the 'learnpaths' or `buildpaths` function.

Obligatory Arguments

  • res::Array: the results from learn_paths or build_paths
  • gold_inds::Array: the gold paths' indices

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed

Examples

# evaluation on training data
+)
source
JudiLing.eval_accMethod
eval_acc(res, cue_obj::Cue_Matrix_Struct)

Evaluate the accuracy of the results from learn_paths or build_paths.

Obligatory Arguments

  • res::Array: the results from learn_paths or build_paths
  • cue_obj::Cue_Matrix_Struct: the C matrix object

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed

Examples

acc = JudiLing.eval_acc(res, cue_obj)
source
JudiLing.eval_acc_looseMethod
eval_acc_loose(res, gold_inds)

Lenient evaluation of the accuracy of the results from learn_paths or build_paths, counting a prediction as correct when the correlation of the predicted and gold standard semantic vectors is among the n top correlations, where n is equal to max_can in the 'learnpaths' or `buildpaths` function.

Obligatory Arguments

  • res::Array: the results from learn_paths or build_paths
  • gold_inds::Array: the gold paths' indices

Optional Arguments

  • digits: the specified number of digits after the decimal place (or before if negative)
  • verbose::Bool=false: if true, more information is printed

Examples

# evaluation on training data
 acc_train_loose = JudiLing.eval_acc_loose(
     res_train,
     cue_obj_train.gold_ind,
@@ -59,4 +59,4 @@
     res_val,
     cue_obj_val.gold_ind,
     verbose=false
-)
source
JudiLing.extract_gpiFunction

extract_gpi(gpi, threshold=0.1, tolerance=(-1000.0))

Extract, using gold paths' information, how many n-grams for a gold path are below the threshold but above the tolerance.

source
+)
source
JudiLing.extract_gpiFunction

extract_gpi(gpi, threshold=0.1, tolerance=(-1000.0))

Extract, using gold paths' information, how many n-grams for a gold path are below the threshold but above the tolerance.

source
diff --git a/dev/man/find_path/index.html b/dev/man/find_path/index.html index 7885ff1..441ff8b 100644 --- a/dev/man/find_path/index.html +++ b/dev/man/find_path/index.html @@ -1,5 +1,5 @@ -Find Paths · JudiLing.jl

Find Paths

JudiLing.Gold_Path_Info_StructType

Store gold paths' information including indices and indices' support and total support. It can be used to evaluate how low the threshold needs to be set in order to find most of the correct paths or if set very low, all of the correct paths.

source
JudiLing.learn_pathsFunction

A sequence finding algorithm using discrimination learning to predict, for a given word, which n-grams are best supported for a given position in the sequence of n-grams.

source
JudiLing.build_pathsFunction

The build_paths function constructs paths by only considering those n-grams that are close to the target. It first takes the predicted c-hat vector and finds the closest n neighbors in the C matrix. Then it selects all n-grams of these neighbors, and constructs all valid paths with those n-grams. The path producing the best correlation with the target semantic vector (through synthesis by analysis) is selected.

source
Missing docstring.

Missing docstring for learn_paths(data, cue_obj, S_val, F_train, Chat_val). Check Documenter's build log for details.

Missing docstring.

Missing docstring for learn_paths(data_train, data_val, C_train, S_val, F_train, Chat_val, A, i2f, f2i). Check Documenter's build log for details.

JudiLing.build_pathsMethod
build_paths(data_val, C_train, S_val, F_train, Chat_val, A, i2f, C_train_ind)

The build_paths function constructs paths by only considering those n-grams that are close to the target. It first takes the predicted c-hat vector and finds the closest n neighbors in the C matrix. Then it selects all n-grams of these neighbors, and constructs all valid paths with those n-grams. The path producing the best correlation with the target semantic vector (through synthesis by analysis) is selected.

Obligatory Arguments

  • data::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • C_train::SparseMatrixCSC: the C matrix for the training dataset
  • S_val::Union{SparseMatrixCSC, Matrix}: the S matrix for the validation dataset
  • F_train::Union{SparseMatrixCSC, Matrix}: the F matrix for the training dataset
  • Chat_val::Matrix: the Chat matrix for the validation dataset
  • A::SparseMatrixCSC: the adjacency matrix
  • i2f::Dict: the dictionary returning features given indices
  • C_train_ind::Array: the gold paths' indices for the training dataset

Optional Arguments

  • rC::Union{Nothing, Matrix}=nothing: correlation Matrix of C and Chat, specify to save computing time
  • max_t::Int64=15: maximum number of timesteps
  • max_can::Int64=10: maximum number of candidates to consider
  • n_neighbors::Int64=10: the top n form neighbors to be considered
  • grams::Int64=3: the number n of grams that make up n-grams
  • tokenized::Bool=false: if true, the dataset target is tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • target_col::Union{String, :Symbol}=:Words: the column name for target strings
  • if_pca::Bool=false: turn on to enable pca mode
  • pca_eval_M::Matrix=nothing: pass original F for pca mode
  • verbose::Bool=false: if true, more information will be printed

Examples

# training dataset
+Find Paths · JudiLing.jl

Find Paths

JudiLing.Gold_Path_Info_StructType

Store gold paths' information including indices and indices' support and total support. It can be used to evaluate how low the threshold needs to be set in order to find most of the correct paths or if set very low, all of the correct paths.

source
JudiLing.learn_pathsFunction

A sequence finding algorithm using discrimination learning to predict, for a given word, which n-grams are best supported for a given position in the sequence of n-grams.

source
JudiLing.build_pathsFunction

The build_paths function constructs paths by only considering those n-grams that are close to the target. It first takes the predicted c-hat vector and finds the closest n neighbors in the C matrix. Then it selects all n-grams of these neighbors, and constructs all valid paths with those n-grams. The path producing the best correlation with the target semantic vector (through synthesis by analysis) is selected.

source
Missing docstring.

Missing docstring for learn_paths(data, cue_obj, S_val, F_train, Chat_val). Check Documenter's build log for details.

Missing docstring.

Missing docstring for learn_paths(data_train, data_val, C_train, S_val, F_train, Chat_val, A, i2f, f2i). Check Documenter's build log for details.

JudiLing.build_pathsMethod
build_paths(data_val, C_train, S_val, F_train, Chat_val, A, i2f, C_train_ind)

The build_paths function constructs paths by only considering those n-grams that are close to the target. It first takes the predicted c-hat vector and finds the closest n neighbors in the C matrix. Then it selects all n-grams of these neighbors, and constructs all valid paths with those n-grams. The path producing the best correlation with the target semantic vector (through synthesis by analysis) is selected.

Obligatory Arguments

  • data::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • C_train::SparseMatrixCSC: the C matrix for the training dataset
  • S_val::Union{SparseMatrixCSC, Matrix}: the S matrix for the validation dataset
  • F_train::Union{SparseMatrixCSC, Matrix}: the F matrix for the training dataset
  • Chat_val::Matrix: the Chat matrix for the validation dataset
  • A::SparseMatrixCSC: the adjacency matrix
  • i2f::Dict: the dictionary returning features given indices
  • C_train_ind::Array: the gold paths' indices for the training dataset

Optional Arguments

  • rC::Union{Nothing, Matrix}=nothing: correlation Matrix of C and Chat, specify to save computing time
  • max_t::Int64=15: maximum number of timesteps
  • max_can::Int64=10: maximum number of candidates to consider
  • n_neighbors::Int64=10: the top n form neighbors to be considered
  • grams::Int64=3: the number n of grams that make up n-grams
  • tokenized::Bool=false: if true, the dataset target is tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • target_col::Union{String, :Symbol}=:Words: the column name for target strings
  • if_pca::Bool=false: turn on to enable pca mode
  • pca_eval_M::Matrix=nothing: pass original F for pca mode
  • verbose::Bool=false: if true, more information will be printed

Examples

# training dataset
 JudiLing.build_paths(
     latin_train,
     cue_obj_train.C,
@@ -44,4 +44,4 @@
     pca_eval_M=Fo,
     n_neighbors=3,
     verbose=true
-    )
source
Missing docstring.

Missing docstring for learn_paths_rpi(data_train, data_val, C_train, S_val, F_train, Chat_val, A, i2f, f2i). Check Documenter's build log for details.

JudiLing.eval_canMethod
eval_can(candidates, S, F::Union{Matrix,SparseMatrixCSC, Chain}, i2f, max_can, if_pca, pca_eval_M)

Calculate for each candidate path the correlation between predicted semantic vector and the gold standard semantic vector, and select as target for production the path with the highest correlation.

source
+ )
source
Missing docstring.

Missing docstring for learn_paths_rpi(data_train, data_val, C_train, S_val, F_train, Chat_val, A, i2f, f2i). Check Documenter's build log for details.

JudiLing.eval_canMethod
eval_can(candidates, S, F::Union{Matrix,SparseMatrixCSC, Chain}, i2f, max_can, if_pca, pca_eval_M)

Calculate for each candidate path the correlation between predicted semantic vector and the gold standard semantic vector, and select as target for production the path with the highest correlation.

source
diff --git a/dev/man/make_adjacency_matrix/index.html b/dev/man/make_adjacency_matrix/index.html index ebfaa76..cbe2ecb 100644 --- a/dev/man/make_adjacency_matrix/index.html +++ b/dev/man/make_adjacency_matrix/index.html @@ -8,7 +8,7 @@ JudiLing.make_adjacency_matrix( i2f, tokenized=true, - sep_token="-")source
JudiLing.make_full_adjacency_matrixMethod
make_adjacency_matrix(i2f)

Make full adjacency matrix based only on the form of n-grams regardless of whether they are seen in the training data. This usually takes hours for large datasets, as all possible combinations are considered.

Obligatory Arguments

  • i2f::Dict: the dictionary returning features given indices

Optional Arguments

  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator token
  • verbose::Bool=false: if true, more information will be printed

Examples

# without tokenization
+    sep_token="-")
source
JudiLing.make_full_adjacency_matrixMethod
make_adjacency_matrix(i2f)

Make full adjacency matrix based only on the form of n-grams regardless of whether they are seen in the training data. This usually takes hours for large datasets, as all possible combinations are considered.

Obligatory Arguments

  • i2f::Dict: the dictionary returning features given indices

Optional Arguments

  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator token
  • verbose::Bool=false: if true, more information will be printed

Examples

# without tokenization
 i2f = Dict([(1, "#ab"), (2, "abc"), (3, "bc#"), (4, "#bc"), (5, "ab#")])
 JudiLing.make_adjacency_matrix(i2f)
 
@@ -17,11 +17,11 @@
 JudiLing.make_adjacency_matrix(
     i2f,
     tokenized=true,
-    sep_token="-")
source
JudiLing.make_combined_adjacency_matrixMethod
make_combined_adjacency_matrix(data_train, data_val)

Make combined adjacency matrix.

Obligatory Arguments

  • data_train::DataFrame: training dataset
  • data_val::DataFrame: validation dataset

Optional Arguments

  • grams=3: the number of grams for cues
  • target_col=:Words: the column name for target strings
  • tokenized=false:if true, the dataset target is assumed to be tokenized
  • sep_token=nothing: separator
  • keep_sep=false: if true, keep separators in cues
  • start_end_token="#": start and end token in boundary cues
  • verbose=false: if true, more information is printed

Examples

JudiLing.make_combined_adjacency_matrix(
+    sep_token="-")
source
JudiLing.make_combined_adjacency_matrixMethod
make_combined_adjacency_matrix(data_train, data_val)

Make combined adjacency matrix.

Obligatory Arguments

  • data_train::DataFrame: training dataset
  • data_val::DataFrame: validation dataset

Optional Arguments

  • grams=3: the number of grams for cues
  • target_col=:Words: the column name for target strings
  • tokenized=false:if true, the dataset target is assumed to be tokenized
  • sep_token=nothing: separator
  • keep_sep=false: if true, keep separators in cues
  • start_end_token="#": start and end token in boundary cues
  • verbose=false: if true, more information is printed

Examples

JudiLing.make_combined_adjacency_matrix(
     latin_train,
     latin_val,
     grams=3,
     target_col=:Word,
     tokenized=false,
     keep_sep=false
-    )
source
+ )source diff --git a/dev/man/make_cue_matrix/index.html b/dev/man/make_cue_matrix/index.html index 1c311c0..47bafb8 100644 --- a/dev/man/make_cue_matrix/index.html +++ b/dev/man/make_cue_matrix/index.html @@ -1,5 +1,5 @@ -Make Cue Matrix · JudiLing.jl

Make Cue Matrix

JudiLing.Cue_Matrix_StructType

A structure that stores information created by makecuematrix: C is the cue matrix; f2i is a dictionary returning the indices for features; i2f is a dictionary returning the features for indices; goldind is a list of indices of gold paths; A is the adjacency matrix; grams is the number of grams for cues; targetcol is the column name for target strings; tokenized is whether the dataset target is tokenized; septoken is the separator; keepsep is whether to keep separators in cues; startendtoken is the start and end token in boundary cues.

source
JudiLing.make_cue_matrixMethod
make_cue_matrix(data::DataFrame)

Make the cue matrix for training datasets and corresponding indices as well as the adjacency matrix and gold paths given a dataset in a form of dataframe.

Obligatory Arguments

  • data::DataFrame: the dataset

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
+Make Cue Matrix · JudiLing.jl

Make Cue Matrix

JudiLing.Cue_Matrix_StructType

A structure that stores information created by makecuematrix: C is the cue matrix; f2i is a dictionary returning the indices for features; i2f is a dictionary returning the features for indices; goldind is a list of indices of gold paths; A is the adjacency matrix; grams is the number of grams for cues; targetcol is the column name for target strings; tokenized is whether the dataset target is tokenized; septoken is the separator; keepsep is whether to keep separators in cues; startendtoken is the start and end token in boundary cues.

source
JudiLing.make_cue_matrixMethod
make_cue_matrix(data::DataFrame)

Make the cue matrix for training datasets and corresponding indices as well as the adjacency matrix and gold paths given a dataset in a form of dataframe.

Obligatory Arguments

  • data::DataFrame: the dataset

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
 cue_obj_train = JudiLing.make_cue_matrix(
      latin_train,
     grams=3,
@@ -21,7 +21,7 @@
     start_end_token="#",
     keep_sep=true,
     verbose=false
-    )
source
JudiLing.make_cue_matrixMethod
make_cue_matrix(data::DataFrame, cue_obj::Cue_Matrix_Struct)

Make the cue matrix for validation datasets and corresponding indices as well as the adjacency matrix and gold paths given a dataset in a form of dataframe.

Obligatory Arguments

  • data::DataFrame: the dataset
  • cue_obj::Cue_Matrix_Struct: training cue object

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
+    )
source
JudiLing.make_cue_matrixMethod
make_cue_matrix(data::DataFrame, cue_obj::Cue_Matrix_Struct)

Make the cue matrix for validation datasets and corresponding indices as well as the adjacency matrix and gold paths given a dataset in a form of dataframe.

Obligatory Arguments

  • data::DataFrame: the dataset
  • cue_obj::Cue_Matrix_Struct: training cue object

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
 cue_obj_val = JudiLing.make_cue_matrix(
   latin_val,
   cue_obj_train,
@@ -45,7 +45,7 @@
     keep_sep=true,
     start_end_token="#",
     verbose=false
-    )
source
JudiLing.make_cue_matrixMethod
make_cue_matrix(data_train::DataFrame, data_val::DataFrame)

Make the cue matrix for traiing and validation datasets at the same time.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
+    )
source
JudiLing.make_cue_matrixMethod
make_cue_matrix(data_train::DataFrame, data_val::DataFrame)

Make the cue matrix for traiing and validation datasets at the same time.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
 cue_obj_train, cue_obj_val = JudiLing.make_cue_matrix(
     latin_train,
     latin_val,
@@ -66,7 +66,7 @@
     keep_sep=true,
     start_end_token="#",
     verbose=false
-    )
source
JudiLing.make_combined_cue_matrixMethod
make_combined_cue_matrix(data_train, data_val)

Make the cue matrix for training and validation datasets at the same time, where the features and adjacencies are combined.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
+    )
source
JudiLing.make_combined_cue_matrixMethod
make_combined_cue_matrix(data_train, data_val)

Make the cue matrix for training and validation datasets at the same time, where the features and adjacencies are combined.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset

Optional Arguments

  • grams::Int64=3: the number of grams for cues
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • tokenized::Bool=false:if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • keep_sep::Bool=false: if true, keep separators in cues
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • verbose::Bool=false: if true, more information is printed

Examples

# make cue matrix without tokenization
 cue_obj_train, cue_obj_val = JudiLing.make_combined_cue_matrix(
     latin_train,
     latin_val,
@@ -87,4 +87,4 @@
     keep_sep=true,
     start_end_token="#",
     verbose=false
-    )
source
JudiLing.make_ngramsMethod
make_ngrams(tokens, grams, keep_sep, sep_token, start_end_token)

Given a list of string tokens return a list of all n-grams for these tokens.

source
+ )
source
JudiLing.make_ngramsMethod
make_ngrams(tokens, grams, keep_sep, sep_token, start_end_token)

Given a list of string tokens return a list of all n-grams for these tokens.

source
diff --git a/dev/man/make_semantic_matrix/index.html b/dev/man/make_semantic_matrix/index.html index 7ab7728..6c4b692 100644 --- a/dev/man/make_semantic_matrix/index.html +++ b/dev/man/make_semantic_matrix/index.html @@ -1,12 +1,12 @@ -Make Semantic Matrix · JudiLing.jl

Make Semantic Matrix

JudiLing.PS_Matrix_StructType

A structure that stores the discrete semantic vectors: pS is the discrete semantic matrix; f2i is a dictionary returning the indices for features; i2f is a dictionary returning the features for indices.

source
JudiLing.L_Matrix_StructType

A structure that stores Lexome semantic vectors: L is Lexome semantic matrix; f2i is a dictionary returning the indices for features; i2f is a dictionary returning the features for indices.

source
JudiLing.make_pS_matrixMethod
make_pS_matrix(utterances)

Create a discrete semantic matrix given a dataframe.

Obligatory Arguments

  • data::DataFrame: the dataset

Optional Arguments

  • features_col::Symbol=:CommunicativeIntention: the column name for target
  • sep_token::String="_": separator

Examples

s_obj_train = JudiLing.make_pS_matrix(
+Make Semantic Matrix · JudiLing.jl

Make Semantic Matrix

JudiLing.PS_Matrix_StructType

A structure that stores the discrete semantic vectors: pS is the discrete semantic matrix; f2i is a dictionary returning the indices for features; i2f is a dictionary returning the features for indices.

source
JudiLing.L_Matrix_StructType

A structure that stores Lexome semantic vectors: L is Lexome semantic matrix; f2i is a dictionary returning the indices for features; i2f is a dictionary returning the features for indices.

source
JudiLing.make_pS_matrixMethod
make_pS_matrix(utterances)

Create a discrete semantic matrix given a dataframe.

Obligatory Arguments

  • data::DataFrame: the dataset

Optional Arguments

  • features_col::Symbol=:CommunicativeIntention: the column name for target
  • sep_token::String="_": separator

Examples

s_obj_train = JudiLing.make_pS_matrix(
     utterance,
     features_col=:CommunicativeIntention,
-    sep_token="_")
source
JudiLing.make_pS_matrixMethod
make_pS_matrix(utterances, utterances_train)

Construct discrete semantic matrix for the validation datasets given by the exemplar in the dataframe, and given the S matrix for the training datasets.

Obligatory Arguments

  • utterances::DataFrame: the dataset
  • utterances_train::PS_Matrix_Struct: training PS object

Optional Arguments

  • features_col::Symbol=:CommunicativeIntention: the column name for target
  • sep_token::String="_": separator

Examples

s_obj_val = JudiLing.make_pS_matrix(
+    sep_token="_")
source
JudiLing.make_pS_matrixMethod
make_pS_matrix(utterances, utterances_train)

Construct discrete semantic matrix for the validation datasets given by the exemplar in the dataframe, and given the S matrix for the training datasets.

Obligatory Arguments

  • utterances::DataFrame: the dataset
  • utterances_train::PS_Matrix_Struct: training PS object

Optional Arguments

  • features_col::Symbol=:CommunicativeIntention: the column name for target
  • sep_token::String="_": separator

Examples

s_obj_val = JudiLing.make_pS_matrix(
     utterance_val,
     s_obj_train,
     features_col=:CommunicativeIntention,
-    sep_token="_")
source
JudiLing.make_S_matrixMethod
make_S_matrix(data::DataFrame, base::Vector, inflections::Vector)

Create simulated semantic matrix for the training datasets, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    sep_token="_")
source
JudiLing.make_S_matrixMethod
make_S_matrix(data::DataFrame, base::Vector, inflections::Vector)

Create simulated semantic matrix for the training datasets, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train = JudiLing.make_S_matrix(
     french,
     ["Lexeme"],
@@ -42,7 +42,7 @@
     sd_base=4,
     sd_inflection=4,
     sd_noise=1,
-    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector)

Create simulated semantic matrix for the validation datasets, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector)

Create simulated semantic matrix for the validation datasets, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train, S_val = JudiLing.make_S_matrix(
     french,
     french_val,
@@ -79,7 +79,7 @@
     sd_base=4,
     sd_inflection=4,
     sd_noise=1,
-    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data::DataFrame, base::Vector)

Create simulated semantic matrix for the training datasets with only base features, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_base::Int64=4: the sd of base features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data::DataFrame, base::Vector)

Create simulated semantic matrix for the training datasets with only base features, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_base::Int64=4: the sd of base features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train = JudiLing.make_S_matrix(
     french,
     ["Lexeme"],
@@ -114,7 +114,7 @@
     sd_base=4,
     sd_inflection=4,
     sd_noise=1,
-    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector)

Create simulated semantic matrix for the validation datasets with only base features, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_base::Int64=4: the sd of base features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector)

Create simulated semantic matrix for the validation datasets with only base features, given the input data of a vector specified contex lexemes and a vector specified gramatic lexemes. The semantic vector of a word form is constructed summing semantic vectors of content and gramatic lexemes.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_base::Int64=4: the sd of base features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train, S_val = JudiLing.make_S_matrix(
     french,
     french_val,
@@ -150,7 +150,7 @@
     sd_base=4,
     sd_inflection=4,
     sd_noise=1,
-    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, pyndl_weights::Pyndl_Weight_Struct, n_features_columns::Vector)

Create semantic matrix for pyndl mode

source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, base::Vector, inflections::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    ...)
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, pyndl_weights::Pyndl_Weight_Struct, n_features_columns::Vector)

Create semantic matrix for pyndl mode

source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, base::Vector, inflections::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S1 = JudiLing.make_S_matrix(
     latin,
     ["Lexeme"],
@@ -159,7 +159,7 @@
      add_noise=true,
     sd_noise=1,
     normalized=false
-    )
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::Union{DataFrame, Nothing}, base::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    )
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::Union{DataFrame, Nothing}, base::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S1, S2 = JudiLing.make_S_matrix(
      latin,
     latin_val,
@@ -168,7 +168,7 @@
     add_noise=true,
     sd_noise=1,
     normalized=false
-    )
source
JudiLing.make_S_matrixMethod
make_S_matrix(data::DataFrame, base::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    )
source
JudiLing.make_S_matrixMethod
make_S_matrix(data::DataFrame, base::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S1 = JudiLing.make_S_matrix(
     latin,
     ["Lexeme"],
@@ -176,7 +176,7 @@
     add_noise=true,
     sd_noise=1,
     normalized=false
-    )
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    )
source
JudiLing.make_S_matrixMethod
make_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix where lexome matrix is available.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes
  • L::L_Matrix_Struct: the lexome matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S1, S2 = JudiLing.make_S_matrix(
     latin,
     latin_val,
@@ -186,43 +186,43 @@
     add_noise=true,
     sd_noise=1,
     normalized=false
-    )
source
JudiLing.make_L_matrixMethod
make_L_matrix(data::DataFrame, base::Vector)

Create Lexome Matrix with simulated semantic vectors where there are only base features.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_base::Int64=4: the sd of base features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized

Examples

# basic usage
+    )
source
JudiLing.make_L_matrixMethod
make_L_matrix(data::DataFrame, base::Vector)

Create Lexome Matrix with simulated semantic vectors where there are only base features.

Obligatory Arguments

  • data::DataFrame: the dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_base::Int64=4: the sd of base features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized

Examples

# basic usage
 L = JudiLing.make_L_matrix(
     latin,
     ["Lexeme"],
-    ncol=200)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix for the training datasets and validation datasets with existing Lexome matrix, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes
  • L::L_Matrix_Struct: the Lexome Matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    ncol=200)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix for the training datasets and validation datasets with existing Lexome matrix, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes
  • L::L_Matrix_Struct: the Lexome Matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train, S_val = JudiLing.make_combined_S_matrix(
     latin_train,
     latin_val,
     ["Lexeme"],
     ["Person","Number","Tense","Voice","Mood"],
-    L)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(data_train::DataFrame, data_val::Union{DataFrame, Nothing}, base::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix for the training datasets and validation datasets with existing Lexome matrix, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • L::L_Matrix_Struct: the Lexome Matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    L)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(data_train::DataFrame, data_val::Union{DataFrame, Nothing}, base::Vector, L::L_Matrix_Struct)

Create simulated semantic matrix for the training datasets and validation datasets with existing Lexome matrix, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • L::L_Matrix_Struct: the Lexome Matrix

Optional Arguments

  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train, S_val = JudiLing.make_combined_S_matrix(
     latin_train,
     latin_val,
     ["Lexeme"],
     ["Person","Number","Tense","Voice","Mood"],
-    L)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(  data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector)

Create simulated semantic matrix for the training datasets and validation datasets, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    L)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(  data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector)

Create simulated semantic matrix for the training datasets and validation datasets, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train, S_val = JudiLing.make_combined_S_matrix(
     latin_train,
     latin_val,
     ["Lexeme"],
     ["Person","Number","Tense","Voice","Mood"],
-    ncol=n_features)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector)

Create simulated semantic matrix for the training datasets and validation datasets, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
+    ncol=n_features)
source
JudiLing.make_combined_S_matrixMethod
make_combined_S_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector)

Create simulated semantic matrix for the training datasets and validation datasets, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized
  • add_noise::Bool=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Bool=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd

Examples

# basic usage
 S_train, S_val = JudiLing.make_combined_S_matrix(
     latin_train,
     latin_val,
     ["Lexeme"],
     ["Person","Number","Tense","Voice","Mood"],
-    ncol=n_features)
source
JudiLing.make_combined_L_matrixMethod
make_combined_L_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector)

Create Lexome Matrix with simulated semantic vectors, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized

Examples

# basic usage
+    ncol=n_features)
source
JudiLing.make_combined_L_matrixMethod
make_combined_L_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector, inflections::Vector)

Create Lexome Matrix with simulated semantic vectors, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes
  • inflections::Vector: grammatic lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized

Examples

# basic usage
 L = JudiLing.make_combined_L_matrix(
     latin_train,
     latin_val,
     ["Lexeme"],
     ["Person","Number","Tense","Voice","Mood"],
-    ncol=n_features)
source
JudiLing.make_combined_L_matrixMethod
make_combined_L_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector)

Create Lexome Matrix with simulated semantic vectors, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized

Examples

# basic usage
+    ncol=n_features)
source
JudiLing.make_combined_L_matrixMethod
make_combined_L_matrix(data_train::DataFrame, data_val::DataFrame, base::Vector)

Create Lexome Matrix with simulated semantic vectors, where features are combined from both training datasets and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • base::Vector: context lexemes

Optional Arguments

  • ncol::Int64=200: dimension of semantic vectors, usually the same as that of cue vectors
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • seed::Int64=314: the random seed
  • isdeep::Bool=true: if true, mean of each feature is also randomized

Examples

# basic usage
 L = JudiLing.make_combined_L_matrix(
     latin_train,
     latin_val,
     ["Lexeme"],
-    ncol=n_features)
source
JudiLing.L_Matrix_StructMethod
L_Matrix_Struct(L, sd_base, sd_base_mean, sd_inflection, sd_inflection_mean, base_f, infl_f, base_f2i, infl_f2i, n_base_f, n_infl_f, ncol)

Construct LMatrixStruct with deep mode.

source
JudiLing.L_Matrix_StructMethod
L_Matrix_Struct(L, sd_base, sd_inflection, base_f, infl_f, base_f2i, infl_f2i, n_base_f, n_infl_f, ncol)

Construct LMatrixStruct without deep mode.

source
JudiLing.merge_f2iMethod
merge_f2i(base_f2i, infl_f2i, n_base_f, n_infl_f)

Merge base f2i dictionary and inflectional f2i dictionary.

source
JudiLing.make_StMethod
make_St(L, n, data, base, inflections)

Make S transpose matrix with inflections.

source
+ ncol=n_features)
source
JudiLing.L_Matrix_StructMethod
L_Matrix_Struct(L, sd_base, sd_base_mean, sd_inflection, sd_inflection_mean, base_f, infl_f, base_f2i, infl_f2i, n_base_f, n_infl_f, ncol)

Construct LMatrixStruct with deep mode.

source
JudiLing.L_Matrix_StructMethod
L_Matrix_Struct(L, sd_base, sd_inflection, base_f, infl_f, base_f2i, infl_f2i, n_base_f, n_infl_f, ncol)

Construct LMatrixStruct without deep mode.

source
JudiLing.merge_f2iMethod
merge_f2i(base_f2i, infl_f2i, n_base_f, n_infl_f)

Merge base f2i dictionary and inflectional f2i dictionary.

source
JudiLing.make_StMethod
make_St(L, n, data, base, inflections)

Make S transpose matrix with inflections.

source
diff --git a/dev/man/make_yt_matrix/index.html b/dev/man/make_yt_matrix/index.html index 8c2c3b5..3851414 100644 --- a/dev/man/make_yt_matrix/index.html +++ b/dev/man/make_yt_matrix/index.html @@ -1,3 +1,3 @@ -Make Yt Matrix · JudiLing.jl

Make Yt Matrix

JudiLing.make_Yt_matrixMethod
make_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 t
  • data::DataFrame: the dataset
  • f2i::Dict: the dictionary returning indices given features

Optional Arguments

  • tokenized::Bool=false: if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator token
  • verbose::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)
source
+Make Yt Matrix · JudiLing.jl

Make Yt Matrix

JudiLing.make_Yt_matrixMethod
make_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 t
  • data::DataFrame: the dataset
  • f2i::Dict: the dictionary returning indices given features

Optional Arguments

  • tokenized::Bool=false: if true, the dataset target is assumed to be tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator token
  • verbose::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)
source
diff --git a/dev/man/output/index.html b/dev/man/output/index.html index e5cef2b..120ac9c 100644 --- a/dev/man/output/index.html +++ b/dev/man/output/index.html @@ -1,5 +1,5 @@ -Output · JudiLing.jl

Output

JudiLing.write2csvFunction

Write results into a csv file. This function takes as input the results from the learn_paths and build_paths functions, including the information on gold paths that is optionally returned as second output result.

source
JudiLing.write2dfFunction

Reformat results into a dataframe. This function takes as input the results from the learn_paths and build_paths functions, including the information on gold paths that is optionally returned as second output result.

source
JudiLing.write2csvMethod
write2csv(res, data, cue_obj_train, cue_obj_val, filename)

Write results into csv file for the results from learn_paths and build_paths.

Obligatory Arguments

  • res::Array{Array{Result_Path_Info_Struct,1},1}: the results from learn_paths or build_paths
  • data::DataFrame: the dataset
  • cue_obj_train::Cue_Matrix_Struct: the cue object for training dataset
  • cue_obj_val::Cue_Matrix_Struct: the cue object for validation dataset
  • filename::String: the filename

Optional Arguments

  • grams::Int64=3: the number n in n-gram cues
  • tokenized::Bool=false: if true, the dataset target is tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • output_sep_token::Union{String, Char}="": output separator
  • path_sep_token::Union{String, Char}=":": path separator
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

# writing results for training data
+Output · JudiLing.jl

Output

JudiLing.write2csvFunction

Write results into a csv file. This function takes as input the results from the learn_paths and build_paths functions, including the information on gold paths that is optionally returned as second output result.

source
JudiLing.write2dfFunction

Reformat results into a dataframe. This function takes as input the results from the learn_paths and build_paths functions, including the information on gold paths that is optionally returned as second output result.

source
JudiLing.write2csvMethod
write2csv(res, data, cue_obj_train, cue_obj_val, filename)

Write results into csv file for the results from learn_paths and build_paths.

Obligatory Arguments

  • res::Array{Array{Result_Path_Info_Struct,1},1}: the results from learn_paths or build_paths
  • data::DataFrame: the dataset
  • cue_obj_train::Cue_Matrix_Struct: the cue object for training dataset
  • cue_obj_val::Cue_Matrix_Struct: the cue object for validation dataset
  • filename::String: the filename

Optional Arguments

  • grams::Int64=3: the number n in n-gram cues
  • tokenized::Bool=false: if true, the dataset target is tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • output_sep_token::Union{String, Char}="": output separator
  • path_sep_token::Union{String, Char}=":": path separator
  • target_col::Union{String, Symbol}=:Words: the column name for target strings
  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

# writing results for training data
 JudiLing.write2csv(
     res_train,
     latin_train,
@@ -31,7 +31,7 @@
     path_sep_token=":",
     target_col=:Word,
     root_dir=".",
-    output_dir="test_out")
source
JudiLing.write2csvMethod
write2csv(gpi::Vector{Gold_Path_Info_Struct}, filename)

Write results into csv file for the gold paths' information optionally returned by learn_paths and build_paths.

Obligatory Arguments

  • gpi::Vector{Gold_Path_Info_Struct}: the gold paths' information
  • filename::String: the filename

Optional Arguments

  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

# write gold standard paths to csv for training data
+    output_dir="test_out")
source
JudiLing.write2csvMethod
write2csv(gpi::Vector{Gold_Path_Info_Struct}, filename)

Write results into csv file for the gold paths' information optionally returned by learn_paths and build_paths.

Obligatory Arguments

  • gpi::Vector{Gold_Path_Info_Struct}: the gold paths' information
  • filename::String: the filename

Optional Arguments

  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

# write gold standard paths to csv for training data
 JudiLing.write2csv(
     gpi_train,
     "gpi_latin_train.csv",
@@ -45,7 +45,7 @@
     "gpi_latin_val.csv",
     root_dir=".",
     output_dir="test_out"
-    )
source
JudiLing.write2csvMethod
write2csv(ts::Threshold_Stat_Struct, filename)

Write results into csv file for threshold and tolerance proportion for each timestep.

Obligatory Arguments

  • gpi::Vector{Gold_Path_Info_Struct}: the gold paths' information
  • filename::String: the filename

Optional Arguments

  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

JudiLing.write2csv(ts, "ts.csv", root_dir = @__DIR__, output_dir="out")
source
JudiLing.write2dfMethod
write2df(res, data, cue_obj_train, cue_obj_val)

Reformat results into a dataframe for the results form learn_paths and build_paths functions.

Obligatory Arguments

  • res: output of learn_paths or build_paths
  • data::DataFrame: the dataset
  • cue_obj_train: cue object of the training data set
  • cue_obj_val: cue object of the validation data set

Optional Arguments

  • grams::Int64=3: the number n in n-gram cues
  • tokenized::Bool=false: if true, the dataset target is tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • output_sep_token::Union{String, Char}="": output separator
  • path_sep_token::Union{String, Char}=":": path separator
  • target_col::Union{String, Symbol}=:Words: the column name for target strings

Examples

# writing results for training data
+    )
source
JudiLing.write2csvMethod
write2csv(ts::Threshold_Stat_Struct, filename)

Write results into csv file for threshold and tolerance proportion for each timestep.

Obligatory Arguments

  • gpi::Vector{Gold_Path_Info_Struct}: the gold paths' information
  • filename::String: the filename

Optional Arguments

  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

JudiLing.write2csv(ts, "ts.csv", root_dir = @__DIR__, output_dir="out")
source
JudiLing.write2dfMethod
write2df(res, data, cue_obj_train, cue_obj_val)

Reformat results into a dataframe for the results form learn_paths and build_paths functions.

Obligatory Arguments

  • res: output of learn_paths or build_paths
  • data::DataFrame: the dataset
  • cue_obj_train: cue object of the training data set
  • cue_obj_val: cue object of the validation data set

Optional Arguments

  • grams::Int64=3: the number n in n-gram cues
  • tokenized::Bool=false: if true, the dataset target is tokenized
  • sep_token::Union{Nothing, String, Char}=nothing: separator
  • start_end_token::Union{String, Char}="#": start and end token in boundary cues
  • output_sep_token::Union{String, Char}="": output separator
  • path_sep_token::Union{String, Char}=":": path separator
  • target_col::Union{String, Symbol}=:Words: the column name for target strings

Examples

# writing results for training data
 JudiLing.write2df(
     res_train,
     latin_train,
@@ -71,10 +71,10 @@
     start_end_token="#",
     output_sep_token="",
     path_sep_token=":",
-    target_col=:Word)
source
JudiLing.write2dfMethod
write2df(gpi::Vector{Gold_Path_Info_Struct})

Write results into a dataframe for the gold paths' information optionally returned by learn_paths and build_paths.

Obligatory Arguments

  • gpi::Vector{Gold_Path_Info_Struct}: the gold paths' information

Examples

# write gold standard paths to df for training data
+    target_col=:Word)
source
JudiLing.write2dfMethod
write2df(gpi::Vector{Gold_Path_Info_Struct})

Write results into a dataframe for the gold paths' information optionally returned by learn_paths and build_paths.

Obligatory Arguments

  • gpi::Vector{Gold_Path_Info_Struct}: the gold paths' information

Examples

# write gold standard paths to df for training data
 JudiLing.write2csv(gpi_train)
 
 # write gold standard paths to df for validation data
-JudiLing.write2csv(gpi_val)
source
JudiLing.write2dfMethod
write2df(ts::Threshold_Stat_Struct)

Write results into a dataframe for threshold and tolerance proportion for each timestep.

Obligatory Arguments

  • ts::Threshold_Stat_Struct: the threshold and tolerance proportion

Examples

JudiLing.write2df(ts)
source
JudiLing.write_comprehension_evalMethod
write_comprehension_eval(SChat, SC, data, target_col, filename)

Write comprehension evaluation into a CSV file, include target and predicted ids and indentifiers and their correlations.

Obligatory Arguments

  • SChat::Matrix: the Shat/Chat matrix
  • SC::Matrix: the S/C matrix
  • data::DataFrame: the data
  • target_col::Symbol: the name of target column
  • filename::String: the filename/filepath

Optional Arguments

  • k: top k candidates
  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

JudiLing.write_comprehension_eval(Chat, cue_obj.C, latin, :Word, "output.csv",
-    k=10, root_dir=@__DIR__, output_dir="out")
source
JudiLing.write_comprehension_evalMethod
write_comprehension_eval(SChat, SC, SC_rest, data, data_rest, target_col, filename)

Write comprehension evaluation into a CSV file for both training and validation datasets, include target and predicted ids and indentifiers and their correlations.

Obligatory Arguments

  • SChat::Matrix: the Shat/Chat matrix
  • SC::Matrix: the S/C matrix
  • SC_rest::Matrix: the rest S/C matrix
  • data::DataFrame: the data
  • data_rest::DataFrame: the rest data
  • target_col::Symbol: the name of target column
  • filename::String: the filename/filepath

Optional Arguments

  • k: top k candidates
  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

JudiLing.write_comprehension_eval(Shat_val, S_val, S_train, latin_val, latin_train,
-    :Word, "all_output.csv", k=10, root_dir=@__DIR__, output_dir="out")
source
JudiLing.save_L_matrixMethod
save_L_matrix(L, filename)

Save lexome matrix into csv file.

Obligatory Arguments

  • L::L_Matrix_Struct: the lexome matrix struct
  • filename::String: the filename/filepath

Examples

JudiLing.save_L_matrix(L, joinpath(@__DIR__, "L.csv"))
source
JudiLing.load_L_matrixMethod
load_L_matrix(filename)

Load lexome matrix from csv file.

Obligatory Arguments

  • filename::String: the filename/filepath

Optional Arguments

  • header::Bool=false: header in csv

Examples

L_load = JudiLing.load_L_matrix(joinpath(@__DIR__, "L.csv"))
source
JudiLing.save_S_matrixMethod
save_S_matrix(S, filename, data, target_col)

Save S matrix into a csv file.

Obligatory Arguments

  • S::Matrix: the S matrix
  • filename::String: the filename/filepath
  • data::DataFrame: the data
  • target_col::Symbol: the name of target column

Optional Arguments

  • sep::Bool=" ": separator in CSV file

Examples

JudiLing.save_S_matrix(S, joinpath(@__DIR__, "S.csv"), latin, :Word)
source
JudiLing.load_S_matrixMethod
load_S_matrix(filename)

Load S matrix from a csv file.

Obligatory Arguments

  • filename::String: the filename/filepath

Optional Arguments

  • header::Bool=false: header in csv
  • sep::Bool=" ": separator in CSV file

Examples

JudiLing.load_S_matrix(joinpath(@__DIR__, "S.csv"))
source
+JudiLing.write2csv(gpi_val)
source
JudiLing.write2dfMethod
write2df(ts::Threshold_Stat_Struct)

Write results into a dataframe for threshold and tolerance proportion for each timestep.

Obligatory Arguments

  • ts::Threshold_Stat_Struct: the threshold and tolerance proportion

Examples

JudiLing.write2df(ts)
source
JudiLing.write_comprehension_evalMethod
write_comprehension_eval(SChat, SC, data, target_col, filename)

Write comprehension evaluation into a CSV file, include target and predicted ids and indentifiers and their correlations.

Obligatory Arguments

  • SChat::Matrix: the Shat/Chat matrix
  • SC::Matrix: the S/C matrix
  • data::DataFrame: the data
  • target_col::Symbol: the name of target column
  • filename::String: the filename/filepath

Optional Arguments

  • k: top k candidates
  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

JudiLing.write_comprehension_eval(Chat, cue_obj.C, latin, :Word, "output.csv",
+    k=10, root_dir=@__DIR__, output_dir="out")
source
JudiLing.write_comprehension_evalMethod
write_comprehension_eval(SChat, SC, SC_rest, data, data_rest, target_col, filename)

Write comprehension evaluation into a CSV file for both training and validation datasets, include target and predicted ids and indentifiers and their correlations.

Obligatory Arguments

  • SChat::Matrix: the Shat/Chat matrix
  • SC::Matrix: the S/C matrix
  • SC_rest::Matrix: the rest S/C matrix
  • data::DataFrame: the data
  • data_rest::DataFrame: the rest data
  • target_col::Symbol: the name of target column
  • filename::String: the filename/filepath

Optional Arguments

  • k: top k candidates
  • root_dir::String=".": dir path for project root dir
  • output_dir::String=".": output dir inside root dir

Examples

JudiLing.write_comprehension_eval(Shat_val, S_val, S_train, latin_val, latin_train,
+    :Word, "all_output.csv", k=10, root_dir=@__DIR__, output_dir="out")
source
JudiLing.save_L_matrixMethod
save_L_matrix(L, filename)

Save lexome matrix into csv file.

Obligatory Arguments

  • L::L_Matrix_Struct: the lexome matrix struct
  • filename::String: the filename/filepath

Examples

JudiLing.save_L_matrix(L, joinpath(@__DIR__, "L.csv"))
source
JudiLing.load_L_matrixMethod
load_L_matrix(filename)

Load lexome matrix from csv file.

Obligatory Arguments

  • filename::String: the filename/filepath

Optional Arguments

  • header::Bool=false: header in csv

Examples

L_load = JudiLing.load_L_matrix(joinpath(@__DIR__, "L.csv"))
source
JudiLing.save_S_matrixMethod
save_S_matrix(S, filename, data, target_col)

Save S matrix into a csv file.

Obligatory Arguments

  • S::Matrix: the S matrix
  • filename::String: the filename/filepath
  • data::DataFrame: the data
  • target_col::Symbol: the name of target column

Optional Arguments

  • sep::Bool=" ": separator in CSV file

Examples

JudiLing.save_S_matrix(S, joinpath(@__DIR__, "S.csv"), latin, :Word)
source
JudiLing.load_S_matrixMethod
load_S_matrix(filename)

Load S matrix from a csv file.

Obligatory Arguments

  • filename::String: the filename/filepath

Optional Arguments

  • header::Bool=false: header in csv
  • sep::Bool=" ": separator in CSV file

Examples

JudiLing.load_S_matrix(joinpath(@__DIR__, "S.csv"))
source
diff --git a/dev/man/pickle/index.html b/dev/man/pickle/index.html index b7fa470..1daf3d0 100644 --- a/dev/man/pickle/index.html +++ b/dev/man/pickle/index.html @@ -1,2 +1,2 @@ -Pickle · JudiLing.jl
+Pickle · JudiLing.jl
diff --git a/dev/man/preprocess/index.html b/dev/man/preprocess/index.html index 1c350c2..4395968 100644 --- a/dev/man/preprocess/index.html +++ b/dev/man/preprocess/index.html @@ -1,2 +1,2 @@ -Preprocess · JudiLing.jl

Preprocess

+Preprocess · JudiLing.jl

Preprocess

diff --git a/dev/man/pyndl/index.html b/dev/man/pyndl/index.html index 83dff67..525940b 100644 --- a/dev/man/pyndl/index.html +++ b/dev/man/pyndl/index.html @@ -1,2 +1,2 @@ -Pyndl · JudiLing.jl
+Pyndl · JudiLing.jl
diff --git a/dev/man/test_combo/index.html b/dev/man/test_combo/index.html index 559dc00..a14008f 100644 --- a/dev/man/test_combo/index.html +++ b/dev/man/test_combo/index.html @@ -1,2 +1,2 @@ -Test Combo · JudiLing.jl

Test Combo

JudiLing.test_comboMethod
test_combo(test_mode;kwargs...)

A wrapper function for a full model for a specific combination of parameters. A detailed introduction is in Test Combo Introduction

Obligatory Arguments

  • test_mode::Symbol: which test mode, currently supports :trainonly, :presplit, :carefulsplit and :randomsplit.

Optional Arguments

  • train_sample_size::Int64=0: the desired number of training data
  • val_sample_size::Int64=0: the desired number of validation data
  • val_ratio::Float64=0.0: the desired portion of validation data, if works only if :valsamplesize is 0.0.
  • extension::String=".csv": the extension for data nfeaturesinflections
  • n_grams_target_col::Union{String, Symbol}=:Word: the column name for target strings
  • n_grams_tokenized::Boolean=false: if true, the dataset target is assumed to be tokenized
  • n_grams_sep_token::String=nothing: separator
  • grams::Int64=3: the number of grams for cues
  • n_grams_keep_sep::Boolean=false: if true, keep separators in cues
  • start_end_token::String=":": start and end token in boundary cues
  • path_sep_token::String=":": path separator in the assembled path
  • random_seed::Int64=314: the random seed
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • isdeep::Boolean=true: if true, mean of each feature is also randomized
  • add_noise::Boolean=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Boolean=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd
  • if_combined::Boolean=false: if true, then features are combined with both training and validation data
  • learn_mode::Int64=:cholesky: which learning mode, currently supports :cholesky and :wh
  • method::Int64=:additive: whether :additive or :multiplicative decomposition is required
  • shift::Int64=0.02: shift value for :additive decomposition
  • multiplier::Int64=1.01: multiplier value for :multiplicative decomposition
  • output_format::Int64=:auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Int64=0.05: the ratio to decide whether a matrix is sparse
  • wh_freq::Vector=nothing: the learning sequence
  • init_weights::Matrix=nothing: the initial weights
  • eta::Float64=0.1: the learning rate
  • n_epochs::Int64=1: the number of epochs to be trained
  • max_t::Int64=0: the number of epochs to be trained
  • A::Matrix=nothing: the number of epochs to be trained
  • A_mode::Symbol=:combined: the adjacency matrix mode, currently supports :combined or :train_only
  • max_can::Int64=10: the max number of candidate path to keep in the output
  • threshold_train::Float64=0.1:the value set for the support such that if the support of an n-gram is higher than this value, the n-gram will be taking into consideration for training data
  • is_tolerant_train::Bool=false: if true, select a specified number (given by max_tolerance) of n-grams whose supports are below threshold but above a second tolerance threshold to be added to the path for training data
  • tolerance_train::Float64=-0.1: the value set for the second threshold (in tolerant mode) such that if the support for an n-gram is in between this value and the threshold and the max_tolerance number has not been reached, then allow this n-gram to be added to the path for training data
  • max_tolerance_train::Int64=2: maximum number of n-grams allowed in a path for training data
  • threshold_val::Float64=0.1:the value set for the support such that if the support of an n-gram is higher than this value, the n-gram will be taking into consideration for validation data
  • is_tolerant_val::Bool=false: if true, select a specified number (given by max_tolerance) of n-grams whose supports are below threshold but above a second tolerance threshold to be added to the path for validation data
  • tolerance_val::Float64=-0.1: the value set for the second threshold (in tolerant mode) such that if the support for an n-gram is in between this value and the threshold and the max_tolerance number has not been reached, then allow this n-gram to be added to the path for validation data
  • max_tolerance_val::Int64=2: maximum number of n-grams allowed in a path for validation data
  • n_neighbors_train::Int64=10: the top n form neighbors to be considered for training data
  • n_neighbors_val::Int64=20: the top n form neighbors to be considered for validation data
  • issparse::Bool=false: if true, keep sparse matrix format when learning paths
  • output_dir::String="out": the output directory
  • verbose::Bool=false: if true, more information will be printed
source
+Test Combo · JudiLing.jl

Test Combo

JudiLing.test_comboMethod
test_combo(test_mode;kwargs...)

A wrapper function for a full model for a specific combination of parameters. A detailed introduction is in Test Combo Introduction

Obligatory Arguments

  • test_mode::Symbol: which test mode, currently supports :trainonly, :presplit, :carefulsplit and :randomsplit.

Optional Arguments

  • train_sample_size::Int64=0: the desired number of training data
  • val_sample_size::Int64=0: the desired number of validation data
  • val_ratio::Float64=0.0: the desired portion of validation data, if works only if :valsamplesize is 0.0.
  • extension::String=".csv": the extension for data nfeaturesinflections
  • n_grams_target_col::Union{String, Symbol}=:Word: the column name for target strings
  • n_grams_tokenized::Boolean=false: if true, the dataset target is assumed to be tokenized
  • n_grams_sep_token::String=nothing: separator
  • grams::Int64=3: the number of grams for cues
  • n_grams_keep_sep::Boolean=false: if true, keep separators in cues
  • start_end_token::String=":": start and end token in boundary cues
  • path_sep_token::String=":": path separator in the assembled path
  • random_seed::Int64=314: the random seed
  • sd_base_mean::Int64=1: the sd mean of base features
  • sd_inflection_mean::Int64=1: the sd mean of inflectional features
  • sd_base::Int64=4: the sd of base features
  • sd_inflection::Int64=4: the sd of inflectional features
  • isdeep::Boolean=true: if true, mean of each feature is also randomized
  • add_noise::Boolean=true: if true, add additional Gaussian noise
  • sd_noise::Int64=1: the sd of the Gaussian noise
  • normalized::Boolean=false: if true, most of the values range between 1 and -1, it may slightly exceed between 1 or -1 depending on the sd
  • if_combined::Boolean=false: if true, then features are combined with both training and validation data
  • learn_mode::Int64=:cholesky: which learning mode, currently supports :cholesky and :wh
  • method::Int64=:additive: whether :additive or :multiplicative decomposition is required
  • shift::Int64=0.02: shift value for :additive decomposition
  • multiplier::Int64=1.01: multiplier value for :multiplicative decomposition
  • output_format::Int64=:auto: to force output format to dense(:dense) or sparse(:sparse), make it auto(:auto) to determined by the program
  • sparse_ratio::Int64=0.05: the ratio to decide whether a matrix is sparse
  • wh_freq::Vector=nothing: the learning sequence
  • init_weights::Matrix=nothing: the initial weights
  • eta::Float64=0.1: the learning rate
  • n_epochs::Int64=1: the number of epochs to be trained
  • max_t::Int64=0: the number of epochs to be trained
  • A::Matrix=nothing: the number of epochs to be trained
  • A_mode::Symbol=:combined: the adjacency matrix mode, currently supports :combined or :train_only
  • max_can::Int64=10: the max number of candidate path to keep in the output
  • threshold_train::Float64=0.1:the value set for the support such that if the support of an n-gram is higher than this value, the n-gram will be taking into consideration for training data
  • is_tolerant_train::Bool=false: if true, select a specified number (given by max_tolerance) of n-grams whose supports are below threshold but above a second tolerance threshold to be added to the path for training data
  • tolerance_train::Float64=-0.1: the value set for the second threshold (in tolerant mode) such that if the support for an n-gram is in between this value and the threshold and the max_tolerance number has not been reached, then allow this n-gram to be added to the path for training data
  • max_tolerance_train::Int64=2: maximum number of n-grams allowed in a path for training data
  • threshold_val::Float64=0.1:the value set for the support such that if the support of an n-gram is higher than this value, the n-gram will be taking into consideration for validation data
  • is_tolerant_val::Bool=false: if true, select a specified number (given by max_tolerance) of n-grams whose supports are below threshold but above a second tolerance threshold to be added to the path for validation data
  • tolerance_val::Float64=-0.1: the value set for the second threshold (in tolerant mode) such that if the support for an n-gram is in between this value and the threshold and the max_tolerance number has not been reached, then allow this n-gram to be added to the path for validation data
  • max_tolerance_val::Int64=2: maximum number of n-grams allowed in a path for validation data
  • n_neighbors_train::Int64=10: the top n form neighbors to be considered for training data
  • n_neighbors_val::Int64=20: the top n form neighbors to be considered for validation data
  • issparse::Bool=false: if true, keep sparse matrix format when learning paths
  • output_dir::String="out": the output directory
  • verbose::Bool=false: if true, more information will be printed
source
diff --git a/dev/man/utils/index.html b/dev/man/utils/index.html index 1bdc94a..465f651 100644 --- a/dev/man/utils/index.html +++ b/dev/man/utils/index.html @@ -1,13 +1,13 @@ -Utils · JudiLing.jl

Utils

JudiLing.is_truly_sparseFunction

Check whether a matrix is truly sparse regardless its format, where M is originally a sparse matrix format.

source

Check whether a matrix is truly sparse regardless its format, where M is originally a dense matrix format.

source
JudiLing.cal_max_timestepFunction
function cal_max_timestep(
+Utils · JudiLing.jl

Utils

JudiLing.is_truly_sparseFunction

Check whether a matrix is truly sparse regardless its format, where M is originally a sparse matrix format.

source

Check whether a matrix is truly sparse regardless its format, where M is originally a dense matrix format.

source
JudiLing.cal_max_timestepFunction
function cal_max_timestep(
     data_train::DataFrame,
     data_val::DataFrame,
     target_col::Union{String, Symbol};
     tokenized::Bool = false,
     sep_token::Union{Nothing, String, Char} = "",
-)

Calculate the max timestep given training and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • target_col::Union{String, Symbol}: the column with the target word forms

Optional Arguments

  • tokenized::Bool = false: Whether the word forms in the target_col are already tokenized
  • sep_token::Union{Nothing, String, Char} = "": The token with which the word forms are tokenized

Examples

JudiLing.cal_max_timestep(latin_train, latin_val, target_col=:Word)
source
function cal_max_timestep(
+)

Calculate the max timestep given training and validation datasets.

Obligatory Arguments

  • data_train::DataFrame: the training dataset
  • data_val::DataFrame: the validation dataset
  • target_col::Union{String, Symbol}: the column with the target word forms

Optional Arguments

  • tokenized::Bool = false: Whether the word forms in the target_col are already tokenized
  • sep_token::Union{Nothing, String, Char} = "": The token with which the word forms are tokenized

Examples

JudiLing.cal_max_timestep(latin_train, latin_val, target_col=:Word)
source
function cal_max_timestep(
     data::DataFrame,
     target_col::Union{String, Symbol};
     tokenized::Bool = false,
     sep_token::Union{Nothing, String, Char} = "",
-)

Calculate the max timestep given training dataset.

Obligatory Arguments

  • data::DataFrame: the dataset
  • target_col::Union{String, Symbol}: the column with the target word forms

Optional Arguments

  • tokenized::Bool = false: Whether the word forms in the target_col are already tokenized
  • sep_token::Union{Nothing, String, Char} = "": The token with which the word forms are tokenized

Examples

JudiLing.cal_max_timestep(latin, target_col=:Word)
source
+)

Calculate the max timestep given training dataset.

Obligatory Arguments

  • data::DataFrame: the dataset
  • target_col::Union{String, Symbol}: the column with the target word forms

Optional Arguments

  • tokenized::Bool = false: Whether the word forms in the target_col are already tokenized
  • sep_token::Union{Nothing, String, Char} = "": The token with which the word forms are tokenized

Examples

JudiLing.cal_max_timestep(latin, target_col=:Word)
source
diff --git a/dev/man/wh/index.html b/dev/man/wh/index.html index 189887d..c087e4c 100644 --- a/dev/man/wh/index.html +++ b/dev/man/wh/index.html @@ -1,2 +1,2 @@ -Widrow-Hoff Learning · JudiLing.jl

Utils

JudiLing.wh_learnMethod
wh_learn(X, Y)

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
+Widrow-Hoff Learning · JudiLing.jl

Utils

JudiLing.wh_learnMethod
wh_learn(X, Y)

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
diff --git a/dev/search/index.html b/dev/search/index.html index 28a982b..06c9178 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · JudiLing.jl

Loading search...

    +Search · JudiLing.jl

    Loading search...