getPredicitons: Get MetaClean Predictions

Description Usage Arguments Value Examples

View source: R/getPredictions.R

Description

Wrapper function for retrieving predictions from a trained MetaClean classifier and a test dataset. Returns a data frame with class predictions as well as the associated probabilities for each class prediciton.

Usage

1
getPredicitons(model, testData, eicColumn)

Arguments

model

The train MetaClean model object.

testData

dataframe. Rows should correspond to peaks, columns should include peak quality metrics and EIC column only.

eicColumn

name of the EIC column

Value

a dataframe with four columns: EIC, Pred_Class, Pred_Prob_Pass, Pred_Prob_Fail

Examples

1
2
3
4
# train classification algorithms
best_model <- getPredictions(model = mc_model,
                                       testData = pqm_test,
                                       eicColumn = "EICNo")

KelseyChetnik/MetaClean documentation built on May 17, 2021, 5:33 a.m.