How to Get the Current Value of a Variable in TensorFlow?

Problem Formulation Given a TensorFlow variable created with tf.Variable(). As this variable may have changed during the training process (e.g., using assign()), you want to get the current value of it. How to accomplish this in TensorFlow? Sessions Are Gone in TensorFlow 2 In TensorFlow 1, computations were performed within Sessions. That’s why many people … Read more

Sklearn fit() vs transform() vs fit_transform() – What’s the Difference?

Scikit-learn has a library of transformers to preprocess a data set. These transformers clean, generate, reduce or expand the feature representation of the data set. These transformers provide the fit(), transform() and fit_transform() methods. The fit() method identifies and learns the model parameters from a training data set. For example, standard deviation and mean for … Read more

How To Plot SKLearn Confusion Matrix With Labels?

Summary: The best way to plot a Confusion Matrix with labels, is to use the ConfusionMatrixDisplay object from the sklearn.metrics module. Another simple and elegant way is to use the seaborn.heatmap() function. Note: All the solutions provided below have been verified using Python 3.9.0b5. Problem Formulation Imagine the following lists of Actual and Predicted values … Read more

How to Convert a Tensor to a NumPy Array in TensorFlow?

There are two ways to convert a Tensor to a NumPy array: TensorFlow version 2.x — use tensor.numpy() TensorFlow version 1.x — use tensor.eval(session=tf.compat.v1.Session()) Let’s dive into these two methods in greater detail. Method 1: Explicit Tensor to NumPy Array Conversion in TensorFlow 2.x To convert a tensor t to a NumPy array in TensorFlow … Read more

[FANG KILLER ICP] Will the Internet Computer Disrupt Big Tech?

What is the Internet Computer? The Internet Computer is blockchain technology and computing infrastructure initiated by the non-profit organization DFinity. Like the public Internet, the Internet Computer is a distributed computing platform consisting of thousands of connected and decentralized servers that host backend software. This idea mitigates the increasing monopolization of Internet services and enables … Read more

16 PDF Cheat Sheets for Programmers

A couple of years ago, I fell into the habit of creating cheat sheets when exploring certain areas in the programming space. Over time, hundreds of thousands of Finxters have downloaded and used them in their own learning journeys. However, the cheat sheets are largely scattered around many different locations on the Finxter ecosystem. And … Read more

Top 37 Python Machine Learning Library Cheat Sheets

This article is a collection of useful machine learning cheat sheets focusing on the Python libraries such as Theano, Keras, TensorFlow, PyTorch, NetworkX, and other ML-related Python libraries. You may want to check out these great resources that cover many of these topics at once: https://becominghuman.ai/cheat-sheets-for-ai-neural-networks-machine-learning-deep-learning-big-data-science-pdf-f22dc900d2d7 https://gto76.github.io/python-cheatsheet/ https://www.pythonsheets.com/ Theano Cheat Sheets Theano is a Library … Read more

Python Linear Regression with sklearn – A Helpful Illustrated Guide

Machine Learning Linear Regression Python

? This tutorial will show you the most simple and straightforward way to implement linear regression in Python—by using scikit-learn’s linear regression functionality. I have written this tutorial as part of my book Python One-Liners where I present how expert coders accomplish a lot in a little bit of code. Feel free to bookmark and download … Read more

Akkio – How to Add Machine Learning to Your Python Project in 30 Lines

AI is hard! Transforming tensors, cleaning data, building complicated networks- these are all specialized skills that can take months or even years to learn. But the times are a-changin’. Businesses understand that adopting state-of-the-art AI is no longer a choice.  Of course, those burdened with actually implementing that AI are the software devs. High-level talk … Read more

Striving for Collective Intelligence

The idea I’m going to tell you is well-researched but little-known. And it’s meta. Thinking about it has become my main passion, life mission, and purpose. It’s how I see the world. In short: what drives me is increasing collective intelligence. Collective Intelligence is Everywhere You are not one individual but many individual cells that are … Read more