#!/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 "