project: Project data into fewer dimensions

View source: R/project.R

projectR Documentation

Project data into fewer dimensions

Description

Reduces the dimensionality of a data set.

Usage

project(x, w)

Arguments

x

a data frame

w

a matrix with named rows and columns

Details

Each column of w specifies a new variable, which is to be constructed by combining existing variables according to the given weights.

Value

A data frame where the variables named in the rows of w are replaced by new variables named in the columns of w. Other variables are left unchanged.

Author(s)

Tom Minka

See Also

pca, projection, plot_axes

Examples

data(iris)
w = projection(iris, k=2)
# w only involves the continuous attributes
# the new variables are h1 and h2
x = project(iris, w)
# in RStudio use dev.new()
color.plot(x)
plot_axes(w)

paulemms/datamining documentation built on March 1, 2023, 4:01 p.m.