© 2023 Hashnode

#mathematics

Problem: Given an integer, find the number of digits in it. Example: Input: 1234Output: 4Input: -789435Output: 6 Approach 1) Iterative Every time we divide a number by 10, the number of digits reduces by 1. So, we can count it until the num…

INTRODUCTION Welcome to our blog on optimizing performance in logistic regression through the power of gradient descent! In this article, we dive into the inner workings of the cost function and its relationship with the popular optimizatio…

Prerequisite: To understand the bitwise operators and use them like a pro, It is expedient to have prior knowledge of Binary Numbers, decimal-to-binary conversions, comparison, and logical and Mathema…

Conditional probability is a concept that helps us to understand how the likelihood of an event changes when we have some information about another related event. For example, suppose you want to know the probability of getting a head when …

INTRODUCTION Welcome to our blog post, where we embark on a journey to understand how the cost function in linear regression works. In this article, we will dive into the fascinating world of optimization and global minima, using a concrete…

INTRODUCTION In the realm of data analysis and machine learning, finding patterns and uncovering relationships between variables is of utmost importance. While linear regression serves as a fundamental tool for modeling such relationships, …

Problem statement You are given an integer array nums of length n where nums is a permutation of the numbers in the range [0, n - 1]. You should build a set s[k] = {nums[k], nums[nums[k]], nums[nums[n…

I've been calculating square roots of numbers for a long time now, but recently I came to know about a new method, and to my surprise, it was the fastest way to calculate the root of any number. This …

This is the first in a series of articles about the relationship between pure mathematics and data science. In this series, I want to show the common concepts, principles, and applications that make t…

INTRODUCTION Logistic regression, similar to linear regression, is a powerful statistical technique used for modeling the relationship between a dependent variable and independent variables. However, while linear regression is primarily use…