Overlapping  Blue and Red Squares, with Gray Square showing Classification, Made Simple

Classification, Made Simple

Taylor Lucero
6 min readNov 21, 2020

--

What is Machine Learning?

Machine learning, in essence, is a process designed to educate a machine model, approaching learning on a human level. Instead of our norm of learning, these models are developed from mathematical algorithms, data, domain knowledge, and intrinsic relations. In its infancy, the model must be guided with significant information aimed to push it towards highlighting patterns or making decisions through trial and error. The model is the student, and you are the teacher. Still, as much as the student learns from the teacher, the teacher will learn just as much.

Machine Learning Basics

In any beneficial teaching situation, the first step is to gather the necessary materials and utilize them in the best way the student will understand. This means gathering data to showcase the content of the features being analyzed. Then determining how much training and how much testing will be needed for the model to learn appropriately. The algorithm is then introduced with the training data set, where the model will begin practicing these identifying concepts or patterns. Algorithms each have their benefits but should be monitored to make sure learning is taking place. Overfitting and Underfitting represent two extremes that need to be observed. If the model is Overfitted, the Data has spent too much time learning the training data’s intricate particulars and won’t make accurate decisions. In simple terms, it has learned to “parrot” the answers associated with the target data instead of learning the relationships in the data. This issue is prevalent since it can provide correct classifications for the training set but fails when tested. On the other end of the spectrum, if the model receives too little information and is not developed enough, it will not make accurate estimates. Here generalization is the optimum, where the model learns the rules to apply the “learned concepts” liberally.

Supervised Learning

Supervised learning is named due to its use of labeled data provided to the model. Referring back to the student and teacher analogy, the labeled data would be provided with the data, like an answer sheet. The model learns which features are associated with the classifier this way. After the model is trained, the model then tries to classify the test data, which is then compared to its labels. Classification is one niche of supervised learning; it uses independent variables or features to estimate a classifier. Am I a dog or a cat? Am I Short, or am I Fat? Short, Fat, Dog and Cat are all classifiers because they categorize an object, entity, or instance. With the model learning to identify features and patterns, an advanced model will provide an appropriate classification of far more complicated information than we would be able to.

The Classification Breakdown

The exact steps of classification change depending on the data, algorithms, and parameters chosen, but there are a few generalized steps that most Classification models follow. The first step is always the Data Collection. The necessary information must be gathered towards the targeted feature and metrics through a method or database. To models, information gives the potential to bring insight to life but can be limited by the quality of the information gathered. The motto is “Garbage in, garbage out.”

Basic Steps in Classification: Data Gathering, Data Transformation, Model Training, Model Testing, Evaluation & Tuning.
Basic Steps of Classification

If the Data is already in its peak form, then there isn’t a need to perform any transformations to the set. The Optimum format for the Data depends on the quality and the intended use of the data. This could mean removing outliers, fixing errors, or even manipulating specific attributes’ structure to make it more understandable for the algorithm to read and analyze. For every issue, there is a likely transformation of best fit — techniques like Discretization, Normalization, Regularization, or Imputation. The third step is developing and training the model using an algorithm built upon a set of unique parameters to guide its training.

After the model is thoroughly trained, this model needs to be compared to a new set of data to see if it can provide accurate results. This would be the model’s testing phase, where it applies the learned information to a new set. With this step, we can see the accuracy of its training and identify issues that may not have been readily visible in the training phase. These issues could be from Overfitting and Underfitting to having insufficient data available for the model, but any of them could create incorrect estimations.

To fix these issues, we move into the fifth step, Evaluation, and Tuning. This step involves reducing any available errors and biases to an acceptable degree by fine-tuning the parameters relative to the model and algorithm used. However, don’t assume this is the last step; data science in of itself is an iterative and incremental process. To tune the model, one may need to return to any of the above steps.

Decision Tree Algorithm

Labeled tree model with binary splits with 7 nodes.
Decision Tree Visual

The Decision Tree Algorithm was derived from a simple idea, the expansion of branches of the trunk. Based on the name, it’s clear that the algorithm develops a tree-like model; however, in this case, the tree is inverted. The beginning is at its roots for any tree, and for this tree, it would be called the root node. The root node is the start of the model; it branches outwards to its internal nodes, which correlate to the probability of an event occurring. For instance, a coin flip of either heads or tails or the likelihood someone will buy a car, these branches can represent these events all to the internal nodes and the probability that a specific outcome may occur. A coin flip would split the tree into two possible branches, a single branch for each possible outcome, heads or tails, each with a 50% chance of occurring. These splits keep happening incrementally to the outer edges of the tree, the leaf nodes. These nodes are the final result the algorithm provides after the various probabilistic splits.

Classification Example: Classifying a Book

Process of logically classifying J.R.R Tolkien’s “ The Hobbit” into Fiction or Non-fiction based on features.
Classification Example

In this graphic, we estimate the literature classification of whether J.R.R. Tolkien’s “The Hobbit” is Fiction or Non-Fiction. Identifying features of what makes a fiction book is done by utilizing the “Learned” attributes provided by reading various types of literature. At this point, we’ve experienced two parts in the classification process, Data Gathering, and Model Training. Data Gathering in this instance was the act of reading many books throughout your life, while the Model Training would represent acting on reading knowledge. This could be due to favoring individual books over others or having no interest in reading historical books. After multiple trial and error events on other books, the reader would quickly determine the Classification of this book. The next step in the learning process would be Testing and Evaluation. Testing, in this case, would be considered the act of estimating books by their niches, followed by further refining this knowledge with the outcome of your prediction of their niche. Classification may sound daunting, but as shown, we frequently practice these concepts in the real world.

The Impact

With these concepts explained and simplified, it becomes easier to achieve a foothold in the realm of innate potential. Classification in machine learning is a powerful tool with a broad utility; its ability to learn can quickly surpass that of the developer. This predictive type of model can estimate probable loan defaulters to patients who are most likely to experience heart failure, and can even be applied to spearhead new theories in academia. With the learning prowess inherent in constructed models, machine learning becomes the backbone of modern revolutions.

--

--