http://featureselection.asu.edu/software.php中的Information Gain,运行会提示,错误:Undefined variable "weka" or class "weka.attributeSelection.InfoGainAttributeEval".
这个软件包是*.jar文件,原以为解压就能找到安装文件,但没有。Weiqiang讲要安装java软件。Feature Selection Package软件安装过程如下
第一步:安装java(使用我电脑中的“JAVA 虚拟机”),并配置环境变量:计算机->属性->高级系统设置->环境变量->lenovo的用户变量->Path(如果没有PATH,新建一个变量PATH即可)->编辑->(加入”; C:\Program Files (x86)\Java\jre1.6.0_02\bin”到“变量值”,注意此处路径名可能不同);
第二步:安装FeatureSelection-Installer.jar到E: \Feature Selection Package: 运行cmd->E:(定位到E盘);cmd->cd E:\Kingsoft\other\matlab 2007a\work\Feature selection\说明(目的,定位到FeatureSelection-Installer.jar所在目录) ->java -jar FeatureSelection-Installer.jar
在安装过程中会有提示:
what to do once you've installed Feature Selection Package:
1. Open MATLAB
2. Use MATLAB's 'cd' function to navigate to the folder you
installed Feature Selection Package into.
3. Run the load_fspackage function with the command: 'load_fspackage'
4. Select all of the commands you have run in this session, right click,
and select 'Create Shortcut'. This will give you a shortcut which
you can use to open Feature Selection Package at your choosing.
只要到这里的2,3和4不要管,Weiqiang也不知此处4步代表啥含义,没管这一步。
第三步:将load_fspackage.m的最开始一句”curPath = pwd;”(pwd的含义查matlab帮助即可,就是当前目录)中将pwd换成load_fspackage.m所在的目录'E:\Feature Selection Package\fspackage'即可。在要使用该工具包的程序的最开始加上加上run('E:\Feature Selection Package\fspackage\load_fspackage.m'),这样就不会出现如下错了:Undefined variable "weka" or class "weka.attributeSelection.InfoGainAttributeEval".
已经按照上述步骤,在我台式机成功安装FeatureSelection-Installer.jar软件(台式机原来没安装java软件)。This is with Weiqiang Ren's help.