Skip to content
Snippets Groups Projects
README.md 2.89 KiB
Newer Older
Isabelle Sanchez's avatar
Isabelle Sanchez committed
[![pipeline status](https://forgemia.inra.fr/isabelle.sanchez/kfino/badges/main/pipeline.svg)](https://forgemia.inra.fr/isabelle.sanchez/kfino/-/commits/main) 
sanchezi's avatar
sanchezi committed
# kfino <img src='man/figures/logo.png' align="right" height="139" />
Isabelle Sanchez's avatar
Isabelle Sanchez committed

The **kfino** algorithm was developped for time courses in order to detect impulse noised outliers and predict the parameter of interest mainly for data recorded on the walk-over-weighing system described in this publication:
E.González-García *et. al.* (2018) A mobile and automated walk-over-weighing system for a close and remote monitoring of liveweight in sheep. vol 153: 226-238. https://doi.org/10.1016/j.compag.2018.08.022
Isabelle Sanchez's avatar
Isabelle Sanchez committed

**Kalman filter with impulse noised outliers** (kfino) is a robust sequential algorithm allowing to filter data with a large number of outliers. This algorithm is based on simple latent linear Gaussian processes as in the Kalman Filter method and is devoted to detect impulse-noised outliers. These are data points that differ significantly from other observations.
Isabelle Sanchez's avatar
Isabelle Sanchez committed

The method is described in full details in the following arxiv preprint: https://arxiv.org/abs/2208.00961.
Isabelle Sanchez's avatar
Isabelle Sanchez committed

Isabelle Sanchez's avatar
Isabelle Sanchez committed

Isabelle Sanchez's avatar
Isabelle Sanchez committed
To install the **kfino** package, the easiest is to install it directly from GitLab. Open an R session and run the following commands:
Isabelle Sanchez's avatar
Isabelle Sanchez committed

```
if (!require("remotes")) {
  install.packages("remotes")
}
Isabelle Sanchez's avatar
Isabelle Sanchez committed
remotes::install_gitlab("isabelle.sanchez/kfino",host = "forgemia.inra.fr",
Isabelle Sanchez's avatar
Isabelle Sanchez committed
                        build_vignettes=TRUE)
Isabelle Sanchez's avatar
Isabelle Sanchez committed
```
Isabelle Sanchez's avatar
Isabelle Sanchez committed
## Usage
Once the package is installed on your computer, it can be loaded into a R session:
Isabelle Sanchez's avatar
Isabelle Sanchez committed

Isabelle Sanchez's avatar
Isabelle Sanchez committed
library(kfino)
help(package="kfino")
Isabelle Sanchez's avatar
Isabelle Sanchez committed

Please, have a look to the vignettes that explain how to use the algorithm. The 
main specifications are:

* filtering data with a large number of outliers 
* predicting the analyzed variable
* providing useful graphics to interpret the data

![quali](man/figures/kfino_plot_quali.png)

![quanti](man/figures/kfino_plot_quanti.png)

![pred](man/figures/kfino_plot_pred.png)

Isabelle Sanchez's avatar
Isabelle Sanchez committed
As a lot of time and effort were spent in creating the kfino algorithm, please cite it when using it for data analysis:
Isabelle Sanchez's avatar
Isabelle Sanchez committed

https://arxiv.org/abs/2208.00961.
Isabelle Sanchez's avatar
Isabelle Sanchez committed

sanchezi's avatar
sanchezi committed
See also citation() for citing R itself.

## References

The **kfino** logo was created using the **hexSticker** package:

* Guangchuang Yu (2020). hexSticker: Create Hexagon Sticker in R. R package version 0.4.9. https://CRAN.R-project.org/package=hexSticker

Walk-over-weighing system:

* E.González-García *et. al.* (2018) A mobile and automated walk-over-weighing system for a close and remote monitoring of liveweight in sheep. vol 153: 226-238. https://doi.org/10.1016/j.compag.2018.08.022
* González García, Eliel, 2021, Individual liveweight of Mérinos d'Arles ewelambs, measured with a Walk-over-Weighing (WoW) system under Mediterranean grazing conditions, https://doi.org/10.15454/IXSHF7, Recherche Data Gouv, V5, UNF:6:q4HEDt0n8nzxYRxc+9KK8g==[fileUNF]