1

我在 .txt 文件中有以下数据格式。

नोभेम्बर 
 [0.013597779962868256, -0.10849757437254635, -0.15999846585159766, -1.2417475384869558, -0.6802765400695919, 0.44552601044477186, 0.10820787964125786, -1.584483680411645, 0.2007759414522207, -0.7101547556233192]
 बाट
[0.7488351202673913, 0.3645634610332536, 0.1937027124201285, -0.10361011958447905, 0.48222626651261347, 0.36795608937720814, -0.06307932558713457, -0.05626217864435294, -0.5245206209054951, 0.40256760017279525]
रूपमा
[0.06077674960453302, 0.2570556052636379, 0.3347552495487344, -0.10512580657948888, 0.10414134700640766, 0.19736087970834254, 0.09207914995816116, 0.19904934221006, 0.061402311347008, -0.11409541813280075]
बोर्डमा
[0.5200111891848155, -0.14947230042320633, 0.7351562111464331, -0.7542450932215059, 1.4477558941048831, -0.6235133303135835, -0.7781689512584442, -0.057886889872348815, 0.10625424653444066, 0.9777761194886687]
आउनु
[1.0596966006985387, 0.24909505933749815, 0.5181999691383957, -0.01983089009044503, -1.4106664226234644, -0.020542297788816014, -0.7822719255911348, 0.42914674116391344, -0.5753257725556651, -0.9141151600890186]

这个词就像 नोभेम्बर 是数据点,而数值是它们的向量表示。我想以这些表示为坐标并绘制它们以找到它们之间的关系。绘制它们的可能性是什么。非常感谢任何建议的工具。

4

2 回答 2

2

我的 GUI 无法处理项目名称的字体,但如果我将它们命名为:a、b、cc、d、e,您可以使用平行坐标图来显示多维特征:

require(MASS)  # an R package
parcoord(data.frame(a=a,b=b,cc=cc,d=d,e=e), col=1:5)

在此处输入图像描述

于 2012-04-25T14:03:49.597 回答
1

这是一个 MATLAB 解决方案。

首先我们读取数据。尽管 MATLAB 能够读取 Unicode 文本,但它在 GUI 中显示它有一些问题(所以我只是用 Point1/Point2 等替换标签。)

%# read file lines
fid = fopen('data.txt', 'rt', 'native', 'UTF-8');
C = textscan(fid, '%s', 'Delimiter','\n');
fclose(fid);
C = C{1};

%# split into labels/data
labels = C(1:2:end);
data = cellfun(@str2num, C(2:2:end), 'UniformOutput',false);
data = cell2mat(data);

%# HACK: MATLAB has issues displaying unicode text
labels = num2str((1:size(data,1))', 'Point %d');

接下来我们可以使用平行坐标绘制数据:

%# you might need to normalize the attributes
%#data = zscore(data);

plot(data');            %'# plot lines
set(gca, 'XTick',1:numDim, 'XGrid','on')
xlabel('Features'), ylabel('Feature value')
title('Parallel Coordinates')
legend(labels)          %# show legend of labels

平行坐标

如果您有权访问统计工具箱,则可以使用多种技术可视化多元数据:

%# parallel coordinates (similar the above)
parallelcoords(data, 'Group',labels)

%# glyph plot (stars)
glyphplot(data, 'obslabels',labels, 'glyph','star')

glyphplot_star

%# glyph plot (Chernoff faces)
glyphplot(data, 'obslabels',labels, 'glyph','face')

glyphplot_face

%# Andrews curves
andrewsplot(data, 'Group',labels)

安德鲁斯图

于 2012-04-25T21:46:42.567 回答