[ Web Proxy ]
URL:
Viewing: https://sadit.github.io/TextClassification.jl/dev [Back]  [Original]

Home TextClassification.jl
TextClassification.jl
Search docs (Ctrl + /)
Version

TextClassification

TextClassification.MicroTC Method
MicroTC(
    config::MicroTC_Config,
    train_corpus::AbstractVector,
    train_y;
    textconfig=config.textconfig,
    verbose=true)
MicroTC(config::MicroTC_Config, textmodel::TextModel, train_X::AbstractVector{S}, train_y; verbose=true) where {S<:SVEC}

Creates a MicroTC model on the given dataset and configuration

sourceStatsAPI.predict Method
predict(tc::MicroTC, text)
predict(tc::MicroTC, vec::SVEC)

Predicts the label of the given input

sourceTextClassification.accuracy_score Method
accuracy_score(gold, predicted)

Computes the accuracy score between the gold and the predicted sets

sourceTextClassification.classification_scores Method
classification_scores(gold, predicted; labelnames=nothing)

Computes several scores for the given gold-standard and predictions, namely: precision, recall, and f1 scores, for global and per-class granularity. If labelnames is given, then it is an array of label names.

sourceTextClassification.f1_score Method
f1_score(gold, predicted; weight=:macro)::Float64

It computes the F1 score between the gold dataset and the list of predictions predicted

It applies the desired weighting scheme for binary and multiclass problems

  • :macro performs a uniform weigth to each class
  • :weigthed the weight of each class is proportional to its population in gold
  • :micro returns the global F1, without distinguishing among classes
sourceTextClassification.isqerror Method
isqerror(X::AbstractVector{F}, Y::AbstractVector{F}) where {F <: AbstractFloat}

Negative squared error (to be used for maximizing algorithms)

sourceTextClassification.pearson Method
pearson(X::AbstractVector{F}, Y::AbstractVector{F}) where {F <: AbstractFloat}

Pearson correlation score

sourceTextClassification.precision_recall Method
precision_recall(gold::AbstractVector, predicted::AbstractVector)

Computes the global and per-class precision and recall values between the gold standard and the predicted set

sourceTextClassification.precision_score Method
precision_score(gold, predicted; weight=:macro)::Float64

It computes the precision between the gold dataset and the list of predictions predict

It applies the desired weighting scheme for binary and multiclass problems

  • :macro performs a uniform weigth to each class
  • :weigthed the weight of each class is proportional to its population in gold
  • :micro returns the global precision, without distinguishing among classes
sourceTextClassification.recall_score Method
recall_score(gold, predicted; weight=:macro)::Float64

It computes the recall between the gold dataset and the list of predictions predict

It applies the desired weighting scheme for binary and multiclass problems

  • :macro performs a uniform weigth to each class
  • :weigthed the weight of each class is proportional to its population in gold
  • :micro returns the global recall, without distinguishing among classes
sourceTextClassification.spearman Method
spearman(X::AbstractVector{F}, Y::AbstractVector{F}) where {F <: AbstractFloat}

Spearman rank correleation score

sourceTextSearch.vectorize Method
vectorize(tc::MicroTC, text; bow=BOW(), textconfig=tc.textconfig, normalize=true)
vectorize(tc::MicroTC, bow::BOW; normalize=true)

Creates a weighted vector using the model. The input text can be a string or an array of strings; it also can be an already computed bag of words.

source

Web Proxy Viewer  |  New URL  |  Original Page