19、数据特征选择与降维技术详解

数据特征选择与降维技术详解

1. 特征选择技术概述

在处理高维数据时,特征选择技术至关重要,它能帮助我们保留数据中的关键信息,同时减少冗余特征,降低计算复杂度。以下介绍几种常见的特征选择技术。

2. 高斯分布可视化与距离计算

首先是用于可视化高斯分布的函数 plotGaussian 和计算数据点间距离的函数 computeDistance

import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
import itertools

def plotGaussian(points, idx):
    # points[idx] is the datapoint itself, which is 0.
    axis = np.sort(points)
    std = np.std(points) # In the t-SNE implementation, this would also be controlled by PERPLEXITY
    plt.plot(axis, norm.pdf(axis, points[idx] , std), color='tab:grey') # 0 refers to the center, which is the data point itself
    plt.scatter(points[idx], 0, c='tab:orange')
    plt.scatter(po
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值