程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

python_ data_ analysis_ and_ mining_ action-master-3

編輯:Python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 9 14:26:54 2017
@author: lu
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from scipy.cluster.hierarchy import dendrogram, linkage
from sklearn.cluster import AgglomerativeClustering
"""
programmer_1--> get data , Perform dispersion standardization
programmer_2--> Drawing spectrum clustering diagram
programmer_3--> Hierarchical clustering algorithm , And visualize each class
"""
def programmer_1():
filename = "data/business_circle.xls"
standardizedfile = "tmp/standardized.xls"
data = pd.read_excel(filename, index_col=u" Base station number ")
data = (data - data.min()) / (data.max() - data.min())
data = data.reset_index()
data.to_excel(standardizedfile, index=False)
def programmer_2():
standardizedfile = "data/standardized.xls"
data = pd.read_excel(standardizedfile, index_col=u" Base station number "

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved