# -*- coding: utf-8 -*-
"""
Created on Sat Nov 19 21:50:33 2016

@author: Levy
"""

import numpy as np
#import pandas as pd
#import visuals as vs # Supplementary code
#from sklearn.cross_validation import ShuffleSplit
#
## Pretty display for notebooks
## 让结果在notebook中显示
##%matplotlib inline
#
## Load the Boston housing dataset
## 载入波士顿房屋的数据集
#data = pd.read_csv('housing.csv')
#prices = data['MEDV']
#features = data.drop('MEDV', axis = 1)
#    
#
#data_def = pd.DataFrame(data)
#print "RM 的平均值是${:,.4f}".format(np.mean(data['RM']))
#print "LSTAT 的平均值是${:,.4f}".format(np.mean(data['LSTAT']))
#print "PTRATIO 的平均值是${:,.4f}".format(np.mean(data['PTRATIO']))
#print np.median(data['RM'])
#print np.median(data['LSTAT'])
#print np.median(data['PTRATIO'])
#print np.amax(data['RM'])
#print np.amin(data['LSTAT'])
#print np.amin(data['PTRATIO'])
#from sklearn import svm, datasets
#from sklearn.grid_search import GridSearchCV
#iris = datasets.load_iris()
#parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10,6]}
#svr = svm.SVC()
#clf = GridSearchCV(svr, parameters)
#clf.fit(iris.data, iris.target)
#x1=np.dot([1,2,3],[1,1,-5])
#x2=np.dot([1,2,3],[3,-4,2])
#print x1
#print x2
#print np.dot(np.array([1,2,-1]),np.array ([[3,2],[-1,4],[3,-5]]))
print np.dot(np.array([[1,0],[1,1],[0,1]]),np.array([1,1]))



