基于惩罚项的特征选择法


一、直接对特征筛选

Ref: 1.13.4. 使用SelectFromModel选择特征(Feature selection using SelectFromModel)

通过 L1 降维特征

L1惩罚项降维的原理在于保留多个对目标值具有同等相关性的特征中的一个,所以没选到的特征不代表不重要。故,可结合L2惩罚项来优化。

(1) [Scikit-learn] 1.1 Generalized Linear Models - from Linear Regression to L1&L2【as part 1】

(2) [Scikit-learn] 1.1 Generalized Linear Models - Lasso Regression【as part 2,重点解析了Lasso,作为part 1的补充】

示例代码如下,但问题来了,如何图像化参数的重要性。

from sklearn.svm import LinearSVC
  
X.shape
# (150, 4) lsvc = LinearSVC(C=0.01, penalty="l1", dual=False).fit(X, y)
model = SelectFromModel(lsvc, prefit=True)

# 原数据 --> 转变为 --> 降维后的数据
X_new = model.transform(X)
X_new.shape
# (150, 3)

L1 参数筛选

直接得到理想的模型,查看最后参数的二维分布:Feature selection using SelectFromModel and LassoCV

# Author: Manoj Kumar <mks542@nyu.edu>
# License: BSD 3 clause print(__doc__) import matplotlib.pyplot as plt
import numpy as np from sklearn.datasets import load_boston
from sklearn.feature_selection import SelectFromModel
from sklearn.linear_model import LassoCV # Load the boston dataset.
boston = load_boston()
X, y = boston['data'], boston['target'] # We use the base estimator LassoCV since the L1 norm promotes sparsity of features.
clf = LassoCV() # Set a minimum threshold of 0.25
sfm = SelectFromModel(clf, threshold=0.25)
sfm.fit(X, y)
n_features = sfm.transform(X).shape[1] # Reset the threshold till the number of features equals two.
# Note that the attribute can be set directly instead of repeatedly
# fitting the metatransformer.
while n_features > 2:
sfm.threshold += 0.1
X_transform = sfm.transform(X)
n_features = X_transform.shape[1] # Plot the selected two features from X.
plt.title(
"Features selected from Boston using SelectFromModel with "
"threshold %0.3f." % sfm.threshold)
feature1 = X_transform[:, 0]
feature2 = X_transform[:, 1]
plt.plot(feature1, feature2, 'r.')
plt.xlabel("Feature number 1")
plt.ylabel("Feature number 2")
plt.ylim([np.min(feature2), np.max(feature2)])
plt.show()

二、轨迹图

Sparse recovery: feature selection for sparse linear models

学习可视化 L1 过程,代码分析。

Ref: scikit-learn 线性回归算法库小结

Ref: Lasso权重可视化

注意,该标题的代码过期了:Deprecate randomized_l1 module #8995

轨迹图

Ref: LARS算法的几何意义

Ref: 1.1. Generalized Linear Models【更多轨迹图】

从右往左看,重要的参数在最后趋于0。

print(__doc__)

# Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# License: BSD 3 clause import numpy as np
import matplotlib.pyplot as plt from sklearn import linear_model
from sklearn import datasets diabetes = datasets.load_diabetes()
X = diabetes.data
y = diabetes.target print("Computing regularization path using the LARS ...")
_, _, coefs = linear_model.lars_path(X, y, method='lasso', verbose=True) # 注释一:累加,然后变为“比例”
xx = np.sum(np.abs(coefs.T), axis=1)
xx /= xx[-1]

plt.plot(xx, coefs.T)
ymin, ymax = plt.ylim()
plt.vlines(xx, ymin, ymax, linestyle='dashed')
plt.xlabel('|coef| / max|coef|')
plt.ylabel('Coefficients')
plt.title('LASSO Path')
plt.axis('tight')
plt.show()

“注释一” 的结果显示:

Computing regularization path using the LARS ...

[   0.           60.11926965  663.66995526  888.91024335 1250.6953637
1440.79804251 1537.06598321 1914.57052862 2115.73774356 2195.55885543
2802.37509283 2863.01080401 3460.00495515] [0. 0.01737549 0.19181185 0.25691011 0.36147213 0.41641502
0.44423809 0.55334329 0.61148402 0.63455367 0.80993384 0.82745858
1. ]

三、L2 协助 L1 优化

L1惩罚项降维的原理在于保留多个对目标值具有同等相关性的特征中的一个,所以没选到的特征不代表不重要。故,可结合L2惩罚项来优化。

具体操作为:若一个特征在L1中的权值为1,选择在L2中权值差别不大且在L1中权值为0的特征构成同类集合,将这一集合中的特征平分L1中的权值,故需要构建一个新的逻辑回归模型:

    • __init__中,默认L1, 但内部又“配置了一个L2"的额外的模型。
    • fit()进行了重写:先用L1训练一次,再用L2训练一次。
from sklearn.linear_model import LogisticRegression

class LR(LogisticRegression):
def __init__(self, threshold=0.01, dual=False, tol=1e-4, C=1.0,
fit_intercept=True, intercept_scaling=1, class_weight=None,
random_state=None, solver='liblinear', max_iter=100,
multi_class='ovr', verbose=0, warm_start=False, n_jobs=1): #权值相近的阈值
self.threshold = threshold #初始化模型
LogisticRegression.__init__(self, penalty='l1', dual=dual, tol=tol, C=C,
fit_intercept=fit_intercept, intercept_scaling=intercept_scaling, class_weight=class_weight,
random_state=random_state, solver=solver, max_iter=max_iter,
multi_class=multi_class, verbose=verbose, warm_start=warm_start, n_jobs=n_jobs)
#使用同样的参数创建L2逻辑回归
self.l2 = LogisticRegression(penalty='l2', dual=dual, tol=tol, C=C, fit_intercept=fit_intercept, intercept_scaling=intercept_scaling, class_weight = class_weight, random_state=random_state, solver=solver, max_iter=max_iter, multi_class=multi_class, verbose=verbose, warm_start=warm_start, n_jobs=n_jobs)

def fit(self, X, y, sample_weight=None):
#训练L1逻辑回归
super(LR, self).fit(X, y, sample_weight=sample_weight)
self.coef_old_ = self.coef_.copy()
#训练L2逻辑回归
self.l2.fit(X, y, sample_weight=sample_weight) cntOfRow, cntOfCol = self.coef_.shape
# 权值系数矩阵的行数对应目标值的种类数目
for i in range(cntOfRow):
for j in range(cntOfCol):
coef = self.coef_[i][j]
#L1逻辑回归的权值系数不为0
if coef != 0:
idx = [j]
#对应在L2逻辑回归中的权值系数
coef1 = self.l2.coef_[i][j]
for k in range(cntOfCol):
coef2 = self.l2.coef_[i][k]
#在L2逻辑回归中,权值系数之差小于设定的阈值,且在L1中对应的权值为0
if abs(coef1-coef2) < self.threshold and j != k and self.coef_[i][k] == 0:
idx.append(k)
#计算这一类特征的权值系数均值
mean = coef / len(idx)
self.coef_[i][idx] = mean
return self from sklearn.feature_selection import SelectFromModel #带L1和L2惩罚项的逻辑回归作为基模型的特征选择
#参数threshold为权值系数之差的阈值
SelectFromModel(LR(threshold=0.5, C=0.1)).fit_transform(iris.data, iris.target)

基于树模型的特征选择法


一、Feature importances with forests of trees

基于树的预测模型(见 sklearn.tree 模块,森林见 sklearn.ensemble 模块)能够用来计算特征的重要程度,因此能用来去除不相关的特征(结合 sklearn.feature_selection.SelectFromModel ):

print(__doc__)

import numpy as np
import matplotlib.pyplot as plt from sklearn.datasets import make_classification
from sklearn.ensemble import ExtraTreesClassifier # Build a classification task using 3 informative features
# 自定义一个数据集合,这是个好东西
X, y = make_classification(n_samples=1000,
n_features=10,
n_informative=3,
n_redundant=0,
n_repeated=0,
n_classes=2,
random_state=0,
shuffle=False) # Build a forest and compute the feature importances
forest = ExtraTreesClassifier(n_estimators=250, random_state=0)
forest.fit(X, y)

# 森林中许多树,每棵树对应了一套自己的标准得到的”重要性评估"
importances = forest.feature_importances_
std = np.std([tree.feature_importances_ for tree in forest.estimators_], axis=0)
indices = np.argsort(importances)[::-1] # Print the feature ranking
print("Feature ranking:") for f in range(X.shape[1]):
print("%d. feature %d (%f)" % (f + 1, indices[f], importances[indices[f]])) # Plot the feature importances of the forest
plt.figure()
plt.title("Feature importances")
plt.bar(range(X.shape[1]), importances[indices],
color="r", yerr=std[indices], align="center")
plt.xticks(range(X.shape[1]), indices)
plt.xlim([-1, X.shape[1]])
plt.show()

结果:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeoAAAJOCAYAAAB4CERfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3de3TU9Z3/8VcmF25BEskWIQlJXMJuoO4KkrincqtYwuVAdLXbbD0CXRrLaVMW2y2xVI9iT/dI7Z7uHyuenigu9UIqWtawu5TSQ7N6PKBfJMHEEJhJImRMBGKGq7QJ4fP7Q5yfY0ImGOK8gefjnM9JZr7fmXl/8fLMNzPMxElyAgAAJvliPQAAALg4Qg0AgGGEGgAAwwg1AACGEWoAAAwj1AAAGEaogavYU089pYceeijWYwAYgDjx96iBHpqbmzVmzBh1d3eHr5s4caLa2to+933OmjVLzz//vDIzMy/HiFecZ599VsFgUA8//HCsRwGuKJxRAxexaNEijRw5MrwGEunLIT4+PqaPPxA+H/+rAQbCsVisyNXc3OzmzJnT67Zbb73VvfHGGy4UCrmamho3a9as8LZly5a5+vp6d/LkSdfY2Ojuv/9+J8kNHz7cffTRR667u9udOnXKnTp1yo0dO9Y9++yz7qc//Wn49rNmzXItLS0Rc6xevdrt27fP/elPf3Lx8fFu7Nix7uWXX3ZHjx51TU1N7vvf//5Fj+PT9//Jff/oRz9yR44cca2tra6oqMjNnz/fHThwwH344Yfuxz/+cfi2jzzyiNu8ebOrqKhwJ0+edG+//bb7m7/5m/D2v/7rv3Z//OMfXSgUcnV1dW7RokURj7t+/Xr3P//zP+706dOupKTEdXZ2uj//+c/u1KlTrrKy0klyZWVlLhAIuJMnT7p3333X3XnnneH7WLp0qXv99dfdE0884To6OlxTU5ObN29eeHtqaqrbsGGDe//9911HR4fbsmVLeNvChQtddXW1C4VC7o033nA33XRTeNvq1atdMBh0J0+edA0NDe7222+P+b9vLFaUFfMBWCxz62KhHjdunGtvb3fz5893cXFx7o477nDt7e0uLS3NSXILFixwN954o5PkZs6c6c6cOeOmTJnipJ4RltSvUFdXV7uMjAw3dOhQFxcX5/bs2eMefvhhl5iY6HJyclxjY6ObO3dur8fx2VB3dXW5hx9+2CUkJLhvf/vb7ujRo+6FF15wycnJbtKkSe7s2bMuJyfHSR+HurOz0919990uISHB/fCHP3RNTU0uISHBJSQkOL/f73784x+7xMRE99WvftWdPHnSTZw4Mfy4x48fd1/5yldcXFycGzJkSI9jleTuueceN3bsWBcXF+f+4R/+wZ0+fdrdcMMNTvo41J2dne7b3/628/l8bsWKFe79998P3/a///u/XUVFhUtJSXEJCQlu5syZTpKbMmWKO3LkiCsoKHA+n88tWbLENTc3u6SkJDdx4kR3+PBhN3bsWCfJZWVlhf95sViGV8wHYLHMrebmZnfq1CkXCoVcKBQKn62tXr3a/frXv47Y93e/+51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s11wcffKBt27Zp/fr1SklJUUJCgmbMmCFJKi8v14oVK1RQUCBJGj58uBYsWKDk5GRNnDhRX/3qV5WUlKQ//elPOnv2bMRfwQMsItTAJQgGgyoqKtKaNWt07NgxtbS06Ec/+pF8Pp9Onz6tlStX6qWXXlIoFNI3v/lNVVZWhm974MABbdq0SU1NTQqFQho7dqyee+457du3T++9955+//vf6ze/+U2fj3/+/HktWrRIN998s5qbm9Xe3q6nn3661zPLy+HVV1/VN77xDYVCId133336+7//e507d05dXV1avHix5s+fr/b2dq1fv15LlizRgQMHLnpfzzzzjCZNmqRQKKQtW7Zo//79+rd/+zft2rVLR44c0U033aQ33nij37Pdd9996urqUkNDg44ePRr+Ieftt99WSUmJ/uM//kOhUEiBQEDLli2TJA0ZMkSPP/642tvb9cEHH+hLX/qS1qxZM6A/I2Cw8YYnAHr1yCOPaMKECbrvvvtiPQpwTeOMGgAAwwg1AACG8atvAAAM44waAADDEmI9wGcdPXpUhw4divUYAAB8YbKysvSlL32p123mQn3o0CHl5+fHegwAAL4wnudddBu/+gYAwDBCDQCAYYQaAADD+hXqwsJCNTQ0yO/3q6ysrMf273znO3rnnXdUXV2t119/XXl5eZI+fnL8o48+UnV1taqrq/XUU09d3ukBALgG9P05mD6fCwQCLicnxyUmJrqamhqXl5cXsc/IkSPD3y9atMht27bNSR9/KHttbe0lfe6m53kx/+xPFovFYrG+yNVX+6KeURcUFCgQCKi5uVldXV2qqKhQUVFRxD6nTp0Kf//JJ+IAAICBixrq9PT0iA+ADwaDER8O/4nvfve7CgQC+vnPf66VK1eGr8/JydHevXtVVVWl6dOn9/oYJSUl8jxPnudFfGg8AADXuqih7u1D3Hs7Y16/fr0mTJigsrIyPfTQQ5KktrY2jR8/XlOnTtUPfvADvfjiixo5cmSP25aXlys/P1/5+flqb2//PMcBAMBVKWqog8GgMjMzw5czMjLU2tp60f0rKip05513SpI6OzvV0dEhSdq7d68aGxs1ceLEgc4MAMA1I2qoPc9Tbm6usrOzlZiYqOLiYl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9u3bp3PnzsV6rB5uu+023XLLLZo/f76+973vacaMGbEe6ZIR6qtMQkKCXnnlFb3wwgvasmVLrMfp4Up6W9kTJ06oqqpK8+bNi/UoEYLBoILBYPhM/+WXX9bUqVNjPNX/d8cdd6i5uVnt7e06d+6cfvvb3+orX/lKrMfq1fz587V3714dPXo01qNEuO2227R48WI1NzeroqJCt99+u5577rlYj9XDhg0bdMstt2jWrFnq6Ogw+YZWbW1tkqRjx45py5YtV+wnOMb8ifIraWVlZZl9MZkkt3HjRvfLX/4y5nNcbMXHx7vGxkaXnZ0dfjHZpEmTYj7XJystLS38wqyhQ4e61157zS1cuDDmc312vfbaa27ixIlOknvkkUfcz3/+85jP9MkqKChwdXV1btiwYU76+IVvpaWlMZ+rt7Vp0ya3bNmymM/R15o1a5bJF5NJcn/xF3/hJLnMzEy3f/9+l5KSEvOZPr2GDx/ukpOTw9+/8cYbrrCwMOZzfY4V8wGumPXiiy+61tZW19nZ6VpaWtw//dM/xXymT6/bbrvNOefcvn37XHV1tauurnbz58+P+VyfXfPnz3cHDhxwgUDArVmzJubzfHrddNNNbu/evW7fvn2utrbWPfzwwzGfqbf1t3/7t87zPLdv3z63ZcsWc/+DfPTRR93+/ftdbW2t+/Wvf+2SkpJiPtNn17Bhw1x7e7u77rrrYj5LX8tyqF977TX37rvvupqaGnf77bfHfJ7PrpycHFdTU+NqampcXV2duf/f9HfxFqIAABjGc9QAABhGqAEAMIxQAwBgGKEGAMAwQg0AgGGEGgAAwwg1AACG/T8nmLQD8vUmeQAAAABJRU5ErkJggg==" alt="" />

End.

[Feature] Feature selection - Embedded topic的更多相关文章

  1. [Feature] Feature selection

    Ref: 1.13. Feature selection Ref: 1.13. 特征选择(Feature selection) 大纲列表 3.1 Filter 3.1.1 方差选择法 3.1.2 相关 ...

  2. 论文《Entity Linking with Effective Acronym Expansion, Instance Selection and Topic Modeling》

    Entity Linking with Effective Acronym Expansion, Instance Selection and Topic Modeling 一.主要贡献 1. pro ...

  3. [Feature] Final pipeline: custom transformers

    有视频:https://www.youtube.com/watch?v=BFaadIqWlAg 有代码:https://github.com/jem1031/pandas-pipelines-cust ...

  4. [ML] Feature Selectors

    SparkML中关于特征的算法可分为:Extractors(特征提取).Transformers(特征转换).Selectors(特征选择)三部分. Ref: SparkML中三种特征选择算法(Vec ...

  5. Discover Feature Engineering, How to Engineer Features and How to Get Good at It

    Feature engineering is an informal topic, but one that is absolutely known and agreed to be key to s ...

  6. VINS(二)Feature Detection and Tracking

    系统入口是feature_tracker_node.cpp文件中的main函数 1. 首先创建feature_tracker节点,从配置文件中读取信息(parameters.cpp),包括: ROS中 ...

  7. 如何设置Installshield中 feature的选中状态

    原文:如何设置Installshield中 feature的选中状态 上一篇: 使用strtuts2的iterator标签循环输出二维数组之前一直有筒子问如何设置Installshield中 feat ...

  8. Multipart to single part feature

    Multipart to single part feature Explode Link: http://edndoc.esri.com/arcobjects/8.3/?URL=/arcobject ...

  9. Asp.net core 学习笔记 ( Area and Feature folder structure 文件结构 )

    2017-09-22 refer : https://msdn.microsoft.com/en-us/magazine/mt763233.aspx?f=255&MSPPError=-2147 ...

随机推荐

  1. 6. kafka序列化和反序列化

    https://blog.csdn.net/weixin_33690963/article/details/91698279 kafka序列化: 生产者在将消息传入kafka之前需要将其序列化成byt ...

  2. P1313 计算系数[二项式定理]

    题目描述 给定一个多项式\((by+ax)^k\),请求出多项式展开后\(x^n \times y^m\)项的系数. 解析 一道水题,二项式定理搞定.注意递推组合数时对其取模. 参考代码 #inclu ...

  3. P1273 有线电视网[分组背包+树形dp]

    题目描述 某收费有线电视网计划转播一场重要的足球比赛.他们的转播网和用户终端构成一棵树状结构,这棵树的根结点位于足球比赛的现场,树叶为各个用户终端,其他中转站为该树的内部节点. 从转播站到转播站以及从 ...

  4. 0、Python学习路线

    阶段一.Python语言(熟练掌握Python多线程并发编程技术,可以编写爬虫程序和语音识别软件.) 1.1 基础语法 1.1.1 python概述     1.1.2 数据的存储     1.1.3 ...

  5. 【VS Code】中node.js代码自动补全的方法

    原文链接: https://blog.csdn.net/qq_39189819/article/details/91347484

  6. TCP单线程实现并发

    服务端 from gevent import monkey;monkey.patch_all() import socket from gevent import spawn server = soc ...

  7. MOS管做开关之初理解

    杰杰 物联网IoT开发 2017-10-12 大家好,我是杰杰.       今晚,设计电路搞了一晚上,终于从模电渣渣的我,把MOS管理解了那么一丢丢,如有写的不好的地方,请指出来.谢谢.      ...

  8. jquery检测屏幕宽度并跳转页面

    jquery检测屏幕宽度并刷新页面 var owidth = ($(window).width()); //浏览器当前窗口可视区域宽度 if(owidth<640){//小于640跳转一个网址, ...

  9. uoj #139

    树链剖分//模板题由于存在换根操作对所有关于节点 u 的修改和查询操作进行分类讨论若 Root 在 u 的子树中,则不处理 u 所在的 Root 的那颗子树否则不会有影响寻找 Root 所在的那颗子树 ...

  10. ST表(模板)「 查询区间最值 」

    The Water Problem HDU - 5443 「 第一部分nlogn预处理   第二部分O(1)询问 」 #include <iostream> #include <bi ...