The sharing of resources about Statistical Learning Theory and Machine Learning(includeing SVM,Semi-Supervised Learning,Ensemble Learning,Clustering) ,welcome to contact and communicate with me: Email: xiankaichen@gmail.com,QQ:112035246,

Friday, June 27, 2008

spss数据归一化处理

这里有详细的介绍关于用spss对数据进行的标准化的方法:
http://blog.sina.com.cn/s/blog_49f78a4b01000844.html
需要补充的是,标准化后的数据追加在原来数据表中。

Wednesday, June 25, 2008

Box Plot Graphs(盒图)

  • Conceptual Overview

Box Plot graphs, also referred to as Box and Whisker Plot graphs, are quite common in statistics and quality measurements. Graphs in the Box Plot data class organize data items by category. There is only one series of data, and all data items are the same color.

A Box Plot graph data item has five main values: Low, Q1, Median, Q3 and High. These numbers are determined from the data set you are using to create the Box Plot. The data set also can have any number of Outlier data values.

Let's look at an example with a small set of data:

35, 42, 48, 50, 51, 53, 54, 60, 75

Important: These are not the numbers we send to the graph. These are the number we use to compute the values that we send to the graph. The graph itself cannot compute these figures for us.

In this case, the Median value is 51. If we divide the data into two sets, we have 35, 42, 48, 50, 51 and 51, 53, 54, 60, 75 (the Median value is included in both sets because there is an odd number of items). Now we find the median of each of these two sets to find the first quartile, Q1, and the third quartile, Q3. These numbers are 48 and 54 respectively.

The difference between Q1 and Q3 is 6 (54 - 48 = 6). This is called the inter quartile range or IQR. The Low and High values are based on the IQR. The Low value, or lower whisker, is a maximum of 1.5 times the IQR below Q1; in this case, that is a maximum of 9 (6 x 1.5 = 9). So the minimum Low value for our example is 39 (48 - 9 = 39). However, because the Low value is the smallest data item value that is equal to or greater than the minimum Low value; in our set the Low value is 42.

The High value, or upper whisker, is determined similarly. We find the maximum High value, which is Q3 plus 1.5 times the IRQ, or 63 (54 + 9 = 63). We then find the data item value that is equal to or less than the maximum High value; in our data set, the High value is 60.

Therefore, for this data set, the values are as follows: Low=42, Q1=48, Median=51, Q3=54 and High=60.

So what do we do with the values 35 and 75? These are Outlier values, because they are more than 1.5 times the IQR away from Q1 and Q3. Each Outlier value is represented by a small circle symbol in the Box Plot graph. If an Outlier is more than 3 times the IQR away from Q1 or Q3, it is classified as an extreme Outlier and is represented in the graph by a plus sign. In our example, the lower threshold for an extreme Outlier is Q1 minus 3 times the IQR, or 30 (48 - (3 x 6) = 30). Since our minimum data value is 35 and thus higher than this threshold, it is a normal Outlier. The upper threshold for an extreme Outlier is Q3 plus 3 times the IQR, or 72 (54 + (3 * 6) = 72). Our maximum data value is 75 and thus larger than this threshold, making it an extreme Outlier value.

The image below displays the Box Plot graph derived from our data set.

Box Plot graphs are in the Box Plot Data Class.

  • Possible Uses

Box Plot graphs can be used for:

  • Statistical analysis

  • Emphasize outlying data

Tuesday, June 24, 2008

Bootstrap抽样方法(原理与实现)

  • 引用文章,“我的一些统计方法观”( 作者:谢益辉)。文章中是这样阐述的:Bootstrap的一般的抽样方式都是“有放回地全抽”(其实样本量也要视情况而定,不一定非要与原样本量相等),意思就是抽取的Bootstrap样本量与原样本相同,只是在抽样方式上采取有放回地抽,这样的抽样可以进行B次,每次都可以求一个相应的统计量/估计量,最后看看这个统计量的稳定性如何(用方差表示)。
  • 可以简单的看出Bootstrap是非常简单但是又有点古怪的抽样方法。集成学习方法Bagging里面提到的Bootstrap抽样的真正含义在上面得到了真正的解释。在Bagging中的抽样具体怎么实现呢?可以简单使用R软件 里面的sample(x,replace=TRUE,num)函数实现Bootstrap抽样.x表示被抽样的样本,replace=TRUE表示有回放抽样,反之不回放抽样,num表示你要抽样的个数.下面是实验效果(点击查看)


  • 实现比较简单明了,容易明白。

我对算法模型的总结

最近在做算法改进,发现了很多问题,也从中学习到了很多知识,打算总结一下,好使得思路更加的清晰。
1,数据预处理。这里包括了很多分析方法,在这里需要做的是,收集,噪音处理(吴信东做的不错),相关性分析(p卡方检验可以),主成份分析(在学习中)。
2,选择适当的学习算法,得到训练模型。模型的训练的时候存在一个很直接的问题,就是模型参数选择的问题,可以使用交叉验证来评价选择参数的合理性。
3,用模型对测试数据预测。
4,算法评估。时间复杂度分析,空间复杂度分析,最高精度比较,显著性检验(配对 t-检验),我比较赞同后者的评估方法,很多算法都那最高精度的进行比较,显然这不是很合理的,因为这些结果可能没有再现性,所以需要做显著性检验来说明改进后的实验结果是有显著性差别的,如果没有显著性差别,我认为就算它的实验结果最高精度多好也不能说明你的模型比别人的好。
下面以支持向量机做进一步的说明
(1),设训练集为S={x1,...xn},Y={-1,+1},S已经经过了预处理了,这里主要说明2-4部分的实现细节。
(2),为了分出训练集和测试集我们使用随机抽样的方法,抽样的方法可以这样,可以利用randon函数为每个样本随机产生一个随机数,然后按照随机数的大小对样本进行排序,然后对排序后的样本按一定的比例进行抽取样本(如7:3,70%是训练集,剩下的为30%测试集),注意每次抽样的训练集和测试集可能不相同的,因此,做一次抽样出来的数据,特别是训练集的数据,它可能不是模型所服从的分布,在这个时候,我们可以做多次抽样,训练得到每个不同的模型,然后选择模型精度最好的做为算法的模型。如果在一开始就已经分好了训练集和测试集,那么我们就可以省略这步骤了。
(3),在(2)后,得到的训练集和测试集就不要再改变了,接下来就是训练模型,训练模型就是从训练集应用支持向量机算法得到一个用于3中的预测的一个模型。为了训练得到这个模型,我们使用交叉验证来评价某一个参数下(算法)得到的模型的合理性。为此我们使用10折交叉验证法,这里也顺便介绍一下10折交叉验证法:(点击下面图片可以清晰阅读在这里一般k=10,就是说,选择了支持向量机的参数(C,核函数的参数)p(是一个参数向量)之后,我们将训练集分成10分,循环十次得到交叉验证误差e,则e就可以做为对参数p好坏的一个评价,当e小的时候说明p参数是好的,当e大的时候说明p参数是不好的,在选择p的时候得凭借一定的经验进行选择,也需要耐心,从众多的候选参数p中我们选择e最小时的参数p做为支持向量机的参数,然后对训练集进行训练得到相应的模型M。
(4),得到了模型M之后,我们接下来就要利用测试集检验模型M的精度了。
(5),在(2)中提到(3)中训练提出来的模型M不一定是合理的,因此我们得要重复执(2)进行多次抽样,得到多个模型M_i,选择其中预测继精度最好的模型最为最终的支持向量机模型。
(6),对你的算法进行各方面的评估,如果就精度而言,可以考虑做统计检验,或者认为最高的精度可以做为算法的一个评价;就速度而言,就要着重考虑时间复杂度和空间复杂度分析了。

以上的步骤是实现并应用支持向量机的核心内容,也是我自己总结的,有不当之处请大家指出,大家交流。

聚类+fsvm

前段时间做了些关于模糊支持向量机的实验,发现结果不理想,我们是针对徐光佑那篇文章来做的,但是效果不好,他的文章是有局限性,我想应该使用聚类先分出主成份,然后对每个成分利用徐光佑的方法训练,这个方法应该可以得到比较好的效果,
回过头来想想一个月前所做的,当时的研究方法还是存在一定问题,
主要原因我觉得有:
1,第一次探索,有很多知识需要我们快速学习,难度过大;
2,算法评估存在问题,当时没有使用交叉验证法去做;
3,对核函数理解存在偏差;
4,老师误导,非到达5个百分点不可,导致信心大打折扣,事实上,经过我的调查之后发现,明老师当时的要求是不合理的,目前就0.5到2个百分点就已经可以了的;
5,对于精度可以考虑用统计方法做结果的显著检验(配对 t-检验);

接下来,打算花半个月时间重新解决此问题;

了解国内机器学习研究动态的方法

Machine Learning Mailing List in China
中国机器学习邮件列表

大家可以订阅:
http://cs1.shu.edu.cn/gzli/mlchina.htm

List of Important Machine Learning Journal

Machine Learning Journal


Journal of Machine learning research


Data Mining and Knowledge Discovery


IEEE-Transactions on Knowledge and Data Engineering


Knowledge and Information Systems


IEEE-Transactions on Pattern Analysis and Machine Intelligence


Artificial Intelligence Journal


IEEE-Transaction on Evolutionary Computation


Pattern Recognition


Neural Computation


IEEE-Transactions on Neural Networks