visualizePCA: Generate PCA plots with optimized clustering

Description Usage Arguments Value See Also Examples

View source: R/visualizePCA.R

Description

Baseline PCA visualizations including standard 2-component PCA plot, density plot, and variance contribution pie chart.

Usage

1
visualizePCA(bestPCSet, clusters, pcObj, outDir = ".")

Arguments

bestPCSet

a matrix whose columns contain the optimal principal components.

clusters

vector of predicted labels

pcObj

a PCA object

outDir

path to ouput directory where pcclust_visualization folder will be generated. Defaults to current working directory.

Value

path to pcclust_visualization output directory. Outputs high quality .tiff files for each of the 3 plots.

See Also

ggplot

tiff

Examples

1
2
3
4
5
6
7
8
9
data <- validateAndLoadData(iris)
pcObj <- prcomp(data)
pcData <- pcObj$x
iterationResults <- executePCFiltering(pcData)
bestPCSet <- iterationResults[[length(iterationResults)]]
clusterResults <- evaluateClusterQuality(bestPCSet)
optimalModel <- determineOptimalModel(bestPCSet)
clusters <- optimalModel$classification
out <- visualizePCA(bestPCSet, clusters, pcObj)

audrina/pcclust documentation built on Oct. 10, 2018, 7:21 p.m.