smooth_predictions: Smoothing of prediction vectors

View source: R/smooth_predictions.R

smooth_predictionsR Documentation

Smoothing of prediction vectors

Description

This function runs a sliding window smoother on prediction vectors.

Usage

smooth_predictions(x, window_size = 15, type = "mode", minsize = 8)

Arguments

x

vector of predictions (must be numeric)

window_size

size of the sliding window. Only used if type is either "mean" or "mode".

type

type of smoothing function to use. Accepts "mode" (simple majority vote), "mean" or "minsize".

minsize

smallest sequence length for positive predictions. Stretches of positive-labelled positions shorter than minsize are flipped to negative (only works if ⁠type == "minsize⁠).

Value

vector of smoothed prediction values.

Author(s)

Felipe Campelo (f.campelo@aston.ac.uk)


fcampelo/epitopes documentation built on April 22, 2023, 12:23 a.m.