K_corrplot: K_corrplot

View source: R/plot.R

K_corrplotR Documentation

K_corrplot

Description

'K_corrplot()' is a wrapper around 'corrplor::corrplot()' that returns a corrplot for visualizing the similarity matrix of site and background bags.

Usage

K_corrplot(K, train_data, clusters = 4)

Arguments

K

[K] - Similarity Kernel Matrix

train_data

[list] - training data

clusters

[scalar] - Number of clusters

Details

This function is a wrapper of 'corrplot::corrplot()' with defaults and hierarchical clustering order. The inputs are the similarity kernel matirx 'K', the 'train_data' used to creat 'K', and the number of clusters to display. The 'train_data' is only used to procure the labels for site and background bags.

Value

- a correlation matrix object

Examples

## Not run: 
##### Logistic Mean Embedding KRR Model
#### Build Kernel Matrix
K <- build_K(train_data, sigma = sigma, dist_metric = dist_metric, progress = FALSE)
#### Train KLR model
train_log_pred <- KLR(K, train_presence, lambda, 100, 0.001, verbose = 2)
### Plot K Matrix
K_corrplot(K, train_data, clusters = 4)

## End(Not run)


mrecos/klrfome documentation built on April 6, 2022, 8:02 p.m.