To evaluate the performance of a trained machine learning model, we would have to test it on a dataset that it hasn’t seen before. But sometimes there’s just not enough data that would make a sizeable chunk just for testing. A common practice to solve this problem is by holding off a part of theContinue reading “Resampling Methods: Splitting and k-Folds”

# Author Archives: SMMS

## Authorize access to AWS using boto3

Amazon Web Services provides a Python SDK called boto3 to programmatically perform actions to our AWS cloud resources such as EC2 instances and S3 buckets. This means that we can build an external front-end application that users interact with (instead of giving access to AWS), and then build the back-end integration with AWS using theContinue reading “Authorize access to AWS using boto3”

## Two ways to implement Binary Search in Python

Next to linear search, binary search is arguably the simplest to implement among the many search algorithms. Binary search can be summarized with the following rules: The list in which we are performing the search should be sorted beforehand. If the value being searched is less than the value in the middle of the list,Continue reading “Two ways to implement Binary Search in Python”

## What is the relationship between exponent and logarithm?

The exponent says how many times to multiply a number. Example: 25 = 32 The exponent here is 5. The logarithm says what exponent was used to multiply a number in order to get another number. Example: log2(32) = 5 5 is the exponent that was used to multiply 2 to get 32. Exponent andContinue reading “What is the relationship between exponent and logarithm?”

## What is a loss function?

A loss function is a function that calculates the difference between an estimate and the true value of some data. In machine learning, it is often called the “cost function” – a calculation of how far the prediction is from the expected value. The simplest loss function for a single sample is f(x) – y,Continue reading “What is a loss function?”

## Soft Intro to Logistic Regression

This post aims to dissect the steps in performing logistic regression on a single sample. This also covers some explanation on cross-entropy loss.

## Love your k Nearest Neighbors : The Basics

How does kNN work? How does it find nearest neighbors? How does it work in Python?

## Support Vector Machines for Classification

In this post, I’ll discuss what a hyperplane is, what SVM does, and the basics of how to get the optimal hyperplane in both linear and non-linear data.