-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from DHI/misc_fix
Misc fix
- Loading branch information
Showing
7 changed files
with
141 additions
and
72 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,66 +1,80 @@ | ||
.. _simple_compare: | ||
|
||
Simple time series comparison | ||
############################# | ||
|
||
If all you need to do is to compare two point time series, the workflow is | ||
very simple and described below. The general many-to-many comparison is decribed | ||
in the `getting started guide <getting_started.html>`_. | ||
|
||
|
||
Workflow | ||
******** | ||
|
||
The simplified fmskill workflow consists of these four steps: | ||
|
||
#. Specify **model result** | ||
#. Specify **observation** | ||
#. **compare()** | ||
#. Analysis and plotting | ||
|
||
|
||
1. Specify model result | ||
======================= | ||
|
||
The model result can be either a dfs0 or a DataFrame. It needs to have a single item only. | ||
|
||
.. code-block:: python | ||
from mikeio import Dfs0 | ||
fn_mod = '../tests/testdata/SW/ts_storm_4.dfs0' | ||
df_mod = Dfs0(fn_mod).read(items=0).to_dataframe() | ||
2. Specify Observation | ||
====================== | ||
The observation can be either a dfs0, a DataFrame or a PointObservation object. | ||
It needs to have a single item only. | ||
|
||
.. code-block:: python | ||
fn_obs = '../tests/testdata/SW/eur_Hm0.dfs0' | ||
3. compare() | ||
============ | ||
The `compare() <api.html#fmskill.connection.compare>`_ method will interpolate the modelresult to the time of the observation | ||
and return an object that can be used for analysis and plotting | ||
|
||
.. code-block:: python | ||
import fmskill | ||
c = fmskill.compare(fn_obs, df_mod) | ||
4. Analysis and plotting | ||
======================== | ||
|
||
The returned `PointComparer <api.html#fmskill.comparison.PointComparer>`_ can make | ||
scatter plots, skill assessment, time series plots etc. | ||
|
||
|
||
.. code-block:: python | ||
c.plot_timeseries() | ||
c.skill() | ||
c.scatter() | ||
.. _simple_compare: | ||
|
||
Simple time series comparison | ||
############################# | ||
|
||
If all you need to do is to compare two point time series, the workflow is | ||
very simple and described below. The general many-to-many comparison is decribed | ||
in the `getting started guide <getting_started.html>`_. | ||
|
||
|
||
Workflow | ||
******** | ||
|
||
The simplified fmskill workflow consists of these four steps: | ||
|
||
#. Specify **model result** | ||
#. Specify **observation** | ||
#. **compare()** | ||
#. Analysis and plotting | ||
|
||
|
||
1. Specify model result | ||
======================= | ||
|
||
The model result can be either a dfs0 or a DataFrame. | ||
|
||
.. code-block:: python | ||
from mikeio import Dfs0 | ||
fn_mod = '../tests/testdata/SW/ts_storm_4.dfs0' | ||
2. Specify Observation | ||
====================== | ||
The observation can be either a dfs0, a DataFrame or a PointObservation object. | ||
|
||
.. code-block:: python | ||
fn_obs = '../tests/testdata/SW/eur_Hm0.dfs0' | ||
3. compare() | ||
============ | ||
The `compare() <api.html#fmskill.connection.compare>`_ method will interpolate the modelresult to the time of the observation | ||
and return an object that can be used for analysis and plotting | ||
|
||
.. code-block:: python | ||
import fmskill | ||
c = fmskill.compare(fn_obs, fn_mod, mod_item=0) | ||
4. Analysis and plotting | ||
======================== | ||
|
||
The returned `PointComparer <api.html#fmskill.comparison.PointComparer>`_ can make | ||
scatter plots, skill assessment, time series plots etc. | ||
|
||
|
||
.. code-block:: python | ||
>>> c.plot_timeseries() | ||
.. image:: images/ts_plot.png | ||
|
||
|
||
.. code-block:: python | ||
>>> c.scatter() | ||
.. image:: images/scatter_plot.png | ||
|
||
.. code-block:: python | ||
>>> c.skill() | ||
n bias rmse urmse mae cc si r2 | ||
observation | ||
eur_Hm0 66 0.05321 0.229957 0.223717 0.177321 0.967972 0.081732 0.929005 | ||
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
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