vccs
Vue 3용 차트 컴포넌트 모음, Recharts에서 포팅
mlr3 생태계를 기능 데이터 분석으로 확장해 tf 패키지 정의의 불규칙·규칙 함수 데이터를 지원하고, 전처리 PipeOps를 제공한다
Extends the mlr3 ecosystem to functional analysis by adding support for irregular and regular functional data as defined in the tf package. The package provides PipeOps for preprocessing functional co
데이터RGitHub @mlr-org온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
Functional Data Analysis for mlr3
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Package website: release \|
dev
Extending mlr3 to functional data.
The goal of mlr3fda is to extend mlr3 to functional
data. This is
achieved by adding support for functional feature types and providing
preprocessing PipeOps that operate on functional columns. For
representing functional data, the tfd_reg and tfd_irreg datatypes
from the tf package are used and are
available after loading mlr3fda:README 전문 보기 ↗Package website: release | dev
Extending mlr3 to functional data.
Install the last release from CRAN:
install.packages("mlr3fda")
Install the development version from GitHub:
# install.packages("pak")
pak::pak("mlr-org/mlr3fda")
The goal of mlr3fda is to extend mlr3 to functional
data. This is
achieved by adding support for functional feature types and providing
preprocessing PipeOps that operate on functional columns. For
representing functional data, the tfd_reg and tfd_irreg datatypes
from the tf package are used and are
available after loading mlr3fda:
library(mlr3fda)
mlr_reflections$task_feature_types[c("tfr", "tfi")]
#> tfr tfi
#> "tfd_reg" "tfd_irreg"
These datatypes can be used to represent regular and irregular
functional data respectively. Currently, Learners that directly
operate on functional data are not available, so it is necessary to
first extract scalar features from the functional columns.
Here we will start with the predefined dti (Diffusion Tensor Imaging)
task, see tsk("dti")$help() for more details. Besides scalar columns,
this task also contains two functional columns cca and rcst.
task = tsk("dti")
task
#>
#> ── <TaskRegr> (340x4): Diffusion Tensor Imaging (DTI) ──────────────────────────
#> • Target: pasat
#> • Properties: groups
#> • Features (3):
#> • tfi (2): cca, rcst
#> • fct (1): sex
#> • Groups: subject_id
To train a model on this task we first need to extract scalar features from the functions. We illustrate this below by extracting the mean value.
po_fmean = po("fda.extract", features = "mean")
task_fmean = po_fmean$train(list(task))[[1L]]
task_fmean$head()
#> pasat sex cca_mean rcst_mean
#> 1: 31 female 0.4493332 0.4968519
#> 2: 31 female 0.4441292 0.4810724
#> 3: 29 female 0.4257795 0.5102722
#> 4: 34 female 0.4418538 0.5453188
#> 5: 37 female 0.4700994 0.5471177
#> 6: 40 female 0.4873356 0.4969408
This can be combined with a Learner into a GraphLearner that first
extracts features and then trains a model.
# split data into train and test set
ids = partition(task)
# define a Graph and convert it to a GraphLearner
graph = po("fda.extract", features = "mean", drop = TRUE) %>>%
po("learner", learner = lrn("regr.rpart"))
glrn = as_learner(graph)
# train the graph learner on the train set
glrn$train(task, row_ids = ids$train)
# make predictions on the test set
glrn$predict(task, row_ids = ids$test)
#>
#> ── <PredictionRegr> for 111 observations: ──────────────────────────────────────
#> row_ids truth response
#> 11 48 49.99174
#> 12 40 49.99174
#> 13 43 52.42105
#> --- --- ---
#> 324 57 52.42105
#> 325 57 41.30769
#> 326 60 49.99174
| Key | Label | Packages | Tags |
|---|---|---|---|
| fda.bsignal | B-spline Feature Extraction | tf, mboost, FDboost | fda, data transform |
| fda.catch22 | Catch22 Feature Extraction | tf, Rcatch22 | fda, data transform |
| fda.cor | Cross-Correlation of Functional Data | tf | fda, data transform |
| fda.depth | Functional Data Depth Features | tf | fda, data transform |
| fda.derive | Derivatives of Functional Columns |
mlr3fda is a free and open source software project that encourages participation and feedback. If you have any issues, questions, suggestions or feedback, please do not hesitate to open an “issue” about it on the GitHub page!
In case of problems / bugs, it is often helpful if you provide a “minimum working example” that showcases the behaviour (but don’t worry about this if the bug is obvious).
Please understand that the resources of the project are limited: response may sometimes be delayed by a few days, and some feature suggestions may be rejected if they are deemed too tangential to the vision behind the project.
The development of this R-package was supported by Roche Diagnostics R&D.
| tf |
| fda, data transform |
| fda.extract | Extract Simple Features from Functional Columns | tf | fda, data transform |
| fda.flatten | Flatten Functional Columns | tf | fda, data transform |
| fda.fourier | Fast Fourier Transform Features | tf | fda, data transform |
| fda.fpca | Functional Principal Component Analysis | tf | fda, data transform |
| fda.integrate | Functional Integral Features | tf | fda, data transform |
| fda.interpol | Interpolate Functional Columns | tf | fda, data transform |
| fda.random_effect | Extract Random Effects from Functional Columns | tf, lme4 | fda, data transform |
| fda.register | Register (Align) Functional Columns | tf | fda, data transform |
| fda.scalerange | Linearly Transform the Domain of Functional Data | tf | fda, data transform |
| fda.smooth | Smooth Functional Columns | tf, stats | fda, data transform |
| fda.tsfeats | Time Series Feature Extraction | tf, tsfeatures | fda, data transform |
| fda.wavelets | Discrete Wavelet Transform Features | tf, wavelets | fda, data transform |
| fda.zoom | Zoom In/Out on Functional Columns | tf | fda, data transform |