# Categorydata science

## Number of Islands solution In this post, we have a look at using a queue and breath-first search algorithm to solve a Leetcode challenge. The problem is stated as follows. Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges...

## SAMPLING Bagging vs Pasting

One way to get a diverse set of classifiers is to use very different training algorithms,as just discussed. Another approach is to use the same training algorithm for everypredictor but to train them on different random subsets of the training set. Whensampling is performed with replacement, this method is called bagging(short for bootstrap aggregating). When sampling is performed without...

## squared hinge loss The squared hinge loss is a loss function used for “maximum margin” binary classification problems. Mathematically it is defined as: where ŷ the predicted value and y is either 1 or -1. Thus, the squared hinge loss is: 0* when the true and predicted labels are the same and* when ŷ≥ 1 (which is an indication that the classifier is sure that it’s the correct label)quadratically increasing with the...

## Dealing with missing data In real-world data, there are some instances where a particular element is absent because of various reasons, such as corrupt data, failure to load the information, or incomplete extraction. Handling the missing values is one of the greatest challenges faced by analysts because making the right decision on how to handle it generates robust data models. Let us look at different ways of imputing...

## WHAT IS P-VALUE? In statistics, the p-value is the probability of obtaining results at least as extreme as the observed results of a statistical hypothesis test, assuming that the null hypothesis is correct. The p-value is used as an alternative to rejection points of significance at which the null hypothesis would be rejected. A smaller p-value means that there is stronger evidence in favor of the alternative...

PetaMinds focuses on developing the coolest topics in data science, A.I, and programming, and make them so digestible for everyone to learn and create amazing applications in a short time.