tune_lambda: Tune Lambda Weight and Number of Clusters

View source: R/functions_tuning.R

tune_lambdaR Documentation

Tune Lambda Weight and Number of Clusters

Description

Experiment function for tuning lambda.

Usage

tune_lambda(
  docs,
  docName = "text",
  index_name = "id",
  labelsName = "label",
  n_clusters = c(2),
  maxQuery = 1,
  active = FALSE,
  lambdas,
  seed,
  prop_init = 0.1,
  parallel = TRUE,
  k = 5
)

Arguments

docs

Dataframe for courpus.

docName

String; name of variable for document text.

index_name

String; name of variable for corpus index.

labelsName

String; name of variable for document labels.

n_clusters

vec; sequence of number of clusters to be tested.

maxQuery

int; max number of documents ot query per iteration.

lambdas

vec; sequence of lambda values to test.

seed

int; Seed value for randomization.

parallel

logical; Whether or not to parallelize the tuning process.

k

int; number for cross-validation.

prop_init;

float; Proportion of docs in each training set to directly label; the rest are used by the EM.

Value

Results from experiment. parallel select best # of clusters and lambda in terms of the mean F1


activetext/activeR documentation built on May 31, 2024, 10:21 a.m.