Updated the combining and custom operations sections
"smoothed"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the next section we will define a custom operation that will compose with the ``smoothed`` operation output above to form a short operation pipeline."
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
"cell_type": "markdown",
"metadata": {},
"source": [
- "We can now define our own custom ElementOperation, if we wish. If you recall from above, operations accept both Elements and Overlays. This means we can define a simple operation that takes our Overlay of the original and smoothed Curve Elements and subtracts one from the other. Such a subtraction will give us the residual between the smoothed and unsmoothed Curves, removing long-term trends and leaving the short-term variation.\n",
+ "We can now define our own custom ``Operation`` which as you may recall can process either elements and overlays. This means we can define a simple operation that takes our ``smoothed`` overlay and computes a difference between the raw and smoothed curves that it contains. Such a subtraction will give us the residual between the smoothed and unsmoothed ``Curve`` elements, removing long-term trends and leaving the short-term variation.\n",
"\n",
- "Defining an operation is very simple. An ElementOperation subclass should define a ``_process`` method, which accepts an ``element`` and an optional (and deprecated) ``key`` argument. Optionally we can also define parameters on the operation, which we can access using the ``self.p`` attribute on the operation. In this case we define a String-type parameter, which will become the name of the subtracted value dimension on the returned Element."
+ "Defining an operation is very simple. An ``Operation`` subclass should define a ``_process`` method, which simply accepts an ``element`` argument. Optionally we can also define parameters on the operation, which we can access using the ``self.p`` attribute on the operation. In this case we define a ``String`` parameter, which specifies the name of the subtracted value dimension on the returned Element."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "In this view we can immediately see that only a very small residual is left when applying this level of smoothing. However we have only tried one particular ``rolling_window`` value, the default value of ``10``. To assess how this parameter affects the residual we can evaluate the operation for a number of different values, as we do in the next section."
+ "In this view we can immediately see that only a very small residual is left when applying this level of smoothing. However we have only tried one particular ``rolling_window`` value, the default value of ``10``. To assess how this parameter affects the residual we can evaluate the operation over a number different parameter settongs, as we will now see in the next section."
]
},
{
