MCPcopy Create free account
hub / github.com/Victorletzelter/timeMCL / norm

Function norm

tsExperiments/scripts_plot/train_viz.py:165–169  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

163
164 # Normalization function on a narrow range (e.g. [0.4, 0.8])
165 def norm(p):
166 if pmax > pmin:
167 return 0.4 + (p - pmin) / (pmax - pmin) * (0.8 - 0.4)
168 else:
169 return 0.6
170
171 # Plot of each forecast with the color based on the first probability
172 for i in range(num_samples):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected