getScalpelStep3: Read in results from Step 3 of SCALPEL.

Description Usage Arguments Value See Also Examples

View source: R/SCALPEL_helper.R

Description

This step allows the user to retrieve the object of class scalpelStep3 for results from a previous session.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
getScalpelStep3(
  outputFolder,
  version = NULL,
  cutoff = 0.18,
  omega = 0.2,
  lambdaMethod = "trainval",
  minClusterSize = 1,
  alpha = 0.9,
  lambda = NULL,
  removeBorder = FALSE,
  excludeReps = NULL
)

Arguments

outputFolder

The existing directory where the results that the user wishes to use are saved.

version

The 5-digit folder ID for the results that the user wishes to load. If NULL, automatically chooses the only version in outputFolder and if more than one version exists, returns an error.

cutoff

A value in [0,1] indicating the dendrogram cutpoint used. The default value is 0.18.

omega

A value in [0,1] indicating the dissimilarity metric weight used for clustering. The default value is 0.2.

lambdaMethod

How lambda was chosen: either "trainval" (default), "distn", or "user".

minClusterSize

The minimum number of preliminary dictionary elements that a cluster must have contained to have been included in the sparse group lasso. The default value is 1.

alpha

The value of alpha used to fit the sparse group lasso. The default value is 0.9.

lambda

The value of lambda used to fit the sparse group lasso. If NULL, automatically chooses the only lambda in directory and if more than one lambda exists, returns an error.

removeBorder

A logical scalar indicating whether the dictionary elements that contained pixels in the 10-pixel border of the video were removed prior to fitting the sparse group lasso. The default value is FALSE.

excludeReps

A vector giving the indices of which dictionary elements were excluded. The default value is NULL meaning no dictionary elements were manually excluded.

Value

An object of class scalpelStep3, which can be used with the plotting functions plotResults, plotResultsAllLambda, plotSpatial, plotTemporal, and plotBrightest.

See Also

scalpelStep3, scalpel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
### many of the functions in this package are interconnected so the
### easiest way to learn to use the package is by working through the vignette,
### which is available at ajpete.com/software

#assumes you have run the example for the "scalpel" function
#folder where results were saved
outputFolder = "scalpelResults"

#read previous results in
#simplest example with default parameters:
out = getScalpelStep3(outputFolder = outputFolder)
#note: if Step 1 has been run more than once, will need to specify 'version'

#example with optional parameters:
#need to enter if non-default options were used
out = getScalpelStep3(outputFolder = outputFolder, omega = 0.2, cutoff = 0.18,
                     alpha = 0.9, minClusterSize = 1)

## End(Not run)

scalpel documentation built on Feb. 3, 2021, 9:05 a.m.