本文整理汇总了Python中windml.datasets.nrel.NREL.get_turbine方法的典型用法代码示例。如果您正苦于以下问题:Python NREL.get_turbine方法的具体用法?Python NREL.get_turbine怎么用?Python NREL.get_turbine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类windml.datasets.nrel.NREL
的用法示例。
在下文中一共展示了NREL.get_turbine方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: NREL
# 需要导入模块: from windml.datasets.nrel import NREL [as 别名]
# 或者: from windml.datasets.nrel.NREL import get_turbine [as 别名]
"""
Histogram of Wind Speeds
-------------------------------------------------------------
Histograms of wind speeds of a turbine near Cheyenne in the year 2004.
"""
# Author: Jendrik Poloczek <[email protected]>
# License: BSD 3 clause
import matplotlib.pyplot as plt
from pylab import plt
from windml.datasets.nrel import NREL
ds = NREL()
turbine = ds.get_turbine(NREL.park_id['cheyenne'], 2004)
speeds = list(map(lambda x : x[2], turbine.measurements))
plt.hist(speeds, color="#c4d8eb", bins=10, normed = 1)
plt.show()
示例2: test_nrel_repair
# 需要导入模块: from windml.datasets.nrel import NREL [as 别名]
# 或者: from windml.datasets.nrel.NREL import get_turbine [as 别名]
def test_nrel_repair(self):
ds = NREL()
target = ds.get_turbine(NREL.park_id['tehachapi'], 2005)
measurements = target.get_measurements()[:43504]
measurements = NRELRepair().repair(measurements)
assert(NRELRepair().validate(measurements))
示例3: NREL
# 需要导入模块: from windml.datasets.nrel import NREL [as 别名]
# 或者: from windml.datasets.nrel.NREL import get_turbine [as 别名]
This examples shows the topology of a turbine and gives a statistical overview
for different characteristics of its time series.
'''
# Author: Oliver Kramer <[email protected]>
# License: BSD 3 clause
import matplotlib.pyplot as plt
import numpy as np
import windml.util.features
from windml.datasets.nrel import NREL
from windml.visualization.show_coord_topo_turbine import show_coord_topo_turbine
ds = NREL()
turbine = ds.get_turbine(NREL.park_id['tehachapi'], 2004)
feat, month_power, ramps_up, ramps_down, power_freq = windml.util.features.compute_highlevel_features(
turbine)
month = ['jan', 'feb', 'mar', 'apr', 'may', 'jun',
'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
figure = plt.figure(figsize=(15, 10))
# plot 1
plot1 = plt.subplot(2, 2, 1)
plt.title('Turbine Location')
show_coord_topo_turbine(turbine, show=False)
# plot 2
plot2 = plt.subplot(2, 2, 2)
示例4: NREL
# 需要导入模块: from windml.datasets.nrel import NREL [as 别名]
# 或者: from windml.datasets.nrel.NREL import get_turbine [as 别名]
import datetime, time
import numpy as np
from numpy import array, matrix
from sklearn.grid_search import GridSearchCV
from sklearn.cross_validation import KFold
from sklearn import __version__ as sklearn_version
from sklearn.svm import SVR
from sklearn.neighbors import KNeighborsRegressor
from windml.datasets.nrel import NREL
from windml.visualization.plot_response_curve import plot_response_curve
ds = NREL()
turbine = ds.get_turbine(NREL.park_id['palmsprings'], 2004, 2006)
timeseries = turbine.get_measurements()
max_speed = 40
skip = 1
# plot true values as blue points
speed = [m[2] for m in timeseries[::skip]]
score = [m[1] for m in timeseries[::skip]]
# Second Plot: KNN-Interpolation
# Built patterns und labels
X_train = speed[0:len(speed):1]
Y_train = score[0:len(score):1]
X_train_array = array([[element] for element in X_train])
示例5: test_get_turbine
# 需要导入模块: from windml.datasets.nrel import NREL [as 别名]
# 或者: from windml.datasets.nrel.NREL import get_turbine [as 别名]
def test_get_turbine(self):
ds = NREL()
target = ds.get_turbine(NREL.park_id['tehachapi'], 2004, 2005)
t = target.get_measurements()[0]
assert(len(t) == 3)
示例6: setUpClass
# 需要导入模块: from windml.datasets.nrel import NREL [as 别名]
# 或者: from windml.datasets.nrel.NREL import get_turbine [as 别名]
def setUpClass(cls):
ds = NREL()
cls.turbine = ds.get_turbine(NREL.park_id['tehachapi'], 2004)
cls.windpark = ds.get_windpark(NREL.park_id['tehachapi'], 3, 2004)
示例7: setUpClass
# 需要导入模块: from windml.datasets.nrel import NREL [as 别名]
# 或者: from windml.datasets.nrel.NREL import get_turbine [as 别名]
def setUpClass(cls):
ds = NREL()
cls.turbine = ds.get_turbine(NREL.park_id['tehachapi'], 2004, 2005)
cls.windpark = ds.get_windpark(NREL.park_id['tehachapi'], 3, 2004, 2005)
cls.pmapping = PowerMapping()
cls.pdmapping = PowerDiffMapping()