MATLAB 中的自组织映射 (SOM) 问题
我有一个包含数据的文本文件。 我的文本文件:
young, myopic, no, reduced, no
young, myopic, no, normal, soft
young, myopic, yes, reduced, no
young, myopic, yes, normal, hard
young, hyperopia, no, reduced, no
young, hyperopia, no, normal, soft
young, hyperopia, yes, reduced, no
young, hyperopia, yes, normal, hard
我读取了我的文本文件加载方法
%young=1
%myopic=2
%no=3 etc.
load iris.txt
net = newsom(1,[1 5]);
[net,tr] = train(net,1);
plotsomplanes(net);
错误代码:
???未定义的函数或方法 'plotsomplanes' 用于输入参数 输入“网络”。
I have a text file that include data.
My text file:
young, myopic, no, reduced, no
young, myopic, no, normal, soft
young, myopic, yes, reduced, no
young, myopic, yes, normal, hard
young, hyperopia, no, reduced, no
young, hyperopia, no, normal, soft
young, hyperopia, yes, reduced, no
young, hyperopia, yes, normal, hard
I read my text file load method
%young=1
%myopic=2
%no=3 etc.
load iris.txt
net = newsom(1,[1 5]);
[net,tr] = train(net,1);
plotsomplanes(net);
Error code:
??? Undefined function or method
'plotsomplanes' for input arguments of
type 'network'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
鉴于您显示的文本文件,LOAD 函数将不起作用。您应该使用 TEXTSCAN 来解析文本文件。然后,我使用 GRP2IDX 将标称数据转换为数字属性(它将为每个属性值分配 1,2,3,..)。在这种情况下,数据变为:
我应该提到,您可能需要更大的数据集(更多实例)才能获得任何有意义的结果...
Given the text file you're showing, the LOAD function will not work. You should use TEXTSCAN to parse the text file. I then use GRP2IDX to convert the nominal data into numeric attributes (it will assign 1,2,3,.. for each attribute values). In this case the data becomes:
I should mention that you will probably need a much larger dataset (more instances) to get any meaningful results...