Intermediate

Bayesian Linear Regression

Download this notebook This notebook shows the advantage of Bayesian Linear Regression vs. regular Least-Squares-Estimation-based Linear Regression with respect to outliers. The Bayesian part of the approach shown here is that the error’s/noise’s standard deviation $\sigma$ is now not necessarily constant, but a random variable, too, bounded by a lower bound $\sigma_0$ and an upper bound $\infty$. Standard Linear Regression Assumption: f(x) = a + bx with measurement $y_i = f(x_i) + \epsilon_i$ with $\epsilon_i \sim \mathcal{N}\left(0,\sigma_0^2\right)$.

Deep Q Learning with Pytorch

Download this notebook Author: Oliver Mai As presented in this YouTube video by Phil Tabor Gym Environment: LunarLander-v2 This environment is inspired by a subfield of Optimal Control: rocket trajectory optimization. Sadly the documentation is a bit lacking, but we will briefly talk about features of this environment. In “LunarLander-v2” the agent (or human player) controls a spacecraft, which is supposed to be landed on a planetary surface. The lander can only be moved in a 2D plane (Note: This environment requires the 2D physics engine “Box2d”, which can be installed by pip install -e '.

Pandas: Dos and Don'ts

Download this notebook This notebook will show you some examples of pandas code. Often, new and experienced users of this library will write unnecessarily complicated or slow code when pandas has a built-in functionality to do the same task for you. This notebook is supposed to make you aware of some of the functionalities that pandas has to offer. import pandas as pd import numpy as np import datetime Create some Data We create sample DataFrames with the champions in German men’s and women’s football from 2007 to 2014 and their average points per match.

Timeseries anomaly detection using an Autoencoder

Download this notebook Based on this tutorial by pavithrasv This notebook demonstrates how you can use a reconstruction convolutional autoencoder model to detect anomalies in timeseries data. First we import tensorflow and other relevant packages. import numpy as np import pandas as pd from tensorflow import keras from tensorflow.keras import layers from matplotlib import pyplot as plt 2022-09-28 12:22:09.199724: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.