The iris dataset is widely renown among machine learning enthusiasts. It contains three species of flowers (setosa, versicolor, virginica) with 4 relative attributes: petal length, petal width, sepal length, sepal width. What we’re going to do is try to predict the species of flower knowing its attributes. Today I’ve decided to show how to train […]
Category: Python
Python Sudoku Solver
Writing a sudoku solver is a great example to show how recursion works in Python. This particular technique is called ‘Backtracking’. Let’s see a possible implementation. How Sudoku Works There are 3 rules you have to follow when solving a sudoku: All the numbers in a row must be different; All the numbers in a […]
A Very Notorious Problem
One very famous programming challenge is: given a function which generates a random real number in the interval [0,1], calculate the value of pi. At first glance, it could seem that it could seem that the data and the request are completely different, but with a little math trick we can actually compute the value […]