A Zero-Code GUI Wrapper for Data Mining and Machine Learning bringing Business Analytics to RKWard
rk.business.mining bridges the gap between complex machine learning algorithms and practical Business Analytics. Designed with modern data science workflows in mind (aligning with leading business analytics textbooks), this plugin provides a seamless, point-and-click interface to partition data, train Decision Trees, run K-NN or Naive Bayes classifiers, and evaluate business KPIs (like Accuracy, Sensitivity, and AUC via ROC curves)—all without writing a single line of R code.
caret) to maintain the exact proportion of your target variable.rpart and generate beautiful, highly customizable visualizations using rpart.plot (complete with business-friendly color palettes like Red-Yellow-Green).pROC engine. Features textbook-standard axes (1 - Specificity) and clean, scientific notation-free labels.Analysis > Predictive Analytics menu.rk.graph.on).You must have RKWard installed along with the following R packages. The plugin will automatically attempt to load them when required:
install.packages(c("rpart", "rpart.plot", "caret", "e1071", "pROC"))
You can install this plugin directly from GitHub using remotes or devtools inside your RKWard console:
# Install the plugin
library("remotes")
# install_github("AlfCano/rk.business.mining")
install.packages("rk.business.mining", repos = c('https://alfcano.r-universe.dev', 'https://cloud.r-project.org'))
Once installed, restart RKWard to ensure the new menu entries and translations appear correctly.
This plugin adds a comprehensive modeling suite under the Analysis > Predictive Analytics menu in RKWard:
The critical first step for any Predictive Analytics project. Securely split your dataset into training (e.g., 70%) and testing (e.g., 30%) sets using stratified sampling to ensure your target classes are well-represented in both sets.
Highly interpretable models perfect for business presentations. Select your training data, target variable, and predictors. Tweak hyperparameters (Complexity Parameter, Max Depth), choose a beautiful color palette, and let the plugin generate the tree rules and visual nodes.
Alternative algorithms for benchmark comparisons. Train non-parametric models. The GUI intelligently reminds you to standardize your numeric data when selecting distance-based models like KNN.
The Acid Test: Expose your models to the Testing Data. Pass your trained models and the untainted testing dataset to this tool. Generate comprehensive Confusion Matrices, extract KPIs, and plot pristine ROC Curves to evaluate the true predictive power (AUC) of your models.
To see the true power of rk.business.mining in a Business Analytics context (such as the methodologies taught in Jaggia's Business Analytics textbook), let's predict a categorical outcome.
While textbooks often use customer churn or loan defaults, we will use a classic dataset pre-loaded in R: kyphosis (predicting whether a patient will develop a spinal deformity after surgery).
data(kyphosis, package="rpart")
kyphosis as your Dataset and Kyphosis (the first column) as your Target.data_train and data_test have been securely created in your workspace.
data_train as your Training Data.Kyphosis (the categorical absent/present variable) as the Target Variable.tree_model.
Sometimes a director wants to compare scenarios. What if we measure "distances" between patients using K-NN instead of logical rules?
data_train.Kyphosis. (Leave Predictors blank).knn_model (so we don't overwrite our tree).Here we test our brand-new models using the test data we sliced off at the beginning—data the algorithm has never seen before.
tree_model (the one we saved in Step 2).data_test (the pure, untainted database).Kyphosis (ensure you select it from the columns of data_test).True to the Jaggia philosophy, we don't hand management a report full of "p-values" and raw R code. We use the tables generated by RKWard to speak in terms of operations and profitability.
Here is how you "pitch" the clean HTML reports RKWard just gave you:
1. Interpreting the Confusion Matrix & Accuracy: Look at the Business Metrics section. If the Overall Accuracy is 79%, you tell the Medical Director (or CEO):
"Out of every 100 surgeries (or customers), our model correctly predicts the outcome for 79 of them. This allows us to surgically target our preventive resources and budget rather than guessing."
2. Interpreting Sensitivity (True Positive Rate): Look at the Sensitivity row.
"The model successfully flagged the vast majority of patients who were actually at risk. While our sensitivity indicates we didn't catch every single one, we will still be able to cut post-operative complications by more than half."
3. Interpreting the ROC Curve (AUC): Look at the generated ROC plot and the Area Under the Curve (AUC) number.
"Our model has an AUC of 0.75. Considering that flipping a coin gives us 0.50, our system has real predictive power. With this, the hospital can confidently decide to allocate preventive physical therapy specifically to patients who fall into the 'red node' of our decision tree, optimizing the budget."
The graphical interface automatically adapts to your RKWard language settings. Currently supported languages:
Author: Alfonso Cano (@AlfCano)
Email: alfonso.cano@correo.buap.mx
This project is licensed under the GPL (>= 3) License.