nlp_assertion_dl: Spark NLP AssertionDLApproach

View source: R/assertion_dl.R

nlp_assertion_dlR Documentation

Spark NLP AssertionDLApproach

Description

Spark ML estimator that classifies each clinically relevant named entity into its assertion type: “present”, “absent”, “hypothetical”, “conditional”, “associated_with_other_person”, etc. See https://nlp.johnsnowlabs.com/docs/en/licensed_annotators#assertiondl

Usage

nlp_assertion_dl(
  x,
  input_cols,
  output_col,
  graph_folder = NULL,
  config_proto_bytes = NULL,
  label_column = NULL,
  batch_size = NULL,
  epochs = NULL,
  learning_rate = NULL,
  dropout = NULL,
  max_sent_len = NULL,
  start_col = NULL,
  end_col = NULL,
  chunk_col = NULL,
  enable_output_logs = NULL,
  output_logs_path = NULL,
  validation_split = NULL,
  verbose = NULL,
  scope_window = NULL,
  uid = random_string("assertion_dl_")
)

Arguments

x

A spark_connection, ml_pipeline, or a tbl_spark.

input_cols

Input columns. String array.

output_col

Output column. String.

graph_folder

forlder containing the TF graph files

config_proto_bytes

array of integers

label_column

column name to use as the labels for training

batch_size

gradient descent batch size

epochs

number of training epochs

learning_rate

learning rate for the algorithm

dropout

dropout for the algorithm

max_sent_len

regulates the length of the longest sentence

start_col

the name of the column with the value for the start index of the target

end_col

the name of the column with the value for the ending index of the target

chunk_col

the name of the column containing the chunks

enable_output_logs

Whether to output to annotators log folder

output_logs_path

path for the output logs to go

validation_split

Choose the proportion of training dataset to be validated against the model on each Epoch.

verbose

level of verbosity. One of All, PerStep, Epochs, TrainingStat, Silent

scope_window

The scope window of the assertion (whole sentence by default)

uid

A character string used to uniquely identify the ML estimator.

Value

The object returned depends on the class of x.

  • spark_connection: When x is a spark_connection, the function returns an instance of a ml_estimator object. The object contains a pointer to a Spark Estimator object and can be used to compose Pipeline objects.

  • ml_pipeline: When x is a ml_pipeline, the function returns a ml_pipeline with the NLP estimator appended to the pipeline.

  • tbl_spark: When x is a tbl_spark, an estimator is constructed then immediately fit with the input tbl_spark, returning an NLP model.


r-spark/sparknlp documentation built on Oct. 15, 2022, 10:50 a.m.