Artificial thoughts
RSS Feed“The first duty in life is to be as artificial as possible. What the second duty is no one has as yet discovered.” Oscar Wilde
Notes on machine learning, reinforcement learning, time series and dashboards, with the code.
Recent Posts
New technology stack for financial-timeseries-dashboard
The financial timeseries dashboard rebuilt with Kedro for the data pipelines, Poetry for the packages and FastAPI for the rest api.
New version of Covid19 dashboard
A makeover of the Covid19 dashboard: 7-day incidence per population, a 7d/28d trend indicator, and a streamlit frontend on a rest api.
Financial Timeseries Dashboard
A dashboard for the price histories of DAX stocks, built with docker, streamlit, d6tflow and a swagger-documented rest api.
Transformer model Fine-tuning for text classification with Pytorch Lightning
Fine-tuning DistilBERT to predict the star rating of Google Play app reviews, with pytorch lightning, huggingface transformers and Google Colab.
Corona dashboard
A Corona dashboard from March 2020, and the puzzle it showed: Italy's death rate was about 30 times Germany's.
Audio compression via images
In this post we will use an image compression technique to compress audio signals. We start with a few highlights, screenshots and audio snippets.
Matrix operations with pytorch - optimizer - addendum
Singular value decomposition by gradient descent again, now with pytorch's own SGD and Adam optimisers. Adam does better.
Matrix operations with pytorch - optimizer - part 3
Part 3 of 3: singular value decomposition (SVD) of a matrix, calculated by gradient descent with a pytorch optimizer.
Matrix operations with pytorch - optimizer - part 2
Part 2 of 3: the inverse of a matrix, calculated by gradient descent with a pytorch optimizer.
Matrix operations with pytorch - optimizer - part 1
Part 1 of 3, pytorch - playing with tensors: basic tensor operations, and derivatives calculated by automatic differentiation.
Comparison of a very simple regression in pytorch vs tensorflow and keras
The very simple regression from the TensorFlow and Keras post again, this time in pytorch: a straight line fitted by gradient descent, as a notebook.
Colab, MLflow and papermill
Machine learning with the maximum of free GPU currently available plus the ability to keep a neat log of your data science experiments. Interested? My article…
Loss surface with multiple valleys
A loss surface with many minima, built from a bundle of intersecting straight lines, and how a gradient-based optimiser gets derailed on it.
Comparison of a very simple regression in tensorflow and keras
In this short post we perform a comparative analysis of a very simple regression problem in tensorflow and keras.
Dash simple deployment with docker
The previous post was already about dash. So why return to the subject? In some ways I got carried away by the possibilities of dash. I therefore included some…
Dash for timeseries
Dash is an amazing dasboarding framework. If you're looking for an easy-to- setup dashboarding framework that is able to produce amazing plots that wow your…
Knime - Multivariate time series
The three time series forecasting posts as one Knime workflow, with Python nodes as reusable building blocks that pass whole objects between them.
Multivariate Time Series Forcasting with Neural Networks (2) - univariate signal noise mixtures
In this follow up post we apply the same methods we developed previously to a different dataset.
Multivariate Time Series Forecasting with Neural Networks (3) - multivariate signal noise mixtures
In this follow up post we apply the same methods we developed previously to a different dataset. In this third post we mix the previous two datasets.
Multivariate Time Series Forecasting with Neural Networks (1)
In this post we present the results of a competition between various forecasting techniques applied to multivariate time series. The forecasting techniques we…
Game of Nim, Reinforcement Learning
In this post we report success in using reinforcement to learn the game of nim. We had previously cited two theses (ERIK JÄRLEBERG (2011) and PAUL GRAHAM &…
Game of Nim, Supervised Learning
There are entire theses devoted to reinforcement learning of the game of nim, in particular those of ERIK JÄRLEBERG (2011) and PAUL GRAHAM & WILLIAM LORD…
Perfect Play in the game of nim
This post reports on the creation of a python package for the game of nim. The package contains a function that finds the perfect move in a given position and…
R shiny custom docker server with caching
So now we're ready to deploy our own custom R Shiny server with caching.
R-caching (and scheduling)
This is in preparation for running a custom Shiny server. We want to accelerate the server by using caching. In the this post we take a look at a candidate…
R caching with financial data
In the previous post we looked at a simple data caching example which we used to explore the workings of the R-package DataCache.
Game of Nim
This post starts a mini series of two posts in which we want to solve the Game of Nim using Reinforcement learning. The first part of this mini series is…
R shiny stock analysis
An R Shiny app that compares a DAX stock with the DAX index, hosted on shinyapps.io, and a walk through its ui.R and server.R.
Show R shiny app in Wordpress
Embedding an R Shiny app in a blog post with an iframe, tried on someone else's app first.
Windy Walk (part 2) - addendum
How the gym_drifty_walk package is built: the basic package structure, and the names that have to match for OpenAI gym to find the environment.
Windy Walk (part 2)
Recap: Previously we constructed a very simple class to emulate the type of environment which is provided by OpenAI. Then we simulated two windy walks and used…
Windy Walk
A random walk with wind: an environment that reacts to our action plus a random part, as a simple Python class without OpenAI.
Introduction and Hello!
So time to start a new blog! Devoted to python, R and artificial intelligence.
Simple Sin Function
A sine curve from a Jupyter notebook, as a test that code highlighting and plots work in the blog.