In this post I’ll describe how to get started using gonum/matrix package for using matrices for math and stats applications. (Documentation here.) I’ll begin with a bit about setting up the Go environment drawn from the How to Write Code page on the Go website. (I highly recommend reading this if you’re unfamiliar with Go.) Next I’ll provide a commented usage case.
Z-score Transform for Geostatistics
In this post I’ll present the z-score forward and backward transforms used in Sequential Gaussian Simulation, to be discussed at a later date. Some geostatistical algorithms assume that data is distributed normally, but interesting data is generally never normally distributed? Solution: force normality, or quasi-normality. All of this is loosely based on Clayton V. Deutsche’s work on the GSLIB library, and his books.
Traversing a Directory Tree in Python and Go(lang)
In this post I’ll discuss the basics of walking through a directory tree in Python and Go. If you are dealing with a smaller directory, it may be more convenient to use Python. If you are dealing with a larger directory containing hundreds of subdirectories and thousands of files, you may want to look into using Go, or another compiled language. I enjoy using Go because it compiles quickly, and it doesn’t use pointer arithmetic.
Continue reading Traversing a Directory Tree in Python and Go(lang)
An Iterative Closest Point Algorithm
In this post I’ll demonstrate an iterative closest point (ICP) algorithm that works reasonably well. An ICP algorithm seeks to find a transformation between two sets of points that minimizes the error between them, i.e., you are trying to find a transformation that will lay one set of points exactly on top of another.
Puzzle: The Wolf, the Goat, and the Cabbage
In this post I’ll present a solution to a puzzle using Python. I think the primary value of this post is that it provides an example of how to translate an objective and a set of constraints into data structures and functions that can be interpreted by a computer. This problem breaks down into two interrelated parts:
- Translate the problem into data structures and functions
- Choose a strategy for finding the solution
Continue reading Puzzle: The Wolf, the Goat, and the Cabbage
Remove a Partition on a USB Drive in Windows
If you create a bootable USB flash drive for installing linux on a machines, you may have trouble reformatting it later in Windows. It is possible to create a bootable USB in such a way that the Windows reformatting utility, obtained by right-clicking on the drive and selecting Format…, does not see the partition containing the bootloader. In such a situation, you may have a 8GB drive, but the reformatting utility only sees 6GB, and reformatting will not recover the original 8GB of space.
Continue reading Remove a Partition on a USB Drive in Windows
Using THREE.js to Visualize 3D Point Sets
Spatial Statistical Hypothesis Testing
In this post I’ll consider performing a local hypothesis test for a difference in means with spatial data. I do not know if this is the optimal way to go about this sort of thing, but I have not yet found another solution. I think the best way to describe the problem is to consider the artificial data, and then wade through the code.
Poorly Drawn Arduino
I didn’t finish the two posts I was editing this week, but I did draw a shoddy Arduino in GIMP with a Wacom tablet that you can use if you’d like. Below are PNG and XCF files with white and transparent backgrounds.
PNG, white background
PNG, transparent background
XCF, white background
XCF, transparent background
Classical Hypothesis Testing, Statistical Power, and Type-II Errors
This is one of the fundamental tasks in science. You do a study, and then you have to determine if there is a statistically meaningful difference between the test and control data. It is important to be able to understand the hypothesis testing, because a lot of interesting functions in R are hypothesis tests. I’ll consider the simple z-test for testing whether the mean of the simple is the same as the hypothesized mean of the population. We’ll see how statistical power, which is the probability of detecting a difference in means, changes with sample size and effect size, which is the size of the difference between the observed sample mean, and the hypothesized population mean. We’ll also see that the significance level is comparable to the Type-II (false negative) error rate.
Continue reading Classical Hypothesis Testing, Statistical Power, and Type-II Errors