#MachineLearning #OptimizationTechniques #OpenAI #GeneticAlgorithm

Genetic Algorithm: Part 4 - CartPole-v0

So far, we have learned the basics of Genetic Algorithm(GA) and solved a classical problem using GA. GA can be applied to a variety of real world problems. So, today we will use Open AI Gym environment to simulate a simple game known as CartPole-v0 and then we will use GA to automate the playing of the game. Sounds fun….. So, lets jump right into it. Problem Statement A pole is standing upright on the cart. ...

#machinelearning #naturallanguageprocessing #nlp #contextfreegrammar

Preprocessing Text Data for Machine Learning: Part 1

Introduction In the previous article we discussed various methods to perform Semantic Slot Filling, a very common problem in the field of Natural Language Processing. We discussed various mathods for tackling such problems such as Rule Based Approaches and Machine Learning Approaches(including Deep Learning) and also discussed pros and cons of each method. Since Natural Language is a highly unstructured form of data, it needs to be preprocessed a lot to remove dialect-based or idiomatic inconsistancies to attain a state of uniformity and then converted to a mathematical form that can be then used to feed to a Machine Learning Models. ...

#Machine Learning #Knapsack Problem #Optimization Techniques #Genetic Algorithms #geneticalgorithm

Genetic Algorithm: Part 3 - Knapsack Problem

Previously, we discussed about Genetic Algorithm(GA) and its working and also saw its simple implementation. This time we will solve a classical problem using GA. The problem we will be solving is Knapsack Problem. Problem Statement A thief enters a shop carrying knapsack(bag) which can carry 35 kgs of weight. The shop has 10 items, each with a specific weight and price. Now, the thief’s dilemma is to make such a selection of items that it maximizes the value(i. ...

#MachineLearning #GeneticAlgorithmImplementation #OptimizationTechniques #geneticalgorithm

Genetic Algorithm: Part 2 - Implementation

In Part 1 of Genetic Algorithm, we discussed about Genetic Algorithm and its workflow. Now its time for its implementation. Lets consider an equation: Y = w1x1 + w2x2 + w3x3 + w4x4 +w5x5 +w6x6 Given the inputs (x1, x2, x3, x4, x5, x6)=(4, 10, -8, 0, 5, -3) we have to find the weights w1, w2, w3, w4, w5, w6 such that it maximizes the output equation. So, we will use GA to find the weights. ...

#MachineLearning #OptimizationTechniques #GeneticAlgorithm

Genetic Algorithm: Part 1 - Intiution

Why do we need Genetic Algorithm? Suppose, we are solving a regression problem in which we have to fit a line across a set of data points having a convex error function. For such problems techniques like Normal Equation and Gradient Descent can easily be used. But what if our function is non-convex? In the above figure, if we use the Gradient Descent then we might only be limited to a certain search space as we will be stuck to a local optima. ...

#machinelearning #naturallanguageprocessing #nlp #contextfreegrammar

Semantic Slot Filling: Part 1

Semantic Slot Filling: Part 1 One way of making sense of a piece of text is to tag the words or tokens which carry meaning to the sentences. In the field of Natural Language Processing, this problem is known as Semantic Slot Filling. There are three main approaches to solve this problem: Rule Based Approaches Machine Learning Approaches Deep Learning Approaches Let us consider the following query text: ...