dimRedResult-class {dimRed}R Documentation

Class "dimRedResult"

Description

A class to hold the results of of a dimensionality reduction.

Usage

## S4 method for signature 'dimRedResult'
predict(object, xnew)

## S4 method for signature 'dimRedResult'
inverse(object, ynew)

## S4 method for signature 'dimRedResult'
as.data.frame(
  x,
  org.data.prefix = "org.",
  meta.prefix = "meta.",
  data.prefix = ""
)

## S4 method for signature 'dimRedResult'
getPars(object)

## S4 method for signature 'dimRedResult'
getNDim(object)

## S4 method for signature 'dimRedResult'
print(x)

## S4 method for signature 'dimRedResult'
getOrgData(object)

## S4 method for signature 'dimRedResult'
getDimRedData(object)

## S4 method for signature 'dimRedResult'
ndims(object)

## S4 method for signature 'dimRedResult'
getOtherData(object)

Arguments

object

Of class dimRedResult

xnew

new data, of type dimRedData

ynew

embedded data, of type dimRedData

x

Of class dimRedResult

org.data.prefix

Prefix for the columns of the org.data slot.

meta.prefix

Prefix for the columns of x@data@meta.

data.prefix

Prefix for the columns of x@data@data.

Methods (by generic)

Slots

data

Output data of class dimRedData.

org.data

original data, a matrix.

apply

a function to apply the method to out-of-sampledata, may not exist.

inverse

a function to calculate the original coordinates from reduced space, may not exist.

has.org.data

logical, if the original data is included in the object.

has.apply

logical, if a forward method is exists.

has.inverse

logical if an inverse method exists.

method

saves the method used.

pars

saves the parameters used.

other.data

other data produced by the method, e.g. a distance matrix.

Examples

## Create object by embedding data
iris.pca <- embed(loadDataSet("Iris"), "PCA")

## Convert the result to a data.frame
head(as(iris.pca, "data.frame"))
head(as.data.frame(iris.pca))

## There are no nameclashes to avoid here:
head(as.data.frame(iris.pca,
                   org.data.prefix = "",
                   meta.prefix     = "",
                   data.prefix     = ""))

## Print it more or less nicely:
print(iris.pca)

## Get the embedded data as a dimRedData object:
getDimRedData(iris.pca)

## Get the original data including meta information:
getOrgData(iris.pca)

## Get the number of variables:
ndims(iris.pca)


[Package dimRed version 0.2.6 Index]