# -*- coding: utf-8 -*-
"""
Created on Sun Oct 15 19:42:13 2017
@author: wnma3
"""
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pywt
from pandas import DataFrame, Series
from scipy.interpolate import lagrange
from scipy.io import loadmat # mat是MATLAB的專用格式,調用loadmat方法讀取
from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
"""
代碼說明:
ployinterp_column-->拉格朗日填充數值
programmer_1-->篩選異常數據(包括NaN)進行填充
programmer_2-->最小-最大規范化、零-均值規范化、小數定標規范化
programmer_4-->基本的dataframe操作
programmer_5-->利用小波分析(???)進行特征分析
programmer_6-->利用PCA計算特征向量,用於降維分析
"""
path = os.getcwd()
def programmer_1():
inputfile = path + '/data/catering_sale.xls'
outputfile = path + '/tmp/sales.xls'
data = pd.read_excel(inputfile)
data[(dat