| Title: | Interactive Statistical Analysis and Machine Learning Platform |
|---|---|
| Description: | A 'Shiny'-based interactive platform for end-to-end data science workflows. Provides modules for data import (CSV, 'Excel', RDS, TXT), data preprocessing (missing value imputation, encoding, scaling, outlier removal), exploratory data analysis with interactive plots and normality tests, supervised learning (regression and classification each with eight algorithms), and unsupervised learning (k-means, hierarchical clustering, density-based spatial clustering of applications with noise). Designed for students and practitioners in data science and artificial intelligence. |
| Authors: | Mohsen Mehdinia [aut, cre] |
| Maintainer: | Mohsen Mehdinia <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-05-19 11:08:48 UTC |
| Source: | https://github.com/cran/DrData |
Build a model formula with optional interaction terms
build_model_formula( target, features, use_interactions = FALSE, interaction_vars = NULL )build_model_formula( target, features, use_interactions = FALSE, interaction_vars = NULL )
target |
Single character: response variable name. |
features |
Character vector of predictor names. |
use_interactions |
Logical; add two-way interactions? Default FALSE. |
interaction_vars |
Character vector of variables to interact. |
A formula object.
build_model_formula("mpg", c("cyl", "hp", "wt")) build_model_formula("mpg", c("cyl","hp","wt"), TRUE, c("cyl","hp"))build_model_formula("mpg", c("cyl", "hp", "wt")) build_model_formula("mpg", c("cyl","hp","wt"), TRUE, c("cyl","hp"))
Compute regression performance metrics
ml_metrics_regression(y_true, y_pred)ml_metrics_regression(y_true, y_pred)
y_true |
Numeric vector of observed values. |
y_pred |
Numeric vector of predicted values. |
One-row data.frame with columns RMSE, MAE, R2.
ml_metrics_regression(c(1,2,3,4,5), c(1.1,1.9,3.2,3.8,5.1))ml_metrics_regression(c(1,2,3,4,5), c(1.1,1.9,3.2,3.8,5.1))
Prepare a data frame for machine learning
ml_prepare_data(data, target, features = NULL)ml_prepare_data(data, target, features = NULL)
data |
A |
target |
Single character string: the response column name. |
features |
Character vector of predictor names. Default: all except target. |
Named list: data, target, features.
prep <- ml_prepare_data(mtcars, target = "mpg") names(prep)prep <- ml_prepare_data(mtcars, target = "mpg") names(prep)
Split a data frame into training and test sets
ml_split(data, train_ratio = 0.8, seed = 42)ml_split(data, train_ratio = 0.8, seed = 42)
data |
A |
train_ratio |
Numeric in (0,1); proportion for training. Default 0.8. |
seed |
Integer random seed. Default 42. |
Named list with train and test data frames.
splits <- ml_split(mtcars, train_ratio = 0.75, seed = 1) nrow(splits$train)splits <- ml_split(mtcars, train_ratio = 0.75, seed = 1) nrow(splits$train)
Launches the 'DrData' interactive 'Shiny' application for statistical analysis and machine learning workflows.
run_app()run_app()
No return value, called for side effects.
if(interactive()){ run_app() }if(interactive()){ run_app() }