Skip to Content
R in a Nutshell, 2nd Edition
book

R in a Nutshell, 2nd Edition

by Joseph Adler
October 2012
Beginner to intermediate
721 pages
21h 38m
English
O'Reilly Media, Inc.
Content preview from R in a Nutshell, 2nd Edition

class

This package provides functions for classification.

Functions

FunctionDescription
SOM, batchSOMKohonen’s self-organizing maps (SOMs) are a crude form of multidimensional scaling.
condenseCondenses training set for k-nearest-neighbor (k-NN) classifier.
knnk-nearest-neighbor classification for test set from training set. For each row of the test set, the k-nearest (in Euclidean distance) training set vectors are found, and the classification is decided by majority vote, with ties broken at random. If there are ties for the kth nearest vector, then all candidates are included in the vote.
knn.cvk-nearest-neighbor cross-validatory classification from training set.
knn1Nearest-neighbor classification for test set from training set. For each row of the test set, the nearest neighbor (by Euclidean distance) training set vector is found, and its classification used. If there is more than one nearest neighbor, a majority vote is used, with ties broken at random.
lvq1, lvq2, lvq3Moves examples in a codebook to better represent the training set.
lvqinitConstructs an initial codebook for learning vector quantization (LVQ) methods.
lvqtestClassifies a test set by 1-NN from a specified LVQ codebook.
multieditMultiedit for k-NN classifier.
olvq1Moves examples in a codebook to better represent the training set.
reduce.nnReduces training set for a k-NN classifier. Used after condense.
somgridPlotting functions for SOM results.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R in a Nutshell

R in a Nutshell

Joseph Adler
The R Book, 2nd Edition

The R Book, 2nd Edition

Michael J. Crawley
The R Book

The R Book

Michael J. Crawley
R Packages

R Packages

Hadley Wickham

Publisher Resources

ISBN: 9781449358204Errata Page