matlab中swis,关于Swiss Roll数据集

Swiss

Roll Dataset

Dinoj Surendran,

16 May 2004

This

data set was created to test out various dimensionality reduction

algorithms. The idea was to create several points in 2d, and then

map them to 3d with some smooth function, and then to see what the

algorithm would find when it mapped the points back to 2d.

The

original data was created by randomly sampling from a Gaussian

Mixture Model with centers/means at (7.5,7.5), (7.5,12.5),

(12.5,7.5) and (12.5,12.5). The covariance for each gaussian was

the 2x2 identity matrix. This was created with

the

ppm = [400 400 400 400]; % points per mixture

centers = [7.5 7.5; 7.5 12.5; 12.5 7.5; 12.5 12.5];

stdev = 1;

[data2,labels]=makegaussmixnd(centers,stdev,ppm);

plotcol (data2, ppm, 'rgbk');

And then

printing the resulting plot with the printt.m function

:

printt ('original_7p5_12p5_400');

a4c26d1e5885305701be709a3d33442f.png

There

are 400 points in each of the four clusters above. The actual data

points can be found in the file preswissroll.dat,

which has a 1600x2 matrix, andpreswissroll_labels.dat,

which has a 1600x1 vector of labels (1,2,3 or 4 depending on which

mixture model the point was generated from).

The data

was then converted from 2 to 3 dimensions with the Swiss Roll

mapping (x,y) -> (x cos x, y, x sin x). Matlab code

for this:

X = data2(:,1);

Y = data2(:,2);

data3 = [X.*cos(X) Y X.*sin(X)];

plotcol (data3,ppm,'rgbk');

This

results in the dataset swissroll.dat (a

1600 x 3 matrix) represented in the picture below. It was created

with the Partiview files

a4c26d1e5885305701be709a3d33442f.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值