A.I, Data and Software Engineering

Tagpython

Fast uniform negative sampling for rating matrix

petamind

Sometimes, we want to reduce the training time by using a subset of a very large dataset while the negative samples outnumbers the positive ones, e.g. word embedding. Another situation when we deal with implicit data. In this case, we may need to populate new data for negative values. This post demonstrates how to generate data for training using uniform negative sampling. The data Originally...

Generate data on the fly – Keras data generator

Previously, we train our model using the pre-generated dataset, for example, in the recommender system or recurrent neural network. In this article, we will demonstrate using a generator to produce data on the fly for training a model. Keras Data Generator with Sequence There are a couple of ways to create a data generator. However, Tensorflow Keras provides a base class to fit dataset as a...

One-hot encoding matrices demonstration

This post will demonstrate onehot encoding for a rating matrix, such as movie lens dataset. One-hot encoding Previously, we introduced a quick note for one-hot encoding. It is a representation of categorical variables as binary vectors. It is a group of bits among which the legal combinations of values are only those with a single high (1) bit and all the others low (0) Rating matrix If you are...

A really Cool data visualization: 3d globe in 2d space

While generating data in 3d space for manifold learning, I went across a problem of distributing points evenly on a sphere. It is a non-trivial problem but found a good enough solution for such placement. Interestingly, it ends up with a really cool animation effect when I decided to implement it on a mobile app. Figure 1: First animation effect: Rotation The algorithm There are two qualitatively...

Fun coding challenge: print the American flag

Printing is an important part when programming. Printing the US flag to the system console was a small part of “the shape game” for kids, in which the players will select the correct name for a given shape. The flag of the united states Basic Requirements: You are required to print the American flag to the console using just “*” and “=”. The number of stars...

A.I, Data and Software Engineering

PetaMinds focuses on developing the coolest topics in data science, A.I, and programming, and make them so digestible for everyone to learn and create amazing applications in a short time.

Categories