编程语言
首页 > 编程语言> > python-SciKit FastICA返回什么?FastICA和fastica有什么区别(两者都返回不同的值)?

python-SciKit FastICA返回什么?FastICA和fastica有什么区别(两者都返回不同的值)?

作者:互联网

我正在尝试使用scikit学习模块在学校进行机器学习练习. sklearn ICA文档“使用ICA进行盲源分离” [http://scikit-learn.org/stable/auto_examples/decomposition/plot_ica_blind_source_separation.html#example-decomposition-plot-ica-blind-source-separation-py].]已提供了我要重构的练习作为示例.此示例基本上生成3个信号(或声音源),然后与添加的噪声合并,然后尝试使用ICA重建原始源.很简单吧?但是,我有以下困惑:

> FastICA到底返回什么?对于以下代码:

ica = FastICA(n_components=3)
S_rec = ica.fit_transform(X)

在这种情况下,“ ica”是什么?我尝试打印该值,但未返回任何内容.我试图找出“ ica”是什么,以便准确了解ica.fit_transform(X)在做什么.此处将什么转换应用于“ X”?
>“ FastICA”和“ fastica”有什么区别?这两个功能还具有不同的文档页面:

> FastICA:http://scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html#sklearn.decomposition.FastICA
> Fastica:http://ogrisel.github.io/scikit-learn.org/sklearn-tutorial/modules/generated/sklearn.decomposition.fastica.html

我的问题是,对于相同的输入数据,它们两个都返回不同的混合矩阵.据我所知,我认为自己没有做错任何事情.

如果有人可以解释这一点或指出我做错了什么,那将是很大的帮助.
谢谢!

解决方法:

What exactly is does the FastICA return? For the following piece of code:
[…] What is ‘ica’ in this case?

FastICA是一个类,因此对其的调用将返回.fastica函数的OOP包装器.换句话说,您将获得对FastICA类实例的引用,该实例存储您的初始配置(例如组件数量),并可用于对任何数据执行ica(通过fit / transform).

I tried to print the value, but nothing was returned. I’m trying to find out what ‘ica’ is in order to understand exactly what ica.fit_transform(X) is doing. What transformation is being applied to ‘X’ here?

ICA找到解混矩阵W,然后将其应用于X,因此fit_transform(X)== X.dot(W)(如果在构造函数中要求,则进行一些美白处理).

What is th difference between ‘FastICA’ and ‘fastica’? The two functions also have different documentation pages:

没有区别. FastICA是围绕fastica的面向对象包装,仅此而已.实际上是calls fastica during fit.

My question here being, both of them return different mixing matrices for the same input data. I don’t think I’m doing anything wrong to the best of my understanding.

FastICA不是确定性算法,因此您每次都可以得到不同的解决方案.

标签:scikit-learn,machine-learning,python
来源: https://codeday.me/bug/20191118/2028638.html