Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: rpclib
See also: xgobiisotonic xgobilinreg xgobiknn

Macro: xgobisknn
Description: conmputes a symmetrized k-nn fit for XGobi

Link:
Usage: yh = xgobisknn(x,y,g,h)
Input:
x n x 1 matrix
y n x 1 matrix
g n x 1 matrix with integers starting at zero
kp scalar number of neighbours
Output:
yh n x 1 matrix smoothed fit

Note:

Example:
; load the library for XGobi
library ("rpclib")
; create a display
d=createdisplay(1,1)
; read a data set
x=read("motcyc")
; generate randomly three subgroups
g=floor(3.*uniform(rows(x)))
; color the data after the subgroups
setmaskp (x, g, 3, 4)
; show the data and the smooth
show (d, 1, 1, x, x[,1]~xgobisknn(x[,1],x[,2],g,7))
Result:
shows a symmetrized k-nn fit for the three different 
subgroups in the data

Library: rpclib
See also: xgobiisotonic xgobilinreg xgobiknn

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Sigbert Klinke, 960709
(C) MD*TECH Method and Data Technologies, 28.6.1999