Learn R Programming

RFmarkerDetector (version 1.0.1)

plot.mds: Multi-dimensional Scaling (MDS) Plot

Description

This function plots the scaling coordinates of the proximity matrix from random forest.

Usage

"plot"(mds_obj, xrange, yrange)

Arguments

mds_obj
an object of class mds
xrange
a vector of two elements indicating the interval along the x-axis in which we want to display the names of the samples
yrange
a vector of two elements indicating the interval along the y-axis in which we want to display the names of the samples

Details

From the trained model we can get the dissimilarity matrix ** 1 - prox(i,j) ** The entries of this matrix can be seen as squared distances in a Euclidean high dimensional space. After having calculated scaling coordinates, we can project the data onto a lower dimensional space, preserving (as much as possible) the distances between the orginal points. This plot can be useful for discovering patterns in data.

Examples

Run this code
## data(cachexiaData)
## params = list(ntree = 1000, mtry = round(sqrt(ncol(cachexiaData) -2)), seed = 1234)
## mds_obj <- mds(cachexiaData, opt = params)
## plot.mds(mds_obj = mds_obj)

Run the code above in your browser using DataLab