高维数据可视化--Hypertools
平时我们可以通过seaborn,matplotlib,plotly等工具包进行二维,三维数据等可视化,但是高维度数据的可视化一直是一大难点,如果能对高维数据进行可视化,可以帮助我们更容易识别不同数据列之间的隐藏模式、关联性等。今天和大家分享一个有趣的高维数据可视化工具--Hypertools。
Hypertools是建立在matplotlib、sklearn 和 seaborn 之上的,Hypertools通过降低数据维度来对高维数据集进行可视化。
HyperTools的功能主要包括:
01
Basic Plot
# pip install hypertools
import hypertools as hyp
%matplotlib inline
# data loading
basic = hyp.load('weights_sample')
basic
basic.plot(fmt='.')
02
Cluster Plot
clust = hyp.load('mushrooms')
# Creating plot
clust.plot(n_clusters=10)
03
Corpus Plots
text = ['i am from India', 'India is in asia', 'Asia is the largest continent',
'There are 7 continents', 'Continents means earth surfaces ', 'Surfaces covers land area',
'land area is largest in asia']
hyp.plot(text, '*', corpus=text)
04
UMAP
from sklearn import datasets
data = datasets.load_digits(n_class=6)
df = data.data
hue = data.target.astype('str')
hyp.plot(df, '.', reduce='UMAP', hue=hue, ndims=2)
05
Animated Plots
ani = hyp.load('weights_avg')
ani.plot(animate=True, chemtrails=True)
Visualizing High Dimensional Data
联系客服