plot.sasfclust {sasfunclust}R Documentation

Plot the results of the Sas-funclust method

Description

This function provides plots of the estimated cluster mean functions and of the classified curves when applied to the output of sasfclust, whereas provides the cross-validation plots when applied to the output of sasfclust_cv. In the latter case the first plot displays the CV values as a function of G, lambda_s and lambda_l; the second plot displays the CV values as a function of lambda_s and lambda_l for G fixed at its optimal value; the third plot displays the CV values as a function of lambda_l for G and lambda_s fixed at their optimal value.

Usage

## S3 method for class 'sasfclust_cv'
plot(x, ...)

## S3 method for class 'sasfclust'
plot(x, ...)

Arguments

x

The output of either sasfclust or sasfclust_cv.

...

No additional parameters, called for side effects.

Value

No return value, called for side effects.

Examples


library(sasfunclust)
train<-simulate_data("Scenario I",n_i=20,var_e = 1,var_b = 0.5^2)
lambda_s_seq=10^seq(-4,-3)
lambda_l_seq=10^seq(-1,0)
G_seq=2
mod_cv<-sasfclust_cv(X=train$X,grid=train$grid,G_seq=G_seq,
lambda_l_seq = lambda_l_seq,lambda_s_seq =lambda_s_seq,maxit = 20,K_fold = 2,q=10)
plot(mod_cv)
mod<-sasfclust(X=train$X,grid=train$grid,lambda_s = 10^-6,lambda_l =10,G = 2,maxit = 20,q=10)
plot(mod)


[Package sasfunclust version 1.0.0 Index]