爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 9002|回复: 8

[源程序] 非线性主成分分析(NLPCA)计算程序

[复制链接]

新浪微博达人勋

发表于 2013-12-22 14:47:13 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
        NLPCA(非线性主成分分析)在《气候变率诊断和预测方法》中已有介绍,在大气科学领域应用逐渐增加。
        现介绍NLPCA的一个网站及matlab运行程序。
                                                                                             http://www.nlpca.org/
Nonlinear principal component analysis (NLPCA) is commonly seen as a nonlinear generalization of standard principal component analysis (PCA). It generalizes the principal components from straight lines to curves (nonlinear). Thus, the subspace in the original data space which is described by all nonlinear components is also curved.
Nonlinear PCA can be achieved by using a neural network with an autoassociative architecture also known as autoencoder, replicator network, bottleneck or sandglass type network. Such autoassociative neural network is a multi-layer perceptron that performs an identity mapping, meaning that the output of the network is required to be identical to the input. However, in the middle of the network is a layer that works as a bottleneck in which a reduction of the dimension of the data is enforced. This bottleneck-layer provides the desired component values (scores).
The left plot shows standard PCA applied to a simple two-dimensional data set. The two resulting components are plotted as a grid which illustrates the linear PCA transformation. The plot on the right shows nonlinear PCA (autoencoder neural network) applied to a 3/4 circle with noise. Again, the two components are plotted as a grid, but the components are curved which illustrates the nonlinear transformation of NLPCA.
Here, NLPCA is applied to 19-dimensional spectral data representing equivalent widths of 19 absorption lines of 487 stars, available at www.cida.ve. The figure in the middle shows a visualisation of the data by using the first three components of standard PCA. Data of different colors belong to different spectral groups of stars. The first three components of linear PCA and of NLPCA are represented by grids in the left and right figure, respectively. Each grid represents the two-dimensional subspace given by two components while the third one is set to zero. Thus, the grids represent the new coordinate system of the transformation. In contrast to linear PCA (left) which does not describe the nonlinear characteristics of the data, NLPCA gives a nonlinear (curved) description of the data, shown on the right.

Nonlinear PCA toolbox for MATLAB

Syntax[pc, net] = nlpca(data, k)pc = nlpca_get_components(net, data)data_reconstruction = nlpca_get_data(net, pc)
Description
The nonlinear PCA is based on an auto-associative neural network (autoencoder), see also: www.nlpca.org .
pc = nlpca(data,k) extracts k nonlinear components from the data set. pc represents the estimated component values (scores).
net is a data structure explaining the neural network parameters for the nonlinear transformation from data space to component space and reverse.
net can be used in nlpca_get_components and nlpca_get_data to obtain component values (scores) for new data or reconstructed data for any component value.

Example
In this example nonlinear PCA (circular PCA) is applied to artificial data of a noisy circle.
   % generate circular data    t=linspace(-pi , +pi , 100);  % angular value t=-pi,...,+pi   data = [sin(t);cos(t)];       % circle   data = data + 0.2*randn(size(data));    % add noise   % nonlinear PCA (circular PCA, inverse network architecture)   [c,net]=nlpca(data, 1,  'type','inverse',  'circular','yes' );                                   % plot components                nlpca_plot(net)   
See also the demos of the toolbox below.

Download
The NLPCA toolbox is distributed under the GNU General Public License.
NLPCA can be downloaded as single package or individual files:
NLPCA-0.88.zipNLPCA package (all files), version 0.88


package contains:

    nlpca.mmain program - component extraction
    nlpca_get_data.mto reconstruct data from new component values
    nlpca_get_components.mto estimate component values from new data
    nlpca_plot.mto plot the components

    demo_hierarchical_NLPCA_StarData.mdemo of hierarchical nonlinear PCA
    demo_circular_PCA.mdemo of circular units (Circular PCA)
    demo_inverse_NLPCA.mdemo of inverse network architecture
    demo_missing_data.mdemo of missing data estimation


References
Validation:
Validation of nonlinear PCA.
Matthias Scholz
Neural Processing Letters, Volume 36, Number 1, Pages 21-30, 2012.
[ pdf (pre-print) | pdf (Neural Process Lett) | poster RECOMB 2012 | Matlab code]

review (book chapter):
Nonlinear principal component analysis: neural network models and applications.
Matthias Scholz, Martin Fraunholz, and Joachim Selbig.
In Principal Manifolds for Data Visualization and Dimension Reduction, edited by Alexander N. Gorban, Balázs Kégl, Donald C. Wunsch, and Andrei Zinovyev. Volume 58 of LNCSE, pages 44-67. Springer Berlin Heidelberg, 2007.
[ pdf (all book chapters) | pdf (Springer) | entire book (Springer)]

Circular PCA:
Analysing periodic phenomena by circular PCA.
Matthias Scholz.
In S. Hochreiter and R. Wagner, editors, Proceedings of the Conference on Bioinformatics Research and Development BIRD'07, LNCS/LNBI Vol. 4414, pages 38-47. Springer-Verlag Berlin Heidelberg, 2007.
[ pdf (final version at Springer) | pdf (author's pre-version)]

Inverse model, missing data:
Non-linear PCA: a missing data approach.
Matthias Scholz, Fatma Kaplan, Charles L. Guy, Joachim Kopka, and Joachim Selbig.
Bioinformatics 21(20):3887-3895. 2005.
[ pdf (final version) | pdf (pre-version in colour) ]

Hierarchical NLPCA:
Nonlinear PCA: a new hierarchical approach.
Matthias Scholz and Ricardo Vigário.
In M. Verleysen, editor, Proceedings ESANN. 2002.
[ pdf (pre-print version) | pdf (ESANN) ]



See also:

NLPCA-0.88.zip

85.31 KB, 下载次数: 36, 下载积分: 金钱 -5

评分

参与人数 1金钱 +10 贡献 +2 收起 理由
Aires + 10 + 2

查看全部评分

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-21 20:25:17 | 显示全部楼层
很赞。。。虽然有点看不懂,但是慢慢学。。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-5-3 16:12:03 | 显示全部楼层
呵呵,谢谢分享
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-11-3 15:25:09 | 显示全部楼层
{:5_213:}{:5_213:}
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2015-6-30 19:09:32 | 显示全部楼层
请问楼主有没有用NLPC还原的变量场的程序啊?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-11-6 17:49:32 | 显示全部楼层
很好谢谢分享
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-10-20 13:04:55 | 显示全部楼层
谢谢分享,需要认真学习
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-4-7 23:14:50 | 显示全部楼层
好方法,谢谢陈老师介绍
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-5-16 17:04:36 | 显示全部楼层
正在研究,多谢
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表