-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e0936c
commit 15dacdb
Showing
8 changed files
with
149 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import MV2 | ||
import cdutil | ||
|
||
|
||
def compute(dm, do): | ||
""" Computes bias""" | ||
if dm is None and do is None: # just want the doc | ||
|
@@ -10,5 +11,6 @@ def compute(dm, do): | |
"Contact": "[email protected]", | ||
} | ||
dif = MV2.subtract(dm, do) | ||
return MV2.float(cdutil.averager(dif,axis='xy',weights='weighted')) | ||
# return MV2.float(MV2.average(MV2.subtract(dm, do))) deprecated - does not use area weights | ||
return MV2.float(cdutil.averager(dif, axis='xy', weights='weighted')) | ||
# return MV2.float(MV2.average(MV2.subtract(dm, do))) deprecated - does | ||
# not use area weights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import MV2 | ||
import cdutil | ||
|
||
|
||
def compute(dm, do): | ||
""" Computes bias""" | ||
if dm is None and do is None: # just want the doc | ||
|
@@ -10,5 +11,6 @@ def compute(dm, do): | |
"Contact": "[email protected]", | ||
} | ||
dif = MV2.subtract(dm, do) | ||
return MV2.float(cdutil.averager(dif,axis='xyt',weights='weighted')) | ||
# return MV2.float(MV2.average(MV2.subtract(dm, do))) deprecated - does not use area weights | ||
return MV2.float(cdutil.averager(dif, axis='xyt', weights='weighted')) | ||
# return MV2.float(MV2.average(MV2.subtract(dm, do))) deprecated - does | ||
# not use area weights |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import MV2 | ||
import cdutil | ||
|
||
|
||
def compute(dm, do): | ||
""" Computes Mean Absolute Error""" | ||
if dm is None and do is None: # just want the doc | ||
|
@@ -11,7 +12,8 @@ def compute(dm, do): | |
"Contact": "[email protected]", | ||
} | ||
absdif = MV2.absolute(MV2.subtract(dm, do)) | ||
mae = cdutil.averager(absdif,axis='xy',weights='weighted') | ||
mae = cdutil.averager(absdif, axis='xy', weights='weighted') | ||
|
||
# mae = MV.average(MV.absolute(MV.subtract(dm, do))) - depricated ... did not include area weights | ||
# mae = MV.average(MV.absolute(MV.subtract(dm, do))) - depricated ... did | ||
# not include area weights | ||
return float(mae) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import MV2 | ||
import cdutil | ||
|
||
|
||
def compute(dm, do): | ||
""" Computes Mean Absolute Error""" | ||
if dm is None and do is None: # just want the doc | ||
|
@@ -11,7 +12,8 @@ def compute(dm, do): | |
"Contact": "[email protected]", | ||
} | ||
absdif = MV2.absolute(MV2.subtract(dm, do)) | ||
mae = cdutil.averager(absdif,axis='xyt',weights='weighted') | ||
mae = cdutil.averager(absdif, axis='xyt', weights='weighted') | ||
|
||
# mae = MV.average(MV.absolute(MV.subtract(dm, do))) - depricated ... did not include area weights | ||
# mae = MV.average(MV.absolute(MV.subtract(dm, do))) - depricated ... did | ||
# not include area weights | ||
return float(mae) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters