首页 \ 问答 \ 感知器学习 - 最重要的特征(Perceptron learning - most important feature)

感知器学习 - 最重要的特征(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!

相关问答

更多
  • 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 the ' ...
  • 相对等价于: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. source ~/. ...
  • 您已经在问题中使用了正确的术语: 会话可以帮助您。 你创建一个通过:mksession ; 这基本上生成一个Vim脚本,当在新的Vim实例中执行时(通过:source Session.vim ),将恢复所有当前缓冲区。 这也适用于netrw的远程缓冲区 - 我只需通过:e!方式重新加载:e! 再次获取内容。 注意:有一些插件可以进一步简化会话处理; 我可以推荐vim-session插件。 You've already used the right term in your question: session ...
  • netrw插件使用所谓的临时缓冲区来显示文件列表。 内容不会持久化到磁盘; 相反,它们是由插件动态创建和更新的。 会话适用于由文件备份的“普通”缓冲区; 大多数插件都不适合他们。 某些会话管理器插件明确支持某些插件,但一般情况下,建议在创建会话之前关闭所有插件窗口,并在会话恢复后重新打开它们。 The netrw plugin uses a so-called scratch buffer to display the file listing. The contents are not persisted ...
  • 默认情况下,netrw的浏览目录与vim当前目录的概念不同(为了与vim v6中的资源管理器向后兼容)(另请参阅:help g:netrw_keepdir)。 它不会影响树根; 为此,使用:Ntree [dirname]。 我试过一个映射: map nt :Ntree 它按预期工作。 确保你有一个netrw v150或更高版本,但是 - :Ntree直到2014年1月才推出。 By default, netrw's browsing directory is not the sam ...
  • 你的步骤很好。 按照您的说明,我只是成功地将文件从远程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 reason b ...
  • 将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 ...
  • 我想你将不得不覆盖映射。 autocmd filetype netrw call Netrw_mappings() function! Netrw_mappings() noremap % :call CreateInPreview() endfunction 在这个函数中你将不得不重建netrw函数,但它并不难: function! CreateInPreview() let l:filename = input("please enter filename: ") ...
  • 跑 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.
  • 我会用粗略的映射来处理你的第一个要求: :nnoremap :Explore/ 并看看它是否真的需要更复杂。 你的第二个要求听起来不太可能,因为这意味着/用于两个截然不同的动作,在同一模式下听起来非常不像vim一样。 在我看来, 更清晰,更直观。 Vim不进行模糊搜索,因此您需要编写自己的算法或将其从其他人的插件中提取出来。 set incsearch可能是一个很好的临时解决方案(对我来说肯定是)。 autocmd FileType netrw call feedkeys("/ ...

相关文章

更多

最新问答

更多
  • 如何检索Ember.js模型的所有属性(How to retrieve all properties of an Ember.js model)
  • maven中snapshot快照库和release发布库的区别和作用
  • arraylist中的搜索元素(Search element in arraylist)
  • 从mysli_fetch_array中获取选定的值并输出(Get selected value from mysli_fetch_array and output)
  • Windows Phone上的可用共享扩展(Available Share Extensions on Windows Phone)
  • 如何在命令提示符下将日期设置为文件名(How to set file name as date in command prompt)
  • 如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)
  • 从iframe访问父页面的id元素(accessing id element of parent page from iframe)
  • linux的常用命令干什么用的
  • Feign Client + Eureka POST请求正文(Feign Client + Eureka POST request body)
  • 怎么删除禁用RHEL/CentOS 7上不需要的服务
  • 为什么Gradle运行测试两次?(Why does Gradle run tests twice?)
  • 由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)
  • 如何交换返回集中的行?(How to swap rows in a return set?)
  • 在android中的活动之间切换?(Switching between activities in android?)
  • Perforce:如何从Depot到Workspace丢失文件?(Perforce: how to get missing file from Depot to Workspace?)
  • Webform页面避免运行服务器(Webform page avoiding runat server)
  • 在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
  • 内存布局破解(memory layout hack)
  • 使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)
  • 我们可以有一个调度程序,你可以异步添加东西,但会同步按顺序执行吗?(Can we have a dispatcher that you can add things todo asynchronously but will be executed in that order synchronously?)
  • “FROM a,b”和“FROM a FULL OUTER JOIN b”之间有什么区别?(What is the difference between “FROM a, b” and “FROM a FULL OUTER JOIN b”?)
  • Java中的不可变类(Immutable class in Java)
  • bat批处理文件结果导出到txt
  • WordPress发布查询(WordPress post query)
  • 如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)
  • 是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)
  • 德州新起点计算机培训学校主要课程有什么?
  • GEP分段错误LLVM C ++ API(GEP segmentation fault LLVM C++ API)
  • “latin1_german1_ci”整理来自哪里?(Where is “latin1_german1_ci” collation coming from?)