[e26484]: / OmicsFold / man / plot.predicted.projection.Rd

Download this file

33 lines (31 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sample_analysis.R
\name{plot.predicted.projection}
\alias{plot.predicted.projection}
\title{Plot projections for a prediction result}
\usage{
\method{plot}{predicted.projection}(prediction, classes.new)
}
\arguments{
\item{prediction}{mixOmics sPLS-DA prediction object, generated by the
`predict` method.}
\item{classes.new}{Factor indicating the classes of the new data.}
}
\value{
ggplot plot of the predicted data in the sPLS-DA model space.
}
\description{
Function to plot a single-omics sPLS-DA prediction projected into the model
space. While confusion matrices of predicted data can easily be obtained,
there is no built-in function to plot the projection into the model space and
hence give a visualisation of the quality of the prediction. The plot will
show the centroids of the classes as large points, surrounded by the sample
projection as small points, coloured according to class. A good prediction
will cluster each class around the appropriate centroid.
}
\examples{
\dontrun{
prediction.projection <- plot.predicted.projection(prediction.replicate.data, replicate.data.classes)
print(prediction.projection)
}
}