Skip to content

Commit

Permalink
fix small errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Jan 24, 2022
1 parent 1692ca9 commit 6c8d2e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FactorGraph"
uuid = "528f6532-2a0d-4856-bb42-8bcefd89a10f"
authors = ["Mirsad Cosovic <[email protected]>"]
version = "0.1.2"
version = "0.1.3"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
6 changes: 3 additions & 3 deletions src/utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function errorMetric(gbp::Union{ContinuousModel, ContinuousTreeModel})
@inbounds for i = 1:length(gbp.system.observation)
rmse += (gbp.system.observation[i] - observationGBP[i])^2
mae += abs(gbp.system.observation[i] - observationGBP[i])
wrss += (gbp.system.observation[i] - observationGBP[i]) / gbp.system.variance[i]
wrss += (gbp.system.observation[i] - observationGBP[i])^2 / gbp.system.variance[i]
end
rmse = (rmse / NactiveRows)^(1/2)
mae = mae / NactiveRows
Expand All @@ -45,7 +45,7 @@ end
@inbounds for i = 1:length(gbp.system.observation)
rmse += (gbp.system.observation[i] - observationGBP[i])^2
mae += abs(gbp.system.observation[i] - observationGBP[i])
wrss += (gbp.system.observation[i] - observationGBP[i]) / gbp.system.variance[i]
wrss += (gbp.system.observation[i] - observationGBP[i])^2 / gbp.system.variance[i]
end
rmse = (rmse / NactiveRows)^(1/2)
mae = mae / NactiveRows
Expand Down Expand Up @@ -76,7 +76,7 @@ function wls(gbp::Union{ContinuousModel, ContinuousTreeModel})
@inbounds for i = 1:length(gbp.system.observation)
rmse += (gbp.system.observation[i] - observationWLS[i])^2
mae += abs(gbp.system.observation[i] - observationWLS[i])
wrss += (gbp.system.observation[i] - observationWLS[i]) / gbp.system.variance[i]
wrss += (gbp.system.observation[i] - observationWLS[i])^2 / gbp.system.variance[i]
end
rmse = (rmse / NactiveRows)^(1/2)
mae = mae / NactiveRows
Expand Down

0 comments on commit 6c8d2e4

Please sign in to comment.