Visual Programming with Orange Tool

Sarjakmodi
5 min readSep 26, 2021

Visual programming is a type of programming language that lets humans describe processes using illustration. Whereas a typical text-based programming language makes the programmer think like a computer, a visual programming language lets the programmer describe the process in terms that make sense to humans.

Just how big the gap is between visual programming and traditional programming depends on the visual programming tool. At one extreme, the tool shields the programmer almost entirely from the gaping space between human thinking and computers shuffling bits around memory.

A Brief History of Visual Programming Software:

It looked like visual programming but without producing executable software.

Workflow Creation:

The widget tests learning algorithms. Different sampling schemes are available, including using separate test data. The widget does two things. First, it shows a table with different classifier performance measures, such as classification accuracy and area under the curve. Second, it outputs evaluation results, which can be used by other widgets for analyzing the performance of classifiers, such as ROC Analysis or Confusion Matrix.

The sample data from Test and Score is sent to three different learning algorithms namely Neural Network, Naive Bayes, and Logistic Regression.

How to Split our data into training data and testing data:

For this purpose, we use Data Sampler Widget. Now, we will split the data into two parts, 80% of data for training and 20% for testing. We will send the first 80% onwards to build a model and the remaining for testing purposes.

Data Sampler

It selects a subset of data instances from an input dataset.

Inputs

Data: input dataset

Outputs

Data Sample: sampled data instances (used for training)

Remaining Data: out-of-sample data (used for testing)

So we have to pass the whole dataset into Data Sampler Widget. In Data Sampler Widget we will partition our dataset into the train(80% ) and test data(20%)

Training a model is the first step in making good predictions. Splitting data is, therefore, necessary to build a solid basis to train and test a model. This is allegedly not the most interesting or exciting task, however, it is essential for everyone working with data.

Why is Data Splitting necessary?

Why it is important to know if there is one or even several models to test is essential in order to determine how we split our available data. It seems quite intuitive to split data into a training portion and a test portion, so the model can be trained on the first and then tested with the testing data. It may be a good idea to split the data in a way so that the model can be trained on a larger portion in order to adapt to more possible data constellations. This is a great procedure for the case we are only looking at a single model.

Training a single model is quite straightforward. We split the data into two datasets:

1. Training data for the model fitting

2. Testing data for estimating the model’s accuracy

3. Now after sending the models to Test & Score along with Train and Test samples we observe their performance in the table inside the Test & Score widget. But before observing evaluation results we have to make a Test and Score widget to evaluate test samples by clicking the option Test on test data on the left panel of the widget as shown in the, Because there are other options available for evaluation such as cross-validation, Leave one out, and others. So while using test data we always test our model on test data.

Now, why do we need to separate train and test data?

The main reason is for evaluation purposes. Because overfitting is a common problem while training a model. When a model performs exceptionally well on the data we used to train it but fails to generalize well to new, previously unseen data points, this phenomenon happens.

So test data act as new, previously unseen data points and when the model evaluates on the basis of test data we come to know the actual accuracy of the model. Alternatively, when the model evaluates on the basis of train data it gives better accuracy compared to test data, the reason behind this is that model is already trained on the same features which we used for evaluation purposes. But such models are not generalized for real-world data they just overfit the training set.

So the effect of splitting data on the classification model is nothing but CA(Classification Accuracy). Here we can see that CA for Test on train data(left side)is greater but we know that is not considered as actual accuracy, we really want our model that can generalize to every test data.

What is its effect on model output/accuracy?

Cross-validation is a method of evaluating a machine learning model’s ability to predict fresh data. It can also be used to detect issues like overfitting or selection bias, as well as provide information on how the model will generalize to a different dataset. Here instead of a single holdout approach, it performs K times which provides better Actual accuracy of the model. So we can see Cross-validation accuracy is less but more accurate or generalise. We can analyze using a confusion matrix.

The purpose of cross-validation is to test the ability of a machine learning model to predict new data. It is also used to flag problems like overfitting or selection bias and gives insights on how the model will generalize to an independent dataset.

--

--