感知器学习 - 最重要的特征(Perceptron learning - most important feature)

对于我在AI课程中的一项任务,我们的任务是创建Widrow Hoff delta规则的感知器学习实现。 我在java中编写了这个实现:

以下github链接包含该项目: https//github.com/dmcquillan314/CS440-Homework/tree/master/CS440-HW2-1

我遇到的问题不在于感知器的创造。 这工作正常。

在训练后的项目中,感知器然后将未分类的数据集应用于感知器,然后学习每个输入向量的分类。 这也很好。

我的问题涉及学习输入的哪个特征是最重要的。

例如,如果每个输入向量中的特征集是颜色,汽车模型和汽车制造,我们想要分类哪个特征是最重要的。 怎么会这样做呢。

我对此的原始理解使我相信计算相关系数是每个输入的特征值和产生的分类矢量。 然而,事实证明这是一个错误的假设。

还有其他方法可以学习最重要的功能吗?

编辑

样本权重向量:

(-752,4771,17714,762,6,676,3060,-2004,5459,9591.299,3832,14963,20912)

样本输入向量:

(55,1,2,130,262,0,0,155,0,0,1,0,3,0)

(59,1,3,126,218,1,0,134,0,2.2,2,1,6,1)

(45,1,2,128,308,0,2,170,0,0,1,0,3,0)

(59,1,4,110,239,0,2,142,1,1.2,2,1,7,1)

最后一个要素是分类。

当我找到答案时,我会在这里发布答案。 到目前为止,我认为教师给出的答案是不准确的。


For one of my assignments in my AI class we were tasked with creating a perceptron learning implementation of the Widrow Hoff delta rule. I've coded this implementation in java:

The following github link contains the project: https://github.com/dmcquillan314/CS440-Homework/tree/master/CS440-HW2-1

The issue that I'm having is not with the creation of the perceptron. That is working fine.

In the project after training the perceptron I then applied an unclassified dataset to the perceptron to then learn the classifications of each input vector. This also worked fine.

My issue pertains to learning which feature of the inputs is the most important.

For example, if the feature set within each input vector was color, car model, and car make and we wanted to classify which feature was the most important. How would one go about doing so.

My original understanding of this led me to believe that calculating the correlation coefficient the value of that feature for each input and the classification vector that is produced. However, this turned out to be a false assumption.

Is there some other way that the most important feature can be learned?

EDIT

Sample weight vector:

( -752, 4771, 17714, 762, 6, 676, 3060, -2004, 5459, 9591.299, 3832, 14963, 20912 )

Sample input vectors:

(55, 1, 2, 130, 262, 0, 0, 155, 0, 0, 1, 0, 3, 0)

(59, 1, 3, 126, 218, 1, 0, 134, 0, 2.2, 2, 1, 6, 1)

(45, 1, 2, 128, 308, 0, 2, 170, 0, 0, 1, 0, 3, 0)

(59, 1, 4, 110, 239, 0, 2, 142, 1, 1.2, 2, 1, 7, 1)

The last element is the classification.

I will post an answer here when I find one. So far I believe that the answer given by the instructor is inaccurate.


原文:https://stackoverflow.com/questions/21738277
2022-04-02 21:04

满意答案

g:netrw_keepdir设置为0可以为你工作而不是尝试绝对路径吗? 这不完全是你想要的(我怀疑它是采用vim CWD并将其应用于netrw而不是其他方式),但是如果你可以使用netrw管理你的vim CWD,你的命令可能只是工作原样。

编辑:请看:help netrw-c进行详细说明。 netrw中的c命令可能就足够了。


Well, as it turns out, when your cursor is on the .. in the file list it considers that a directory.

All I really needed to do was move the cursor into the banner area before trying to mt - or mt from the parent directory.

Whoops!

相关问答

更多

Vim netrw询问“按ENTER键或键入命令继续”(Vim netrw asking to “Press ENTER or type command to continue”)

v:scrollstart的内容可以用来了解为什么会发生这种情况。 有些选项可能与问题有关。 来自vim-faq : Vim will prompt you with the "hit enter to continue" prompt, if there are some messages on the screen for you to read and the screen is about to be redrawn. You can add the 'T' flag to ...

.vimrc .vim脚本/插件/ whatelse中的绝对路径或相对路径(.vimrc absolute or relative path in .vim script/plugin/whatelse)

相对等价于:source是:runtime 。 source ~/.vim/plugin/someplugin.vim 变 runtime plugin/someplugin.vim 有了这个,只要你也修改'runtimepath'选项中的路径,它应该可以工作。 或者,您也可以更改Vim中$HOME的值; 这也影响~的扩展: :let $HOME = '/home/yourlogin' The relative equivalent to :source is :runtime. sourc...

使用netrw在vim中自动加载远程文件(Automatically load remote files in vim using netrw)

您已经在问题中使用了正确的术语: 会话可以帮助您。 你创建一个通过:mksession ; 这基本上生成一个Vim脚本,当在新的Vim实例中执行时(通过:source Session.vim ),将恢复所有当前缓冲区。 这也适用于netrw的远程缓冲区 - 我只需通过:e!方式重新加载:e! 再次获取内容。 注意:有一些插件可以进一步简化会话处理; 我可以推荐vim-session插件。 You've already used the right term in your question: se...

Vim netrw源会话错误?(Vim netrw source session error?)

netrw插件使用所谓的临时缓冲区来显示文件列表。 内容不会持久化到磁盘; 相反,它们是由插件动态创建和更新的。 会话适用于由文件备份的“普通”缓冲区; 大多数插件都不适合他们。 某些会话管理器插件明确支持某些插件,但一般情况下,建议在创建会话之前关闭所有插件窗口,并在会话恢复后重新打开它们。 The netrw plugin uses a so-called scratch buffer to display the file listing. The contents are not pers...

如何在vim(netrw)中将所选目录设置为当前目录?(How to set selected directory as current in vim (netrw)?)

默认情况下,netrw的浏览目录与vim当前目录的概念不同(为了与vim v6中的资源管理器向后兼容)(另请参阅:help g:netrw_keepdir)。 它不会影响树根; 为此,使用:Ntree [dirname]。 我试过一个映射: map <leader>nt :Ntree<cr> 它按预期工作。 确保你有一个netrw v150或更高版本,但是 - :Ntree直到2014年1月才推出。 By default, netrw's browsing directory is not th...

远程文件系统上的vim netrw-mc(vim netrw-mc on remote filesystem)

你的步骤很好。 按照您的说明,我只是成功地将文件从远程scp://链接复制到本地系统(本地是GVIM 7.3.823,netrw v150h,远程Ubuntu 13.04服务器)。 一定要试用最新的开发版本 ; Chip博士不断改进他的插件。 有关进一步的故障排除(以及可能与问题联系的作者),请参阅:help netrw-debug 。 I was able make it working by using :e scp://remoteuser@remotehost/path/. The rea...

如何让netrw(在Vim中)使用绝对路径?(How do I get netrw (in Vim) to use the absolute path?)

将g:netrw_keepdir设置为0可以为你工作而不是尝试绝对路径吗? 这不完全是你想要的(我怀疑它是采用vim CWD并将其应用于netrw而不是其他方式),但是如果你可以使用netrw管理你的vim CWD,你的命令可能只是工作原样。 编辑:请看:help netrw-c进行详细说明。 netrw中的c命令可能就足够了。 Well, as it turns out, when your cursor is on the .. in the file list it considers th...

创建一个新文件但不在Vim netrw中打开缓冲区(Create a new file but not open a buffer in Vim netrw)

我想你将不得不覆盖映射。 autocmd filetype netrw call Netrw_mappings() function! Netrw_mappings() noremap <buffer>% :call CreateInPreview()<cr> endfunction 在这个函数中你将不得不重建netrw函数,但它并不难: function! CreateInPreview() let l:filename = input("please enter filename: ...

我可以在“vim -u NONE”之后启用Netrw吗?(Can I enable Netrw after `vim -u NONE`?)

跑 runtime plugin/netrwPlugin.vim 这将在运行时路径中搜索plugin/netrwPlugin.vim的第一个实例并获取文件。 Run runtime plugin/netrwPlugin.vim This will search for the first instance of plugin/netrwPlugin.vim in your runtime path and source the file.

如何在Vim中更轻松地进行文件系统导航 - Netrw(How to do easier filesystem navigation in Vim - Netrw)

我会用粗略的映射来处理你的第一个要求: :nnoremap <key> :Explore<CR>/ 并看看它是否真的需要更复杂。 你的第二个要求听起来不太可能,因为这意味着/用于两个截然不同的动作,在同一模式下听起来非常不像vim一样。 在我看来, <CR>更清晰,更直观。 Vim不进行模糊搜索,因此您需要编写自己的算法或将其从其他人的插件中提取出来。 set incsearch可能是一个很好的临时解决方案(对我来说肯定是)。 autocmd FileType netrw call feedke...

相关文章

更多

Feature分支-git入门教程

软件开发中,总有无穷无尽的新的功能要不断添加进来。 添加一个新功能时,你肯定不希望因为一些实验性质的代 ...

每日英语:7 Important Questions to Ask Yourself Today

“What you do today is important because you are exc ...

应用特征备份

[ver] ver=4.201011040000 maxid=190 # ...

使用 Apache Lucene 和 Solr 进行位置感知搜索——通过合并非结构化文本和空间数据改进搜索应用程序

简介: 不管是通过支持 GPS 的智能手机查找最近的咖啡馆,还是通过社交站点查找附近的朋友,或是查看特 ...

如何做最重要的事

如果你对项目管理、系统架构有兴趣,请加微信订阅号“softjg”,加入这个PM、架构师的大家庭 ...

路由器基础知识点汇总学习

一、路由器配置途径   可以通过以下几个途径来配置路由器:   1. 用主控Console口接终端 ...

形容一个人的特征

一天,老师让小明形容一个人的特征。 老师:小明,你来形容一个人,还要突出他的特征。 小明:我的 ...

推荐!国外程序员整理的机器学习资源大全(转)

本文由伯乐在线-toolate翻译自awesome-machine-learning。欢迎加入技术翻译 ...

不错的英文商业站点,可以学习

http://semetricmedia.com/our-team very IMPORTANT ar ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本