An end-to-end example of TensorFlow.js code flow for the data classification task. This app is built with React, but the same code can be reused with any JS toolkit/framework.

Author: Andrej Baranovskij

I thought it would be helpful to create a plain simple React application with a well-structured TensorFlow.js code logic for data classification. The main idea is that someone who would like to code logic and build a model with TensorFlow.js, should be able to copy-paste from my sample app easily. For this reason, I’m using a simple dataset, but the code structure contains all the logic to handle a complex dataset too.

The data I’m using is visualized in the picture below. There are 3 groups of data points — red, blue, and green. Data is two-dimensional. The model should…

Keras functional API provides an option to define Neural Network layers in a very flexible way. Developers have an option to create multiple outputs in a single model. This allows to minimize the number of models and improve code quality.

Author: Andrej Baranovskij

When implementing a slightly more complex use case with machine learning, very likely you may face the situation, when you would need multiple models for the same dataset. Take for example Boston housing dataset. This dataset comes with various features and there is one target attribute — Price. We would use a single output model to predict Price. However, if in addition, we would decide to predict Pupil-Teacher Ratio by Town, we would have two outputs. The simplest option would be to create two separate models based on the same dataset to predict two variables. This would be manageable, but…

In this post, I show handy Python libraries to extract and process such information as price, date, and IBAN. It is hard to process this kind of data, but with proper libraries is simple.

Author: Andrej Baranovskij

It may look like a simple task to parse dates, currencies, and IBAN’s. But think for a moment about all the different combinations, locales, and formats. Parsing USA or German format dates, extracting decimal values from prices in EUR, USD, or Rupees. A simple task at first can get really messy.

Luckily there are Python libraries that we can use, instead of coding all of the rules by ourselves.

This is a part of data preparation, essential for any Machine Learning application.

Date parsing

Recommended library — dateparser

In this example we parse the date in German format, we can…

End-to-end example to explain how to fine-tune the Hugging Face model with a custom dataset using TensorFlow and Keras. I show how to save/load the trained model and execute the predict function with tokenized input.

Author: Andrej Baranovskij

There are many articles about Hugging Face fine-tuning with your own dataset. Many of the articles are using PyTorch, some are with TensorFlow. I had a task to implement sentiment classification based on a custom complaints dataset. I decided to go with Hugging Face transformers, as results were not great with LSTM. Despite a large number of available articles, it took me significant time to bring all bits together and implement my own model with Hugging Face trained with TensorFlow. It seems like most, if not all, articles stop when training is explained. I thought it would be useful to…

This post is about detecting text sentiment in an unsupervised way, using Hugging Face zero-shot text classification model.

Photo by geralt on Pixabay

A few weeks ago I was implementing POC with one of the requirements to be able to detect text sentiment in an unsupervised way (without having training data in advance and building a model). More specifically it was about data extraction. Based on some predefined topics, my task was to automate information extraction from text data. While doing research and checking for the best ways to solve this problem, I found out that Hugging Face NLP supports zero-shot text classification.

What is zero-shot text classification? Check this post — Zero-Shot Learning in Modern NLP. There is a live demo from…

This post is about how I passed TensorFlow Developer Certificate exam. Also, it is about my journey to Machine Learning and my views about software development powered by Machine Learning.

Author: Andrej Baranovskij

About me

I’m an enterprise software developer, who is jumping onto the Machine Learning train. For the past 15 years, I was doing independent Oracle consulting, mainly related to Oracle Developer tools and Java. I love to share my knowledge with the community, I posted 1030 blog entries with sample code from 2006 till 2020, most of them were Oracle technology related. My blog is well known in the Oracle community, I’m Oracle Groundbreaker Ambassador and conference speaker (I was presenting every year from 2007 till 2018 at Oracle Open World and Oracle Code One conferences in San Francisco). When I was…

Anomaly detection with autoencoders for fraudulent health insurance claims.

Photo by geralt on Pixabay

This post is about unsupervised learning and about my research related to the topic of fraudulent claims detection in health insurance.

There are several challenges related to fraudulent claims detection in health insurance. First, of them — there is no public data related to health insurance claims fraud, this is related to the data privacy issues. Second, it is very hard to identify a set of rules, which would help to identify fraudulent claims. This means a supervised machine learning approach with labeled data would hardly work for our case. Unsupervised machine learning seems like it will be a better…

Bringing together all essential parts to build a simple, but powerful Machine Learning pipeline. This will cover Keras/TensorFlow model training, testing, auto re-training, and REST API

Photo by Alexei_other on Pixabay

In this article, I’m going to cover multiple topics and explain how to build Machine Learning pipeline. What is ML pipeline? This is a solution that helps to re-train ML model automatically and make it available through API. Re-training intervals can be configured through a scheduler, the model can be updated daily or at any other selected intervals.

The brief architecture of the solution:

Improved forecast approach to model coronavirus growth and stabilization. We are using Hill equation and backtesting to improve forecast calculation and give more tools to evaluate COVID-19 per country

Source: Pixabay

This is an update for my original post — COVID-19 Growth Modeling and Forecasting with Prophet. The update covers new features implemented in the new version of the online app —

New features:

  • Hill equation support for COVID-19 growth modeling. This equation provides good results for coronavirus forecast
  • Backtesting support for Logistic and Hill equations, by calculating forecast from five days in the past

Hill equation defined in Python:

# Hill sigmoidal function
def func_hill(t, a, b, c):
return a * np.power(t, b) / (np.power(c, b) + np.power(t, b))

Forecast with Hill equation is calculated in construct_hill_growth function from…

Based on all countries COVID-19 data fetched through REST, we model virus growth with logistic function and run forecast with Prophet library in Python

Source: Pixabay

Web UI is available here

COVID-19 is a hot topic these days. Healthcare workers are the first line of defense. If you are in IT you are part of the fight against the virus. I thought I should do my part and implement a method to forecast coronavirus growth and dates when the number of infections could stabilize. Forecasting new cases growth could be useful in several ways:

  • People would be able to understand, at least roughly when all this would end. This helps to keep the spirit and motivation
  • Healthcare workers could estimate medical equipment, hospital beds…

Andrej Baranovskij

TensorFlow Certified Developer | Machine Learning Expert | Oracle Wizard | Founder

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