Package 'regressoR'

Title: Regression Data Analysis System
Description: Perform a supervised data analysis on a database through a 'shiny' graphical interface. It includes methods such as linear regression, penalized regression, k-nearest neighbors, decision trees, ada boosting, extreme gradient boosting, random forest, neural networks, deep learning and support vector machines.
Authors: Oldemar Rodriguez [aut, cre], Andres Navarro D. [ctb, prg], Diego Jimenez A. [ctb, prg], Ariel Arroyo S. [ctb, prg], Joseline Quiros M. [ctb, prg]
Maintainer: Oldemar Rodriguez <[email protected]>
License: GPL (>= 2)
Version: 4.0.3
Built: 2024-12-25 07:12:53 UTC
Source: CRAN

Help Index


as_string_c

Description

creates a string representative of a vector

Usage

as_string_c(vect, quote = TRUE)

Arguments

vect

a vector with values

quote

a logical value. If TRUE, the values on the vector will be surrounded by quotes.

Examples

as_string_c(c("A", "B", "C"))
as_string_c(c(5, 6, 7))
as_string_c(c(5, 6, 7), quote = FALSE)
as_string_c(iris$Species)

Error Evolution

Description

Error Evolution

Usage

e_boost_evol_error(modelo, label = "Iterations")

Arguments

modelo

a adabag model.

label

a label plot.

Value

echarts4r plot

Author(s)

Joseline Quiros <[email protected]>

Examples

model <- traineR::train.gbm(Sepal.Length~., data = iris, 
  distribution = "gaussian", n.trees = 5, shrinkage = 0.01)
e_boost_evol_error(model, iris)

Var importance Adabag

Description

Var importance Adabag

Usage

e_boost_importance(modelo)

Arguments

modelo

a adabag model.

Value

echarts4r plot

Author(s)

Joseline Quiros <[email protected]>

Examples

model <- traineR::train.gbm(Sepal.Length~., data = iris, 
  distribution = "gaussian", n.trees = 5, shrinkage = 0.01)
e_boost_importance(model)

Coefficients and lambda

Description

Plot the coefficients and selected lambda of a glmnet model.

Usage

e_coeff_lambda(model, sel.lambda = NULL, label = "Log Lambda")

Arguments

model

a glmnet model.

sel.lambda

the selected lambda.

label

a character specifying the title to use on selected lambda tooltip.

Value

echarts4r plot

Author(s)

Joseline Quiros <[email protected]>

Examples

x <- model.matrix(Sepal.Length ~ ., iris)[, -1]
y <- iris$Sepal.Length
modelo <- glmnet::cv.glmnet(x, y, standardize = TRUE, alpha = 1, family = "gaussian")
e_coeff_lambda(modelo, log(modelo$lambda[1]))

Eval character vectors to JS code

Description

Eval character vectors to JS code

Usage

e_JS(...)

Arguments

...

character vectors to evaluate

Author(s)

Joseline Quiros <[email protected]>

Examples

e_JS('5 * 3')

Possible lambda

Description

Possible lambda

Usage

e_posib_lambda(
  cv.glm,
  labels = c("Valor Superior", "Valor Inferior", "lambda")
)

Arguments

cv.glm

a cv.glmnet model.

labels

a character vector of length 3 specifying the titles to use on legend.

Value

echarts4r plot

Author(s)

Joseline Quiros <[email protected]>

Examples

x         <- model.matrix(Species~., iris)[, -1]
y         <- iris[,'Species']
cv.glm    <- glmnet::cv.glmnet(x, y, standardize = TRUE, alpha = 1, family = 'multinomial')
e_posib_lambda(cv.glm)

Error Evolution

Description

Error Evolution

Usage

e_rf_error(modelo, label = "Trees")

Arguments

modelo

a random forest model.

label

a label plot.

Value

echarts4r plot

Author(s)

Joseline Quiros <[email protected]>

Examples

model <- traineR::train.randomForest(Sepal.Length~., iris, mtry = 2, ntree = 20)
e_rf_error(model, "Trees")

Var importance Random Forest

Description

Var importance Random Forest

Usage

e_rndf_importance(modelo, error = "X.IncMSE")

Arguments

modelo

a random forest model.

error

a character specifying the type of importance.

Value

echarts4r plot

Author(s)

Joseline Quiros <[email protected]>

Examples

model <- traineR::train.randomForest(Species~., iris, mtry = 2, ntree = 20)
e_rndf_importance(model)

e.rdim.rmse

Description

graph the root mean square error of cross validation according to components used.

Usage

e.rdim.rmse(modelo, ncomp, titles = c("RMSE", "Componente"))

Arguments

modelo

a dimension reduction model.

ncomp

the optimum number of components.

titles

labels on the chart

Value

echarts4r plot

Author(s)

Diego Jimenez <[email protected]>


plot_pred_rd

Description

graph of variance explained in the predictors according to components used.

Usage

e.rdim.vare(modelo, ncomp, titles = c("Varianza Explicada", "Componente"))

Arguments

modelo

a dimension reduction model.

ncomp

the optimum number of components.

titles

labels on the chart

Value

echarts4r plot

Author(s)

Ariel Arroyo <[email protected]>


exe

Description

concat and execute a text in R.

Usage

exe(..., envir = parent.frame())

Arguments

...

one or more texts to be concatenated and executed.

envir

the environment in which expr is to be evaluated.

Value

the result of the execute.

Examples

exe("5+5")
exe("5","+","5")
exe("plot(iris$Species)")

extract_code

Description

gets the code of a function in text form.

Usage

extract_code(funcion, envir = parent.frame())

Arguments

funcion

the name of the function to be extracted.

envir

the environment in which expr is to be evaluated.

Examples

extract_code("cat")
extract_code("plot")

parse(text = extract_code("plot"))

general.indices

Description

calculates indices to measure accuracy of a model.

calculates indices to measure accuracy of a model.

Usage

general.indices(real, prediccion)

general.indices(real, prediccion)

Arguments

real

the real values in traning-testing.

prediccion

the prediction values in traning-testing.

Value

a list with the Correlation, Relative Error, Mean Absolute Error and Root Mean Square Error.

a list with the Correlation, Relative Error, Mean Absolute Error and Root Mean Square Error.

Examples

real <- rnorm(45)
prediction <- rnorm(45)
model <- "KNN"
general.indices(real, prediction)

real <- rnorm(45)
prediction <- rnorm(45)
model <- "KNN"
general.indices(real, prediction)

plot_real_prediction

Description

scatter plot between the actual value of the variable to be predicted and the prediction of the model.

Usage

plot_real_prediction(real, pred, titles = c("Real", "Prediccion"))

Arguments

real

the real values in traning-testing.

pred

the prediction values in traning-testing.

titles

Labels on the chart

Value

echarts4r plot

Author(s)

Ariel Arroyo <[email protected]>


Regression Data Analysis System

Description

Perform a supervised data analysis on a database through a 'shiny' graphical interface. It includes methods such as linear regression, penalized regression, k-nearest neighbors, decision trees, ada boosting, extreme gradient boosting, random forest, neural networks, deep learning and support vector machines.

Details

Package: regressoR
Type: Package
Version: 4.0.2
Date: 2024-11-15
License: GPL (>=2)

Author(s)

Oldemar Rodriguez Rojas
Maintainer: Oldemar Rodriguez Rojas <[email protected]>

See Also

Useful links:


Run the Shiny Application

Description

Run the Shiny Application

Usage

run_app(...)

Arguments

...

A series of options to be used inside the app.


summary_indices

Description

summarizes a variable by returning the minimum, first quartile, third quartile and maximum value.

Usage

summary_indices(data)

Arguments

data

a numeric vector.

Examples

summary_indices(iris$Sepal.Length)