Learn R Programming

h2o (version 2.8.4.4)

screeplot.H2OPCAModel: Summarizes the columns of an H2O parsed FluidVecs data set.

Description

screeplot.H2OPCAModel, a method for the screeplot generic. Plots the variances against the number of the principal component generated by h2o.prcomp.

Usage

## S3 method for class 'H2OPCAModel':
screeplot(x, npcs = min(10, length(x@model$sdev)), type = "barplot", 
  main = paste("h2o.prcomp(", x@data@key, ")", sep=""), ...)

Arguments

x
An H2OPCAModel object.
npcs
Number of components to be plotted.
type
Type of plot, must be either "barplot" or "lines".
main
Title of the plot.
...
Additional parameters to be passed to the plotting function.

Examples

Run this code
library(h2o)
localH2O = h2o.init()
ausPath = system.file("extdata", "australia.csv", package = "h2o")
australia.hex = h2o.importFile(localH2O, path = ausPath)
australia.pca = h2o.prcomp(data = australia.hex, standardize = TRUE)
screeplot(australia.pca)

Run the code above in your browser using DataLab