https://github.com/dcnick3/statistics-assignment
Bayesian Statistics & Simulated Annealing assignment implemented in Wolfram Mathematica
https://github.com/dcnick3/statistics-assignment
Last synced: 7 months ago
JSON representation
Bayesian Statistics & Simulated Annealing assignment implemented in Wolfram Mathematica
- Host: GitHub
- URL: https://github.com/dcnick3/statistics-assignment
- Owner: DCNick3
- Created: 2023-05-04T22:31:40.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-04T22:56:37.000Z (about 3 years ago)
- Last Synced: 2025-01-28T03:29:51.048Z (over 1 year ago)
- Language: Mathematica
- Size: 4.23 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The first task included a lot of computations & equation solving, so I decided to use Mathematica language to do it. It's a functional language with focus on symbolic computation, which is useful for solving equations.
Then it somehow snowballed into implementing the second task in Mathematica too.
The repository (https://github.com/DCNick3/statistics-assignment) contains `task*.nb`, which are the Mathematica notebooks I used to solve the tasks. They are also rendered as PDF files so that one could look at the code without having Mathematica installed.
## Task 1: Bayesian Statistics
The [notebook](task1.pdf) contains all relevant info
## Task 2: Simulated Annealing
I've tried doing the annealing with three temperature decay coefficients: `0.9`, `0.95` and `0.99`
The lengths of the resulting paths were as follows:
|coefficient|distance, km|
|---|--------------------|
|0.9|40 213.4|
|0.95|42 154.4|
|0.99|25 085.6|
Here's also the plot of distances over time:

The `0.95` (called middle) seemed to have some trouble settling at the beginning, probably due to bad luck, and came to worse solution.
For visualization I used built-in mathematica GIS support, so it already came with a reasonable projection and graph visualization capabilities.
Here's a visualization for temperature decay coefficient `0.99`.
[animation.webm](https://user-images.githubusercontent.com/10363282/236343608-6e1d03f7-1c94-41c3-9493-13923e87de63.webm)
Looking at the final solution that was found with the `0.99` decay coefficient seems pretty reasonable to me.