核逼近(Kernel Approximation)
Posted Data+Science+Insight
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了核逼近(Kernel Approximation)相关的知识,希望对你有一定的参考价值。
核逼近(Kernel Approximation)
主要方法和函数:
sklearn.kernel_approximation.Nystroem
sklearn.kernel_approximation.AdditiveChi2Sampler
sklearn.kernel_approximation.RBFSampler
sklearn.kernel_approximation.SkewedChi2Sampler
>>> from sklearn.kernel_approximation import SkewedChi2Sampler
>>> from sklearn.linear_model import SGDClassifier
>>> X = [[0, 0], [1, 1], [1, 0], [0, 1]]
>>> y = [0, 0, 1, 1]
>>> chi2_feature = SkewedChi2Sampler(skewedness=.01,
... n_components=10,
... random_state=0)
>>> X_features = chi2_feature.fit_transform(X, y)
>>> clf = SGDClassifier(max_iter=10, tol=1e-3)
>>> clf.fit(X_features, y)
SGDClassifier(alpha=0.0001, average=False, class_weight=None,
early_stopping=False, epsilon=0.1, eta0&
以上是关于核逼近(Kernel Approximation)的主要内容,如果未能解决你的问题,请参考以下文章
机器学习笔记:MLP的万能逼近特性( Universal Approximation Property)
R语言绘制核密度图实战(Kernel Density Plot)
核密度估计 Kernel Density Estimation (KDE) MATLAB