Lesson 4 あながち~ない

Anagachi ~ nai あながち~ない str.<w>

A structure that indicates that s.t. Is not necessarily the way the speaker/writer thought

(not) necessarily; (not) always

[REL. kanarazushimo ~ nai]


In a regression problem, the aim is to predict the output of a continuous value.

Let’s recap Regression/Ordinary Least Squares

The Ordinary Least Squares is the much-referred technique in machine learning called Linear regression.

The linear equation is simply

y = x    or  y = mx + c

In simple terms, linear regression tries to draw the line along with data so as it is closest to most of the data points and is a representation of the data if the data has to expressed as a line.

Linear regression fits a linear model with coefficients w=(w1,…, wp) to minimize…


TensorFlow Hub is a repository for machine learning models.

From image classification, text embeddings, audio, and video action recognition, TensorFlow Hub is a space where you can browse trained models and datasets from across the TensorFlow ecosystem. Use it to:


Let’s build the simplest form of a neural network multiclass classification model to train a multiclass classifier to predict the tag of a programming question on Stack Overflow.

Stack Overflow is a Q&A for professional and enthusiast programmers. This post uses the data dump of the questions from StackOverflow. In this guide we will use programming questions like (“How do I sort a dictionary by value?”) each labeled with exactly one category (Python, CSharp, JavaScript, or Java).

The neural network will be modeled to perform multiclass classification for the questions.


Let’s build the simplest form of a neural network classification model to classify images of clothing, like sneakers and shirts

MNIST is the most common “hello world” dataset in image classification. Fashion MNIST is a very similar dataset in the same category containing images of clothing. Let’s use Fashion MNIST in this post as it is a slightly more challenging problem than regular MNIST.


The bond market is a safe, reliable investment for some or a dull market for others, yet not to argue is the one that makes up to headlines in any significant economic development. The bond market though indecipherable yet is packed with important indicators about the economy. This very bond market and its yield curve are also debatably are a simple model to forecast a recession. It is debatable as it is non-trivial to ignore the yield curve as it stores predictive records due to shifts in the economic landscape.

The yield curve is originally called the “fear gauge” by…


Data is chaos and perhaps in this chaos you would find the most wonderful patterns — venali sonone

A guide to optimization problems with Google OR-Tools for Python

人間には『善の心』ともう1つの『悪の心』が存在しているんです!
“Every human being has a “good heart” and another “evil heart”!
Optimization of both is required to excel, it is a non-trivial quest.”

Topics Covered

  1. Optimization problem, what is it?
  2. Guide to Linear Optimization — Solver glop and Simplex algorithm
  3. Guide to Linear Optimization — Guide to Linear Optimization -
  4. Guide to Integer Optimization — MIP Solver
  5. Guide to Integer Optimization — Solving a MIP Problem
  6. Guide to Integer Optimization — Using Arrays to Define a Model
  7. Constraint Optimization — CP-SAT Solver
  8. Constraint Optimization — Using a CP-SAT Problem
  9. Constraint Optimization — Solving a CP-SAT Problem
  10. Constraint Optimization — Cryptarithmetic Puzzles


Data is chaos and perhaps in this chaos you would find the most wonderful patterns — venali sonone

In the complete guide to NLP with fastai

Follow the link to the entire series by clicking here: The complete guide to NLP with fastai

See also The Annotated Transformer from Harvard NLP.

Attention and the Transformer

Nvidia AI researcher Chip Huyen wrote a great post Top 8 trends from ICLR 2019 in which one of the trends is that RNN is losing its luster with researchers.

There’s a good reason for this, RNNs can be a pain: parallelization can be tricky and they can be difficult to debug. …


Data is chaos and perhaps in this chaos you would find the most wonderful patterns — venali sonone

Part 4: Bidirectional and Attention RNN

In the complete guide to NLP with fastai

Follow the link to the entire series by clicking here: The complete guide to NLP with fastai

This post will put everything we learned until this point together and then introduce attention in translation with an RNN

This is exciting because the performance over our this journey of learning NLP can be summarized as below:


Data is chaos and perhaps in this chaos you would find the most wonderful patterns — venali sonone

Part 3: Teacher Forcing

In the complete guide to NLP with fastai

Follow the link to the entire series by clicking here: The complete guide to NLP with fastai

This will be a long post where we will build Rnn and explain the coded Rnn. Next using our Rnn we will introduce the new concept of Teacher Forcing and why one may use it.

So let’s get started….

Predicting the English word version of numbers using an RNN

We were using RNNs as part of our language model in the previous lesson. Today, we will dive into more details of what RNNs are and how they work. We will do this using the problem of trying to predict the English word version of numbers.

Let’s predict what should come next in this sequence:

eight thousand one , eight thousand two , eight thousand three , eight thousand four , eight thousand five , eight thousand six …

Venali Sonone

Data Scientist by profession and just lazy by nature.

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