Intro¶
Cluster analysis is the method in data analysis that is used to classify data points. Clustering pick out pattern in unlabeled data and group items in meaningful way. As a programmer you have to write scripts that learns the inherent structure of the data with no labeled examples provided (unsupervised learning). The program under the hood analyzes the data it encounters and tries to identify patterns and group the data on output.
read morePerlin Noise
Perlin Noise Algoritm¶
Ken Perlin is the creator of perlin noise algoritm used in generating textures and terrain-like images to name a few applications of this smooth noise. This arcticle is about application of it and not so much about the algorithms steps.
Perlin in Python¶
In Python in 2023 there is no built-in implementation of the Perlin noise algorithm. Since I can't quickly (time isn't a key factor) refactor this implementation from java to python https://mrl.cs.nyu.edu/~perlin/noise/ read more
Setup a Docker container
Short Notes on Docker
Before you dive deep you need to figure out whether you need a Docker container and how it would be useful in your project. To figure out how docker would be useful this Fireship video might be good place to start: https://www.youtube.com/watch …
read moreSome SQL commands I use as a template.
Joins¶
Here is an example of how you can use a JOIN clause in SQL to join a table called orders with 6 other tables:
SELECT orders.*, customers.*, products.*, shippers.*, suppliers.*, categories.*
FROM orders
JOIN customers ON orders.customer_id = customers.customer_id
JOIN products ON orders.product_id = products.product_id
JOIN shippers ON orders.shipper_id = shippers.shipper_id
JOIN suppliers ON products.supplier_id =
read more
Understanding Probability With Python
Probability is a branch of mathematics that is often used to make decisions and is concerned with measuring uncertainty.
Introduction¶
Sets¶
Set data types in Python have rules similar to set in mathematics: collections are unordered, unchangeable (only removal or addition is applicable), store unique items, and are unindexed.
Experiments and Event¶
Experiment return values for observation(s), and observations have some level of uncertainty. Single possible outcome of an experiment is a sample point in a set called sample space. Set sample space stores all possible sample points for one experiment. If your experiment is a set of n sample points the full sample space is written as follows for example of coin flip:
read moreStatistical Distributions (Common ones)
Introduction¶
A probability distribution in statistics is a function that returns the possible values for a variable with different occurence rate (how often values occur). Distribution in nature and society tend to fit pattern with ocasionally occuring exceptions (isn't absence of pattern is a pattern too?).
Probability Mass Function¶
Discrete random variable has probability mass function (PMF) being a particular type of probability distribution read more
Edit Text Productively in Vim
I would like to learn vim
I am so frustrated that I don't know all the tricks. In attempt to learn more I try to list some that worked and it felt magic. I omit some that I already get used to.
Editing
After escape do the following.
R enter …
Jump In pymc
Install¶
To simply install pymc was not enough on my computer, neither on Google Colab it worked to simply use library after !pip install. Apparently my laptop hadn't a working fortran of C compiler- the message that I got was:
Aesara will be unable to compile C-implementations and will default to Python. Performance may be severely degraded. To remove this warning, set Aesara flags cxx to an empty string.
read more
Truchet Tiles
Truchet Tiles¶
Sebastien Truchet figured out how square tiles can be combined to form larger patterns. In the picture below you see tiles of different types to use as input for generating mosaics.
Bayes Theorem for me
Bayes Theorem¶
Introduction¶
Let us think about probability of a single event - a probability that coin turn up heads for example. Probability (1/2) is the number of outcomes that qualify as event "coin turn up heads" (1) divided by the total number of all possible outcomes (2). To calculate probability of multiple events occuring in sequence we multiply the probabilities of each event in sequence. Consider an event A occuring given that another event B (evidence that B) has occurred - probability of it is known as conditional probability. We need to calculate the probability of A conditinal on event B occuring knowing that probability of B conditional on A occuring. This is the case for applying bayesian inference. What is that? Bayesian inference is a statistical inference that uses Bayes' theorem. It is being applied to geostatistics, genetics, linguistics, image processing, machine learning and other fields.
read more