doc line too long (127 > 120 characters)
267 else prediction
268 )
269
270 # demo of prediction of the last <display> data points, which is based on the <lookback> values before the final 100 points271 demo = None
272 demo_levels = scalar.transform(
273 levels[-display - lookback : -display].reshape(-1, 1)
doc line too long (144 > 120 characters)
29
30def map_palette(station):
31 """
32 Function that returns the colour of a given station to use on the map, depending on the relationship between latest level and typical range. 33
34 Args:
35 station (MonitoringStation): The station.
doc line too long (124 > 120 characters)
261 Function that plots the prediction made by predictor.
262
263 Args:
264 date (2-tuple): List of datetime objects of actual and demo data, list of datatime objects of future predicted data.265 data (3-tuple): Lists of water levels of actual data, demo data, predicted data.
266
267 Returns:
doc line too long (135 > 120 characters)
295
296def plot_water_level_with_fit(station, dates, levels, p):
297 """
298 Function that makes a graph of the water level over time for a given station with a least-square fit polynomial with a degree of p.299
300 Args:
301 station (MonitoringStation): The desired station to graph.
doc line too long (160 > 120 characters)
8def run():
9 stations = build_station_list()
10
11 # date, data, demo, prediction = predict('Cam', dataset_size=1000, lookback=2000, iteration=100, display=300, use_pretrained=True, batch_size=256, epoch=20)12 date, data = predict(
13 stations[5].name,
14 dataset_size=1000,
Description
Docstring line lengths are recommended to be no greater than 79 characters.