Learn R Programming

LPStimeSeries (version 1.0-5)

plotMDS: Multi-dimensional Scaling Plot of Learned Pattern Similarity

Description

Plot the scaling coordinates of the Learned Pattern Similarity.

Usage

plotMDS(object, newdata, classinfo, k=2, palette=NULL, pch=20, ...)

Arguments

object
an object of class learnPattern, as that created by the function learnPattern.
newdata
a data frame or matrix containing the data for similarity computation.
classinfo
labels for the time series for color-coding.
k
number of dimensions for the scaling coordinates.
palette
colors to use to distinguish the classes; length must be the equal to the number of levels.
pch
plotting symbols to use.
...
other graphical parameters.

Value

The output of cmdscale on scaled Learned Pattern similarity is returned invisibly.

See Also

learnPattern

Examples

Run this code
set.seed(1)
data(GunPoint)
## Learn patterns on GunPoint training series with default parameters
ensemble=learnPattern(GunPoint$trainseries)
plotMDS(ensemble, GunPoint$trainseries,GunPoint$trainclass)

## Using different symbols for the classes:
plotMDS(ensemble, GunPoint$trainseries,GunPoint$trainclass, 
         palette=rep(1, 2), pch=as.numeric(GunPoint$trainclass))
         
## Learn patterns on GunPoint training series with random splits
ensemble=learnPattern(GunPoint$trainseries,random.split=1)
plotMDS(ensemble, GunPoint$trainseries,GunPoint$trainclass,main='Random Splits')

Run the code above in your browser using DataLab