Evolutive bugfixes
This commit is contained in:
parent
dd78b7e559
commit
9936a184ef
@ -68,7 +68,7 @@ def mape(targets, forecasts):
|
|||||||
targets = np.array(targets)
|
targets = np.array(targets)
|
||||||
if isinstance(forecasts, list):
|
if isinstance(forecasts, list):
|
||||||
forecasts = np.array(forecasts)
|
forecasts = np.array(forecasts)
|
||||||
return np.mean(np.abs((targets - forecasts) / targets)) * 100
|
return np.mean(np.abs(np.divide((targets - forecasts), targets))) * 100
|
||||||
|
|
||||||
|
|
||||||
def smape(targets, forecasts, type=2):
|
def smape(targets, forecasts, type=2):
|
||||||
|
@ -142,7 +142,9 @@ def evaluate(dataset, individual, **kwargs):
|
|||||||
if model is None:
|
if model is None:
|
||||||
raise Exception("Phenotype returned None")
|
raise Exception("Phenotype returned None")
|
||||||
|
|
||||||
rmse, _, _ = Measures.get_point_statistics(test, model)
|
forecasts = model.predict(test)
|
||||||
|
|
||||||
|
rmse = Measures.rmse(test[model.order:], forecasts[:-1]) #.get_point_statistics(test, model)
|
||||||
lengths.append(len(model))
|
lengths.append(len(model))
|
||||||
|
|
||||||
results.append(rmse)
|
results.append(rmse)
|
||||||
|
Loading…
Reference in New Issue
Block a user