Big companies such as Netflix, Amazon, and Google use complex recommendation systems. This helps them to sell more products and to keep customers engaged.
In this article, I will show you that recommendation systems don’t have to be complicated. I will show this using Python, Pandas, and functions from the SciKit learn library.
I will use Python 3.8 with data from the MovieLens database. The source code is available on Github.
To show recommendations, I will use the MovieLens data set from GroupLens Research. Instead of the full data set, I will use a subset. This subset contains 100,000 ratings, 3,600 tags applied to 9,000 movies by 600 users. …
While I study deep learning, I like to practice the theory by entering Kaggle competitions. Previously, I created a Convolutional Neural Network with TensorFlow to join the Cats vs. Dogs competition on Kaggle. This Convolutional Neural Network got me to place 833 on the Kaggle public leaderboard.
The accuracy of the CNN was around 90%. I want to try to improve the accuracy of my model and rise on the Kaggle leaderboard. I will use Transfer Learning to enhance my model. Transfer Learning is a technique where you reuse a model that someone else trained as your model’s starting point. …
I work as a software developer for a company that develops climate control systems for greenhouses. These climate control systems control various aspects of a greenhouse to create an optimal climate for growing crops. We connect the system to several sensors, and the system sends the measurements of these sensors to a central location in the cloud.
The grower, our customer, can access these measurements through various dashboards that include graphs and reports. Last week, we received a customer call through the helpdesk that he did not see any new measurements come in. …
I like to use practical examples and projects to help me memorize the theory during my study of Deep Neural Networks. An excellent resource for finding these practical projects is Kaggle. Kaggle is an online community of data scientists and machine learning practitioners.
Kaggle allows you to search and publish data sets, explore, and build models. You can perform these functions in a web-based environment. Kaggle also offers machine learning competitions with actual problems and provides prizes to the winners.
I am currently studying Deep Learning with TensorFlow. One of the subjects I want to learn is image recognition. This article describes my attempt to solve a former Kaggle competition from 2013, called “Dogs vs. Cats.” For implementing the solution I used Python 3.8 …
This article describes my attempt at the Titanic Machine Learning competition on Kaggle. I have been trying to study Machine Learning but never got as far as being able to solve real-world problems. But after I read two newly released books about practical AI, I was confident enough to enter the Titanic competition.
The first part of the article describes preparing the data. The second part shows how I used a Support Vector Machine (SVM). I used the SVM to create a model that predicts the survival of the passengers of the Titanic.
The model resulted in a score of 0.779907, which got me in the top 28% of the competition. I am very happy with the result. You can find a Jupiter notebook with the solution and documentation in Github. …
A week ago, I saw a tweet from Ashley Willis (@ashleymcnamara) in which she asked, “What’s the best tech talk you’ve ever seen?”. The response was overwhelming. Make sure to check out the answers for some of the most excellent tech talks.
Since then, I have been watching some of the recommended talks. The first I saw was “Discovering Python” by David Beazley. An exceptional talk in which he uses Python to support a Patent litigation lawsuit.
As I searched for more talks by David Beazley, I found “Builtin Superheroes.” In this presentation, he used standard Python data types to analyze food inspections. …
Python offers three types of comprehensions to create basic collection data types conveniently in Python with better readability.
I will explain each type of comprehension using examples.
List Comprehensions are a different way of rapidly creating a list with Python. If you find yourself using a for loop along with .append()
to create a list, List Comprehensions are an excellent alternative.
List Comprehensions have the following signature.
[expr for val in collection if condition]
You can use List Comprehensions for the following:
I will explain the possibilities of List Comprehensions using four different examples. Each example shows how to implement the functionality with and without List Comprehensions. …
Almost twenty years ago, I started as a developer in a company that used code reviews. At that time, I had never done a code review nor was my code ever reviewed.
For my first project, I had to create a COM component in C++ using the ATL framework. ATL uses reference counting to manage the lifetime of an object. Reference counting means that you have to call Release()
when you are done using the object. If you forget to call it, it results in a memory leak.
I remember the result of my first code review as if it was yesterday. …
When during the execution of a program, Python encounters an error, it stops. This can be caused by two types of errors, syntax errors, or exceptions. In this article, we will discuss the second, exceptions, and show how to handle, catch, and raise them.
Exceptions are errors that Python reports when syntactically correct code executes, and an exceptional situation occurs. For example, look at the following code.
This program tries to divide the number ten by zero, which is something that is not possible in Python.
When you execute this program, Python raises a ZeroDivisionError and terminates the application. …
The standard library with each Python installation contains a logging module that provides a flexible framework for logging messages. Most Python applications and libraries use this module.
There are four types of classes used when logging.
To create a logger in your application or library, you can call logging.getLogger("app")
. The argument "app"
is the name that you choose for this logger. You can use the name of a logger to form a hierarchy by using dots in the name like 'app.module.function'
. A Filter can use this hierarchy to only view messages from a specific function or module. …
About