# Linear weight function

### Description

Builds a linear time weight function to compute the TWDTW local cost matrix [1].

### Usage

1 | ```
linearWeight(a, b = 0)
``` |

### Arguments

`a` |
numeric. The slop of the line. |

`b` |
numeric. The intercept of the line. |

### Details

The linear `linearWeight`

and `logisticWeight`

weight functions
can be passed to `twdtwApply`

through the argument `weight.fun`

.
This will add a time-weight to the dynamic time warping analysis. The time weight
creates a global constraint useful to analyse time series with phenological cycles
of vegetation that are usually bound to seasons. In previous studies by [1] the
logistic weight had better results than the linear for land cover classification.
See [1] for details about the method.

### Value

An `function`

object.

### Author(s)

Victor Maus, vwmaus1@gmail.com

### References

[1] Maus V, Camara G, Cartaxo R, Sanchez A, Ramos FM, de Queiroz, GR. (2016). A Time-Weighted Dynamic Time Warping method for land use and land cover mapping. Selected Topics in Applied Earth Observations and Remote Sensing, IEEE Journal of, vol.PP, no.99, pp.1-11.

### See Also

`twdtwApply`

### Examples

1 2 | ```
lin_fun = linearWeight(a=0.1)
lin_fun
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.