From: Benjamin Auder Date: Thu, 29 Dec 2016 15:16:48 +0000 (+0100) Subject: 'update' X-Git-Url: https://git.auder.net/app_dev.php/js/current/gitweb.js?a=commitdiff_plain;h=ac1d423158fc0f625af1d3ab8b0a509fc3ae015c;p=epclust.git 'update' --- diff --git a/code/draft_R_pkg/DESCRIPTION b/code/draft_R_pkg/DESCRIPTION new file mode 100644 index 0000000..ce9129b --- /dev/null +++ b/code/draft_R_pkg/DESCRIPTION @@ -0,0 +1,21 @@ +Package: epclust +Title: Clustering individual electricity power curves +Description: EPCLUST: Electric Power curves CLUSTering, through their wavelets decomposition. + The main method 'epclust' takes (usually long) time-series in input, and return as many + clusters centers as requested, along with their identifiers (if aplicable). + Several parameters can be tuned: please refer to the package vignette. +Version: 0.1-0 +Author: + Benjamin Auder [aut,cre], + Jairo Cugliari [aut] +Maintainer: Benjamin Auder +Depends: + R (>= 3.0.0) +Imports: + MASS +Suggests: + testthat, + parallel, + knitr +License: MIT + file LICENSE +VignetteBuilder: knitr diff --git a/code/draft_R_pkg/LICENSE b/code/draft_R_pkg/LICENSE new file mode 100644 index 0000000..3c29ab5 --- /dev/null +++ b/code/draft_R_pkg/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2016-2017 +COPYRIGHT HOLDER: Jairo CUGLIARI diff --git a/code/draft_R_pkg/R/main.R b/code/draft_R_pkg/R/main.R new file mode 100644 index 0000000..4120b39 --- /dev/null +++ b/code/draft_R_pkg/R/main.R @@ -0,0 +1,26 @@ +epclust = function(data=NULL, con=NULL, raw=FALSE, K, nbPerChunk, ...) +{ + + +#TODO: just a wrapper which calls ppam.exe (system("...")) and reads output (binary) file to retrieve medoids + IDs + #on input: can be data or con; data handled by writing it to file (ascii or bin ?!), + #con handled + + + #options for tmp files: in RAM, on disk, on DB (can be distributed) + + + + if (!is.null(data)) + { + #full data matrix + + } else if (!is.null(con)) + { + #incremental connection + #read it one by one and get coeffs until nbSeriesPerChunk + #then launch a clustering task............ + } else + stop("at least 'data' or 'con' argument must be present") + +} diff --git a/code/draft_R_pkg/README.md b/code/draft_R_pkg/README.md new file mode 100644 index 0000000..cfe894e --- /dev/null +++ b/code/draft_R_pkg/README.md @@ -0,0 +1,11 @@ +# Clustering individual power curves using wavelets decomposition + +This package was funded by a contract with EDF; its goal is to identify groups of customers. + +## Description + +TODO + +## Example + +TODO diff --git a/code/draft_R_pkg/man/epclust-package.Rd b/code/draft_R_pkg/man/epclust-package.Rd new file mode 100644 index 0000000..c6bfac0 --- /dev/null +++ b/code/draft_R_pkg/man/epclust-package.Rd @@ -0,0 +1,34 @@ +\name{epclust-package} +\alias{epclust-package} +\alias{epclust} +\docType{package} + +\title{ + \packageTitle{epclust} +} + +\description{ + \packageDescription{epclust} +} + +\details{ + The package devtools should be useful in development stage, since we rely on testthat for + unit tests, and roxygen2 for documentation. knitr is used to generate the package vignette. + Concerning the other suggested packages, 'parallel' can speed up (...TODO...) + + The main function is located in R/main.R: it runs the clustering task (TODO: explain more). +} + +\author{ + \packageAuthor{epclust} + + Maintainer: \packageMaintainer{epclust} +} + +%\references{ +% TODO: Literature or other references for background information +%} + +%\examples{ +% TODO: simple examples of the most important functions +%} diff --git a/code/draft_R_pkg/tests/testthat.R b/code/draft_R_pkg/tests/testthat.R new file mode 100644 index 0000000..eb8bc36 --- /dev/null +++ b/code/draft_R_pkg/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(epclust) + +test_check("epclust") diff --git a/code/draft_R_pkg/tests/testthat/test.TODO.R b/code/draft_R_pkg/tests/testthat/test.TODO.R new file mode 100644 index 0000000..e69de29 diff --git a/code/draft_R_pkg/vignettes/TODO.Rnw b/code/draft_R_pkg/vignettes/TODO.Rnw new file mode 100644 index 0000000..e69de29