Aditya Chatterjee's Blog, page 9

January 28, 2024

Why convexity is important in Machine Learning?

Table of ContentsKey-TakeawaysIntroductionMaking use of convexity in Machine Learning modelsWhy convexity is important in Machine LearningReal life ApplicationsQuizKey-takeaways

Convexity is important in ML because:

Optimization problems have a single global minimum.It ensures that any local minimum is also the global minimum.It often leads to more robust and stable optimization.Optimization algorithms will converge to the optimal solution.Convex functions are easier to analyze mat...
 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2024 04:10

BigInteger in Java

Table of ContentsWhy BigIntegerBigInteger MethodsBigInteger Key MethodsExample Question on BigInteger MethodsHow to convert BigInteger to int and vice versaSummaryWhy BigInteger

BigInteger is one of the useful classes found in java.math library. It is used to represent arbitrary precision integers. It comes in handy when we want to deal with digits that primitive integers can no longer handle, numbers whose capacity is way beyond 32 and 64 bits. BigIntegers allow us to work with virtual...

 •  0 comments  •  flag
Share on Twitter
Published on January 28, 2024 03:50

January 26, 2024

Minimum Absolute Difference Between Elements With Constraint

In this article at OpenGenus, we will solve the problem called Minimum Absolute Difference Between Elements With Constraint. The article will guide you through the intuition of how to solve the problem using the concept of Binary Search and Ordered Set which is frequently asked in coding interviews of various tech companies.

Table of contents:Problem StatementTwist in ProblemIntiution behind using Binary Search and Ordered SetImplementing the SolutionTime and Space Complexity1. Problem S...
 •  0 comments  •  flag
Share on Twitter
Published on January 26, 2024 03:36

Maximum Profit by Buying and Selling a Share at Most k Times

In this article at OpenGenus, we will solve the problem of getting maximum profit by buying and selling a share at most k times. The article will guide you through the intuition of how to solve the problem using the concept of backtracking and dynamic programming which is frequently asked in coding interviews of various tech companies.

Table of contents:Problem StatementIntuition behind using BacktrackingWhy need Dynamic Programming ?Implementing the SolutionTime and Space Complexity1. P...
 •  0 comments  •  flag
Share on Twitter
Published on January 26, 2024 03:34

Specificity in CSS [3 types]

Have you ever wondered why no matter what you do, the styles you define just dont seem to work!. Well, It could be that the style you are applying right now is not winning the battle with previous styles or styles from a library such as bootstrap. This OpenGenus article will explore how CSS specificity works and you will have an idea of how you can take control over your CSS styles.

Table of contents:

SpecificitySo how do we use css together with HTML!Inline vs Internal vs ExternalSelector S...
 •  0 comments  •  flag
Share on Twitter
Published on January 26, 2024 02:13

January 25, 2024

nth_element in C++ STL

nth_element is a function in the C++ Standard Template Library (STL) that allows you to partially sort a range of elements in a container, such that the element at the nth position is the one that would be at that position if the entire range was sorted. The elements before and after the nth position are not sorted.

Table of ContentsIntroductionSyntax & ParametersInternal Implementation in C++ STLTime ComplexitySpace ComplexityVariationsExamplesUse CasesConclusion1. Introduction

nth...

 •  0 comments  •  flag
Share on Twitter
Published on January 25, 2024 03:31

Open World RPG Game in Python

Table of contents:

IntroductionStep 1: Create Player ClassStep 2: Define Character TypesStep 3: Implement Player Creation and LoginStep 4: Implement Open World ExplorationStep 5: Testing our RPG GameConclusion

Reading time: 25 minutes

Introduction

In this OpenGenus article, we will cover the steps necessary for creating your very own open-world RPG game in Python programming language. An open-world RPG is a gaming genre that involves world exploration, character roles, combat, and an i...

 •  0 comments  •  flag
Share on Twitter
Published on January 25, 2024 03:26

January 15, 2024

Analog voice-based media storage for compressed data transfer of images post-encryption

Analog voice based media storage for compressed data transfer of images post encryptionTable of ContentsIntroductionWhy take the tedious process?Process summaryStep by step implementation with codeSummaryConclusionIntroduction

This OpenGenus article discusses the availability of analog voice-based media storage enables the encoding of digital image data into analog audio signals, offering an unconventional approach to data storage and transfer. It leverages traditional analog audio rec...

 •  0 comments  •  flag
Share on Twitter
Published on January 15, 2024 04:15

Strategy Design Pattern in Software Design [Java]

In the dynamic realm of software development, creating flexible and maintainable code is paramount. The ability to adapt to changing requirements, accommodate diverse functionalities, and simplify code maintenance are perpetual challenges faced by developers. One valuable tool in addressing these challenges is the Strategy Pattern.

Table of contents:

Understanding the Strategy PatternCore ComponentsReal World AnalogyDefine a family of algorithmsImplement concrete strategiesUse composition ...
 •  0 comments  •  flag
Share on Twitter
Published on January 15, 2024 04:12

January 1, 2024

Game Playing: Adversarial Search

What kind of games we would like to explore?Sequence of movesHas got some defined rulesRules also gives idea about reward for a moveNeed to maximize our reward

The goal of adversarial search is to create an intelligent agent that can make decisions to maximize its chances of winning the game. The agent needs to consider the possible moves of both players and anticipate the outcomes of these moves to make informed decisions.

Table of contents:

Two player GamesSome DefinitionsMini-max alg...
 •  0 comments  •  flag
Share on Twitter
Published on January 01, 2024 10:23