View source: R/plotQuantErrorHistogram.R
plotQuantErrorHistogram | R Documentation |
This is the function that produces histograms displaying the distribution of Quantization Error (QE) values for both train and test datasets, highlighting mean values with dashed lines for quick evaluation.
plotQuantErrorHistogram(hvt.results, hvt.scoring)
hvt.results |
List. A list of hvt.results obtained from the trainHVT function. |
hvt.scoring |
List. A list of hvt.scoring obtained from the scoreHVT function. |
Returns the ggplot object containing the quantization error distribution plots for the given HVT results of training and scoring
Shubhra Prakash <shubhra.prakash@mu-sigma.com>
plotHVT
data("EuStockMarkets")
dataset <- data.frame(date = as.numeric(time(EuStockMarkets)),
DAX = EuStockMarkets[, "DAX"],
SMI = EuStockMarkets[, "SMI"],
CAC = EuStockMarkets[, "CAC"],
FTSE = EuStockMarkets[, "FTSE"])
rownames(EuStockMarkets) <- dataset$date
#Split in train and test
train <- EuStockMarkets[1:1302, ]
test <- EuStockMarkets[1303:1860, ]
hvt.results<- trainHVT(train,n_cells = 60, depth = 1, quant.err = 0.1,
distance_metric = "L1_Norm", error_metric = "max",
normalize = TRUE, quant_method = "kmeans")
scoring <- scoreHVT(test, hvt.results)
plotQuantErrorHistogram(hvt.results, scoring)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.