As you might know right now I’m a student at MIT ReACT program. This week we began a Computer Science course and the first assignment was to come up with the idea of using graph data structure. I thought I would use a knowledge example of a real world example of graph data structure. Also, I thought I should create one which will represent what we are going to learn through the program and the opportunity to show off during the class is priceless.

Image for post
Image for post

Knowledge Graph

Previously I already wrote about graphs data structure so I am not going to repeat myself and go directly to the specifics of the graph with knowledge we will acquire during the MIT program. …


Last time we were talking about adding hidden layers to our neural network, and it did well solving binary classification tasks. But what if we have more entities in our ontology? Let’s figure out how to teach our neural net how to solve multiple entity classification problems!

Image for post
Image for post

Generating data

When it comes to the neural networks training dataset comes first! We will generate 3 segments of the dataset to demonstrate how to work with more than two classifications. Each segment will contain two dementia arrays of coordinates and we will specify the range of these points to group them together. Therefore each segment will be centered around 0:-3, 3,3 and -3,3 points. And each segment will correspond with one of the outputs. …


A look at hidden layers as we try to upgrade perceptrons to the multilayer neural network

Image for post
Image for post

In my first and second articles about neural networks, I was working with perceptrons, a single-layer neural network. And even though our AI was able to recognize simple patterns, it wasn’t possible to use it, for example, for object recognition on images. That’s why today we’ll talk about hidden layers and will try to upgrade perceptrons to the multilayer neural network.

Hidden Layers

Why do we need hidden layers? Perceptrons recognize simple patterns, and maybe if we add more learning iteration, they might learn how to recognize more complex patterns? Actually, no. …


Second generation and optimizing our neural network

graphic image of a neural network shaped like a brain
graphic image of a neural network shaped like a brain

In our previous article, we built from scratch a simple neural network that was able to learn and perform a very simple task. Today we will optimize our network, make it object-oriented, and introduce such concepts as learning rate and biases. And let’s add a fw simple but real-world cases so 0 and 1 turn into some sort of the story.

Prerequisite

The same as last time, we are going to need only one external library to perform computation, NumPY, and, of course, Python itself.

Inputs


Learning is a meta-skill which we all desperately need to survive in our rapidly changing singularitarian reality. It doesn’t matter what you are learning to play drums, writing poetry or computer science. It does all require industry cognitive effort. It’s very common to get lost during the learning process, feel depressed or even decide to give up. Digital distracting environment which is not helping us to focus on complex problems.

Image for post
Image for post

Good news everyone! Learning it is a skill and like any other skill we can train it and become a master of our learning process. …


Let’s teach AI to do something simple

stylized diagram of neural networks in the brain
stylized diagram of neural networks in the brain

I have been wanting to play with neural networks for a very long time and finally I found a window of opportunity to mess around with neural nets. It’s pretty far away from Skynet, and I don’t think that I fully grasped the math behind this, but let’s teach AI to do something simple first.

Theory Behind the Code

Neural networks are not a new concept. They were first introduced by Warren McCulloch and Walter Pitts in 1943.

We are going to build a single-layer neural net without hidden layers or a perceptron. It will consist of an input layer with training examples, synapses or weights, and neurons, and an output layer with correct answers. …


Why do I love computers? Because they are able and willing to do boring work for us. If we give them precise instructions of course. I believe that computers should be used to release people from repetitive non-creative/non-philosophical work. They can do it much better and people can focus on doing something more interesting.

Image for post
Image for post

Problem definition

One of my non-tech colleagues had a problem processing massive pdf documents (several thousands pages). They were very frustrated because they had to spend the whole day splitting several thousands pages into smaller docs of 20 pages. …


Last week we talked about creating basic applications with Django. Today let’s try to design a RESTful API with Django.

Image for post
Image for post

Prerequisites

Before we start let’s install additional libraries which will help us design API:

pip install djangorestframeworkpip install markdownpip install django-filter

Project Setup

Now let’s make sure that all moving parts of the REST framework libraries are in their places.

In the project folder we have file settings.py. In it there is an array INSTALLED_APPS. Add one more element, ‘rest_framework’, to this array. Also we need to add this dictionary to this file:

REST_FRAMEWORK = {‘DEFAULT_PAGINATION_CLASS’: ‘rest_framework.pagination.PageNumberPagination’,‘PAGE_SIZE’…


Finally we got to the awesome Python framework Django which allows you to use python for developing web applications.

Image for post
Image for post

Prerequisites

First ensure that you have python and pip installed. Then let’s install Django:

python -m pip install Django

And check if it’s installed and ready to use:

python -m django — version

If you can see a version of the Django library then you are ready to go.

Project Setup

Now, let’s create new Django project:

django-admin startproject myCoolProject

This command will create a myCoolProject directory in the directory you recently located. And inside it will create this files:


Performing operations in our Electron app

logo of Electron.js app
logo of Electron.js app

Last week I wrote an article about creating basic desktop applications with Electron. Today we will talk about performing CRUD operations in our application.

FYI, CRUD is an acronym for create, read, update, and delete operations.

While we don’t have a real API, we can use the JSONPlaceholder fake API. All requests that are going to be sent to this API will get a response as if we were working with a real database, but there are going to be no changes on JSONPlaceholder’s end.

Let’s get started with an HTML file:

About

Pavel Ilin

Software Engineer, AI researcher and Transhumanist.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store