Learn R Programming

EmbedSOM (version 2.2)

RandomMap: Create a map by randomly selecting points

Description

Create a map by randomly selecting points

Usage

RandomMap(data, k, coordsFn)

Value

map object (without the grid, if coordsFn was not specified)

Arguments

data

Input data matrix, with individual data points in rows

k

How many points to sample

coordsFn

a function to generate embedding coordinates (default none)

Examples

Run this code
d <- iris[,1:4]
EmbedSOM::PlotEmbed(
  EmbedSOM::EmbedSOM(
    data = d,
    map = EmbedSOM::RandomMap(d, 30, EmbedSOM::GraphCoords())),
  pch=19, clust=iris[,5]
)

Run the code above in your browser using DataLab