ranking: Use S3 classes and rename optimize method

This commit is contained in:
Elias Projahn 2021-11-05 14:47:33 +01:00
parent 4792bbaefd
commit 4992bb2930
5 changed files with 55 additions and 31 deletions

26
man/optimal_weights.Rd Normal file
View file

@ -0,0 +1,26 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ranking.R
\name{optimal_weights}
\alias{optimal_weights}
\title{Find the best weights to rank the results.}
\usage{
optimal_weights(analysis, methods, reference_gene_ids, target = "mean")
}
\arguments{
\item{analysis}{Results from \code{\link[=analyze]{analyze()}} or \code{\link[=ranking]{ranking()}}.}
\item{methods}{Methods to include in the score.}
\item{reference_gene_ids}{IDs of the reference genes.}
\item{target}{The optimization target. It may be one of "mean", "min" or
"max" and results in the respective rank being optimized.}
}
\value{
Named list pairing method names with their optimal weights. This
can be used as an argument to \code{\link[=ranking]{ranking()}}.
}
\description{
This function finds the optimal parameters to \code{\link[=ranking]{ranking()}} that result in the
reference genes ranking particulary high.
}