本文整理匯總了Python中FileIO.get_subset方法的典型用法代碼示例。如果您正苦於以下問題:Python FileIO.get_subset方法的具體用法?Python FileIO.get_subset怎麽用?Python FileIO.get_subset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FileIO
的用法示例。
在下文中一共展示了FileIO.get_subset方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: f_Interval
# 需要導入模塊: import FileIO [as 別名]
# 或者: from FileIO import get_subset [as 別名]
if method == 1:
return f_Interval(y, x_glob, x_loc, y_off, coords, mType, wType, criterion, maxVal, minVal, interval,flag)
if __name__ == '__main__':
# Examples
##----------------------------1 bandwidth search for basic Gaussian model--------------------------------
# read data
flePath = "E:/UK work/GWR/Code/Sample data/Georgia/GeorgiaEduc.dbf"
flds = ['X', 'Y', 'PctBach','PctEld', 'PctFB', 'PctPov', 'PctBlack']
allData = FileIO.read_FILE[1](flePath)
dic_data = FileIO.get_subset(allData[0], allData[1], flds)
nobs = len(dic_data.keys()) # number of observations
lst_data = []
coords = {}
for i in range(nobs):
coords[i] = dic_data[i][:2] # get coordinates
lst_data.append(dic_data[i][2:])
arr_data = np.array(lst_data)
# create x, y
y = np.reshape(arr_data[:,0], (-1,1))
x = arr_data[:,1:]
x = np.hstack((np.ones(y.shape),x))
#----1. bandwidth selection