View source: R/reconcileTransitionProbability.R
reconcileTransitionProbability | R Documentation |
This is the main function for creating reconciliation plots and tables which helps in comparing the transition probabilities calculated manually and from markovchain function
reconcileTransitionProbability(
df,
hmap_type = NULL,
cellid_column,
time_column
)
df |
Data frame. The input data frame should contain two columns, cell ID from scoreHVT function and timestamp of that dataset. |
hmap_type |
Character. ('self_state', 'without_self_state', or 'All') |
cellid_column |
Character. Name of the column containing cell IDs. |
time_column |
Character. Name of the column containing timestamps |
A list of plotly heatmap objects and tables representing the transition probability heatmaps.
PonAnuReka Seenivasan <ponanureka.s@mu-sigma.com>, Vishwavani <vishwavani@mu-sigma.com>
dataset <- data.frame(date = as.numeric(time(EuStockMarkets)),
DAX = EuStockMarkets[, "DAX"],
SMI = EuStockMarkets[, "SMI"],
CAC = EuStockMarkets[, "CAC"],
FTSE = EuStockMarkets[, "FTSE"])
hvt.results<- trainHVT(dataset,n_cells = 60, depth = 1, quant.err = 0.1,
distance_metric = "L1_Norm", error_metric = "max",
normalize = TRUE,quant_method = "kmeans")
scoring <- scoreHVT(dataset, hvt.results)
cell_id <- scoring$scoredPredictedData$Cell.ID
time_stamp <- dataset$date
dataset <- data.frame(cell_id, time_stamp)
reconcileTransitionProbability(dataset, hmap_type = "All",
cellid_column = "cell_id", time_column = "time_stamp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.