-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilters.html
More file actions
146 lines (120 loc) · 7.63 KB
/
filters.html
File metadata and controls
146 lines (120 loc) · 7.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Filters — pyropython documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Examples" href="examples.html" />
<link rel="prev" title="Plotting" href="plots.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="filters">
<h1>Filters<a class="headerlink" href="#filters" title="Permalink to this headline">¶</a></h1>
<p>Pyropython contains a few simple routines for filtering data. Most users will still probably want to
do any needed filtering pof data manually. By default, no filters are used.</p>
<p>The filters are invoked by the <strong>filter</strong> keyword in the variable definitions under <strong>simulation</strong> and <strong>experiment</strong>
keywords in the configuration file. Available filters are:</p>
<ol class="arabic simple">
<li><strong>ma</strong> - moving average</li>
<li><strong>median</strong> - median filter</li>
<li><strong>gp</strong> - gaussian process</li>
</ol>
<p>Both the moving average and median filters accept an optional <strong>width</strong> parameter. The parameter can be given on the
data line with the <strong>filter_opts</strong> keyword as follows:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">MLR35</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">fname</span><span class="p p-Indicator">:</span> <span class="s">'Experimental_Data/Birch_35kW.csv'</span>
<span class="l l-Scalar l-Scalar-Plain">dep_col_name</span><span class="p p-Indicator">:</span> <span class="s">'MLR'</span>
<span class="l l-Scalar l-Scalar-Plain">header</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="l l-Scalar l-Scalar-Plain">filter_type</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">median</span>
<span class="l l-Scalar l-Scalar-Plain">filter_opts</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">width</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">31</span>
</pre></div>
</div>
<p>The default width for median and moving average filters is 10 samples. Note that boths median and moving average filters
assume uniform sampling of the input.</p>
<p>The Gaussian process filter works by fitting a <a class="reference external" href="http://scikit-learn.org/stable/modules/gaussian_process.html">Gaussian process</a> model to the data and then using the expected value
of the gaussian priocess as the filtered value (Gaussian process regression). Fitting a model can take up even several minutes
for datasets with thousands of samples. However, the Gaussian process “filter” automatically determines its parameters and
does not assume uniform sampling.</p>
<p>The effect of the filter can be investigated using the <em>plot_pyro</em> tool. See the section <a class="reference internal" href="plots.html#plotting"><span class="std std-ref">Plotting</span></a>
for more information. For example, the following input (borrowed from <a class="reference external" href="https://github.com/PyroId/PyroPython/tree/master/examples/Birch_Cone_Example">Birch_Cone_Example</a>)</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">MLR35</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">fname</span><span class="p p-Indicator">:</span> <span class="s">'Experimental_Data/Birch_35kW.csv'</span>
<span class="l l-Scalar l-Scalar-Plain">dep_col_name</span><span class="p p-Indicator">:</span> <span class="s">'MLR'</span>
<span class="l l-Scalar l-Scalar-Plain">header</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="l l-Scalar l-Scalar-Plain">filter_type</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">gp</span>
</pre></div>
</div>
<p>Produces the following result: (The image is produced by plot_pyro)</p>
<div class="figure">
<img alt="_images/Exp_MLR50.jpg" src="_images/Exp_MLR50.jpg" />
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">pyropython</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration files</a></li>
<li class="toctree-l1"><a class="reference internal" href="templates.html">Template files</a></li>
<li class="toctree-l1"><a class="reference internal" href="optimizers.html">Optimizers</a></li>
<li class="toctree-l1"><a class="reference internal" href="plots.html">Plotting</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Filters</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="plots.html" title="previous chapter">Plotting</a></li>
<li>Next: <a href="examples.html" title="next chapter">Examples</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2018, Topi Sikanen.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.9</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
|
<a href="_sources/filters.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>