Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ml-model-constructors

Constructors for 'ml_model' Objects


Description

Functions for developers writing extensions for Spark ML. These functions are constructors for 'ml_model' objects that are returned when using the formula interface.

Usage

ml_supervised_pipeline(predictor, dataset, formula, features_col, label_col)

ml_clustering_pipeline(predictor, dataset, formula, features_col)

ml_construct_model_supervised(
  constructor,
  predictor,
  formula,
  dataset,
  features_col,
  label_col,
  ...
)

ml_construct_model_clustering(
  constructor,
  predictor,
  formula,
  dataset,
  features_col,
  ...
)

new_ml_model_prediction(
  pipeline_model,
  formula,
  dataset,
  label_col,
  features_col,
  ...,
  class = character()
)

new_ml_model(pipeline_model, formula, dataset, ..., class = character())

new_ml_model_classification(
  pipeline_model,
  formula,
  dataset,
  label_col,
  features_col,
  predicted_label_col,
  ...,
  class = character()
)

new_ml_model_regression(
  pipeline_model,
  formula,
  dataset,
  label_col,
  features_col,
  ...,
  class = character()
)

new_ml_model_clustering(
  pipeline_model,
  formula,
  dataset,
  features_col,
  ...,
  class = character()
)

Arguments

predictor

The pipeline stage corresponding to the ML algorithm.

dataset

The training dataset.

formula

The formula used for data preprocessing

features_col

Features column name, as a length-one character vector. The column should be single vector column of numeric values. Usually this column is output by ft_r_formula.

label_col

Label column name. The column should be a numeric column. Usually this column is output by ft_r_formula.

constructor

The constructor function for the 'ml_model'.

pipeline_model

The pipeline model object returned by 'ml_supervised_pipeline()'.

class

Name of the subclass.


sparklyr

R Interface to Apache Spark

v1.6.2
Apache License 2.0 | file LICENSE
Authors
Javier Luraschi [aut], Kevin Kuo [aut] (<https://orcid.org/0000-0001-7803-7901>), Kevin Ushey [aut], JJ Allaire [aut], Samuel Macedo [ctb], Hossein Falaki [aut], Lu Wang [aut], Andy Zhang [aut], Yitao Li [aut, cre] (<https://orcid.org/0000-0002-1261-905X>), Jozef Hajnala [ctb], Maciej Szymkiewicz [ctb] (<https://orcid.org/0000-0003-1469-9396>), Wil Davis [ctb], RStudio [cph], The Apache Software Foundation [aut, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.