predict_samples: Predict samples

Description Usage Arguments Value Examples

View source: R/machinelearning.R

Description

Predict new samples.

Usage

1
predict_samples(train.result, new.samples)

Arguments

train.result

result from training a classifier.

new.samples

dataframe with new samples.

Value

Returns a data frame with the samples and the predicted class.

Examples

1
2
3
4
5
6
7
  ## Example of predicting samples
  library(specmine.datasets)
  data(cachexia)
  training.result = train_models_performance(cachexia, "pls", 
  	"Muscle.loss", "cv")
  result = predict_samples(training.result$final.models$pls, cachexia$data)
  

specmine documentation built on May 16, 2021, 5:06 p.m.