Movatterモバイル変換


[0]ホーム

URL:


CompareSupervised Machine Learning Models Using Shiny App

CRAN Status BadgeCRAN Downloads BadgeCRAN Downloads BadgeLicense: GPL v3Travis-CI Build StatusAppVeyor build statusLifecycle Status

shinyML

Implement in one line of code a shareable web app to comparesupervised machine learning models for regression andclassification tasks!

WithshinyML, you can compare your favorite regressionor classification models issued fromH2O orSpark frameworks without any effort.

Installation

The package can be installed fromCRAN:

install.packages("shinyML")

You can also install the latest development version fromgithub:

devtools::install_github("JeanBertinR/shinyML")
Gettingstarted: create the shinyML web app in just one list of code

This is a basic examples which shows you how to run the app:

library(shinyML)# An example of regression taskshinyML_regression(data = iris,y ="Petal.Width",framework ="h2o")# An example of classification taskshinyML_classification(data = iris,y ="Species",framework ="h2o")

Please note thatshinyML_regression andshinyML_classification will automatically detect if youinput dataset contains time-based column: in that case, train/testsplitting will be adapted to time-series forecasting.

# An example of time-series forecastinglongley2<- longley%>%mutate(Year =as.Date(as.character(Year),format ="%Y"))shinyML_regression(data = longley2,y ="Population",framework ="h2o")

Explore inputdataset before running the models…

Before running machine learning models, it can be useful to inspectthedistribution of each variable and to have aninsight ofdependencies between explanatory variables.BothshinyML_regression andshinyML_classification functions allows to checkclasses of explanatory variables, plothistograms of each distribution and showcorrelation matrix between all variables. This tabs canbe used to determine if some variable are strongly correlated to anotherand eventually removed from the training phase.You can also plotvariation of every variable as a function of another using the“Explore dataset” tab.

Testdifferent machine learning techniques and hyper-parametersconfigurations with just a few clicksTo test supervised machine learning models onshinyMLpackage, the first step consist inseparating train and testperiod from your dataset: this can be done in one second usingslider button on the right shinyML app side. You can also removevariables from your initial selection directly from app just simplyusing “Input variable” textbox. You are then free toselecthyper-parameters configuration for your favorite machinelearning model.
Note that hidden layers of deep learning technique can be set inside thecorresponding text box: the default c(200,200) configuration correspondsto a two hidden-layers neural network, with 200 neurons for each layer.

Runat the same time all machine learning techniques to compare variableimportances and error metricsYou can easily useshinyML package to comparedifferent machine learning techniques with your ownhyper-parameters configuration. For that, you will just need touse shiny app buttons corresponding to your parameters and click then to“Run tuned models !”

You will see avalidation message box once allmodels have been trained: at that point, you can have an overview ofyour results comparing variables importances and error metrics likeMAPE or *RMSE**.

RunautoML algorithm to find automatically configure the best machinelearning regression model associated to your dataset

AutoML algorithm willautomatically find thebest algorithm to suit your regression or classification task:the user will be informed of themachine learning modelthat has been selected and knowwhich hyper-parametershave been chosen.

The only setting that must be adjusted by the user is themaximum time authorized for searching.

For more information take a look at thepackagevignette.


[8]ページ先頭

©2009-2025 Movatter.jp