PyTorch: dividing dataset, transformations, training on GPU and metric visualization

In machine learning designing the structure of the model and training the neural network are relatively small elements of a longer chain of activities. We usually start with understanding business requirements, collecting and curating data, dividing it into training, validation and test subsets, and finally serving data to the model. Along the way, there are …

Read more

Data preparation with Dataset and DataLoader in Pytorch

Preparing your data for machine learning is not a task that most AI professionals miss. Data are of different quality, most often they require very thorough analysis, sometimes manual review, and certainly selection and initial preprocessing. In the case of classification tasks, the division of a dataset into classes may be inappropriate or insufficiently balanced. …

Read more

k-nearest neighbors for handwriting recognition

If I had to indicate one algorithm in machine learning that is both very simple and highly effective, then my choice would be the k-nearest neighbors (KNN). What’s more, it’s not only simple and efficient, but it works well in surprisingly many areas of application. In this post I decided to check its effectiveness in …

Read more

Anaconda cron on Amazon Linux

If you are a Python programmer and use the AWS and Anaconda environments, sooner or later you will come across the need to run a Python script as a cron process on Amazon Linux in the Anaconda environment. This shouldn’t be difficult, right? Hmmm, unfortunately it is. Because I spent some time configuring the cron …

Read more

Convolutional neural network

Convolutional neural network 1: convolutions

Deep neural networks are widely used in image and shape recognition. Examples of applications include face recognition, image analysis in medicine, handwriting classification, and detection of surrounding objects. A special type of neural network that handles image processing extremely well is a convolutional neural network. I have to admit that ConvNet is my favorite deep …

Read more

Development environment for machine learning

Development environment for machine learning

One of the first problems faced by AI students is how to build a development environment for machine learning. This is an ungrateful issue because there are many methods and tools available and sometimes you simply don’t know which to choose and where to start. Added to this are the issues of choosing libraries for …

Read more

Logistic Regression for binary classification

Logistic regression and Keras for classification

Today I would like to present an example of using logistic regression and Keras for the binary classification. I know that this previous sentence does not sound very encouraging 😉 , so maybe let’s start from the basics. We divide machine learning into supervised and unsupervised (and reinforced learning, but let’s skip this now). Supervised …

Read more

Handwriting digit recognition Keras MNIST

Handwritten Digit Recognition with Keras

Shape recognition, and handwritten digit recognition in particular, is one of the most graceful topics for anyone starting to learn AI. There are several reasons, but the two most important are the ease with which we can use well-prepared ready-made datasets and the ability to visualize these data. From this tutorial you will learn: Okay, …

Read more