Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _posts/2022-07-23-Maximum-entropy-coin-toss-problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Inspired by a [tweet from John Carlos Baez](https://twitter.com/johncarlosbaez/s

```mathematica
NMaximize[{-p . Log[2, p], (*maximize the entropy = -\sum_i p_i log(p_i) *)
Total[p] == 1 && p . Range[6] == 5}, (*subject to contraints*)
Total[p] == 1 && p . Range[6] == 5}, (*subject to constraints*)
p \[Element] Cuboid[{0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1}]] (*in this domain*)

```
Expand All @@ -25,7 +25,7 @@ The warning [is a consequence of the way numerical maximization is performed; it

```mathematica
NMaximize[{Re[-p . Log[2, p]],(*maximize the entropy*)
Total[p] == 1 && p . Range[6] == 5},(*subject to contraints*)
Total[p] == 1 && p . Range[6] == 5},(*subject to constraints*)
p \[Element] Cuboid[{0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1}]](*in this domain*)


Expand Down Expand Up @@ -58,7 +58,7 @@ NMaximize[{-Re[p . Log[2, p]],(*restrict to reals*)
(*{1.97283, {p -> {0.0205324, 0.0385354, 0.0723234, 0.135737, 0.254752, 0.47812}}}*)
```

But searching in the simplex is unnecessary. You can just specify that p is a 6-dimensional positive vecotr and use the `Total` constraint to find the optimal solution.
But searching in the simplex is unnecessary. You can just specify that p is a 6-dimensional positive vector and use the `Total` constraint to find the optimal solution.

```mathematica
NMaximize[{Re[-p . Log[2, p]],
Expand Down
2 changes: 1 addition & 1 deletion _posts/2022-07-30-Conformal-prediction-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Show[data, predictions, conformancePlot]

![0hhefc7ct9yuf](/blog/images/2022/7/30/0hhefc7ct9yuf.png)

Given a conformance function, S, the *conformal predictio*n gives a score by computing the rank of conformance at the point of interest among all possible scores at the samples. Think about this in the following way: Suppose we add some new point (x,y) to the training data and retrain the model, obtaining some new optimized parameters *w*. With these optimized parameters, we can ask the rank that this new point would have relative to the existing points. An extreme rank would suggest it is quite unlikely. In practice this defines an interval around the predictions.
Given a conformance function, S, the *conformal prediction* gives a score by computing the rank of conformance at the point of interest among all possible scores at the samples. Think about this in the following way: Suppose we add some new point (x,y) to the training data and retrain the model, obtaining some new optimized parameters *w*. With these optimized parameters, we can ask the rank that this new point would have relative to the existing points. An extreme rank would suggest it is quite unlikely. In practice this defines an interval around the predictions.

```mathematica
conformal[x0_, y0_][x_, y_] := With[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Although quadruple bonding [and beyond...(perhaps even up to sextuple bonding in

However, Oliveira de Sousa and Nascimento argue on the basis of energy partitioning calculations that the speculated "fourth" bond is destabilizing [*J. Chem. Theory. Comput. 2016*](https://doi.org/10.1021/acs.jctc.6b00055). Highly accurate quantum Monte Carlo calculations by Genovese and Sorella suggest a partial agreement with the quadruple bond picture, with the main bonding effect resulting from spin fluctuations. [*J. Chem. Phys. 2020](https://doi.org/10.1063/5.0023067)

What do experiments say? Diatomic C2 was first [discovered by Swan in 1857](https://www.cambridge.org/core/journals/earth-and-environmental-science-transactions-of-royal-society-of-edinburgh/article/abs/xxixon-the-prismatic-spectra-of-the-flames-of-compounds-of-carbon-and-hydrogen/10408BB648F0919B1D0ECF0CA4AE0527) in high temperature flames, and subsequent work was done using electric arcs. This complicates the ability to try to assign the nature of the C2 ground state. Reently, [Miyamoto et al. (Nature Commun 2020)](https://www.nature.com/articles/s41467-020-16025-x) described a room-temperature chemical synthesis of C2 from hypervalent alkynl-\lambda^3-iodane. If C2 has a quadruple bond, it should be a singlet biradical. Based on its chemical reactivity, Miyamoto support this claim, and in turn, support the prediction of a quadruple bond. However, Rzepa has commented that Miyamoto's reaction sysnthesis of C2 would imply a highly endoenergic reaction (based on DFT and CCSD(T)), which seems inconssistent with their results. ([*Nature Commun 2021*](https://doi.org/10.1038/s41467-021-21433-8)) This calls into question what exactly was made in the Miyamoto et al. experiment, and in turn, the implications for quadruple bonding.
What do experiments say? Diatomic C2 was first [discovered by Swan in 1857](https://www.cambridge.org/core/journals/earth-and-environmental-science-transactions-of-royal-society-of-edinburgh/article/abs/xxixon-the-prismatic-spectra-of-the-flames-of-compounds-of-carbon-and-hydrogen/10408BB648F0919B1D0ECF0CA4AE0527) in high temperature flames, and subsequent work was done using electric arcs. This complicates the ability to try to assign the nature of the C2 ground state. Reently, [Miyamoto et al. (Nature Commun 2020)](https://www.nature.com/articles/s41467-020-16025-x) described a room-temperature chemical synthesis of C2 from hypervalent alkynl-\lambda^3-iodane. If C2 has a quadruple bond, it should be a singlet biradical. Based on its chemical reactivity, Miyamoto support this claim, and in turn, support the prediction of a quadruple bond. However, Rzepa has commented that Miyamoto's reaction synthesis of C2 would imply a highly endoenergic reaction (based on DFT and CCSD(T)), which seems inconsistent with their results. ([*Nature Commun 2021*](https://doi.org/10.1038/s41467-021-21433-8)) This calls into question what exactly was made in the Miyamoto et al. experiment, and in turn, the implications for quadruple bonding.

What should we make of this? It is important to realize that the chemical bond is a [convenient fiction](https://doi.org/10.1038/469026a). As [Charles Coulson](https://en.wikipedia.org/wiki/Charles_Coulson) wrote, "A chemical bond is not a real thing: it does not exist: no one has ever seen it, no one ever can. It is a figment of our own imagination."([*The Spirit of Applied Mathematics, 1952*](https://philpapers.org/rec/COUTSO-6)) For unusual molecules like C2, we are reaching the limit of the simple localized picture of bonding that is enforced by Lewis theory and simple formulations of valence bond theory.
2 changes: 1 addition & 1 deletion _posts/2023-02-23-Probabilities-of-Mineral-Formation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ I saw a fascinating talk by [Daniel Hummer](https://scholar.google.com/citations

# Mineral Ecology (2015)

**minerals** are solid, naturally occuring cyrstalline substances with well-defined chemical and atomic structure
**minerals** are solid, naturally occurring crystalline substances with well-defined chemical and atomic structure

**mineral ecology** is the large scale pattern of distribution in space and time

Expand Down
2 changes: 1 addition & 1 deletion _posts/2023-02-24-Imaginary-Cinema:-Ben-Hur-1980.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: imaginary-cinema art

Benjamin ("Ben") Hur is a lawyer for a real-estate mogul, loosely based on [Donald J. Trump](https://en.wikipedia.org/wiki/Donald_Trump). They went to private school together and have enjoyed many adventures out in the big city during their youth. The Mogul is back from [Wharton](https://en.wikipedia.org/wiki/Wharton_School_of_the_University_of_Pennsylvania) and wants to make make a big real-estate development in the [Lower East Side](https://en.wikipedia.org/wiki/Lower_East_Side) and tries to get Ben-Hur to help him in some shady coercive evictions. Ben Hur, being an honorable man, declines.

Shortly afterwards, Ben Hur and the Mogul are at a club (loosely based on [Studio 54](https://en.wikipedia.org/wiki/Studio_54)). During a big cocaine (or tax-evasion?) bust, the Mogul accuses Ben Hur of comlicity to avoid being tarnished, and Ben Hur is sent to [Rikers Island](https://en.wikipedia.org/wiki/Rikers_Island) (instead of a Roman prison galley.)
Shortly afterwards, Ben Hur and the Mogul are at a club (loosely based on [Studio 54](https://en.wikipedia.org/wiki/Studio_54)). During a big cocaine (or tax-evasion?) bust, the Mogul accuses Ben Hur of complicity to avoid being tarnished, and Ben Hur is sent to [Rikers Island](https://en.wikipedia.org/wiki/Rikers_Island) (instead of a Roman prison galley.)

On the way, he is offered mercy by [Dorothy Day](https://en.wikipedia.org/wiki/Dorothy_Day). (Or maybe [Mychal Judge](https://en.wikipedia.org/wiki/Mychal_Judge))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags: imaginary-books children

**Premise:** A children's picture book with short biographies of famous Hungarians, with an emphasis on mathematics, science, engineering (but with occasional pop-culture figures to liven things up). Inspired by discussions with [Chris Görog](https://www.linkedin.com/in/chrisgorog/) about the *Erziehung* of his children. **Entries to include...**

- [Asboth, Oskar](https://en.wikipedia.org/wiki/Oszkár_Asboth) (1891-1960) Inventor of the Helicoper
- [Asboth, Oskar](https://en.wikipedia.org/wiki/Oszkár_Asboth) (1891-1960) Inventor of the Helicopter
- [Biro, Laszlo](https://en.wikipedia.org/wiki/László_B%C3%ADró) (1899-1985) Inventor of the modern ballpoint pen
- **C**
- **D**
Expand Down
8 changes: 4 additions & 4 deletions _posts/2023-04-22-Bachscratcher-and-ModularMonk.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ date: 2023-04-22
tags: synth audio pico sequencer
---

**Premise: a [Bach chorale](https://bach-chorales.com/BachChorales.htm) sequencer wtih CV output** or alternatively a **Gregorian chant** sequencer...
**Premise: a [Bach chorale](https://bach-chorales.com/BachChorales.htm) sequencer with CV output** or alternatively a **Gregorian chant** sequencer...

# Resources

* Digitized JSB Chorales dataset in JSON [https://github.com/czhuang/JSB-Chorales-dataset] *problem*: does not distinguish between held and repeated notes (so no gate information)
* Bach Soprano-line dataset only with note start and end times [https://archive.ics.uci.edu/ml/datasets/Bach+Chorales]
* [Gregobase corpus](https://github.com/bacor/gregobasecorpus) preprocssed
* [Gregobase corpus](https://github.com/bacor/gregobasecorpus) preprocessed
* [Gregobase](https://gregobase.selapa.net/chant.php?id=16787) uses a GABC format that encodes the melody and text...

# BachScratcher Design ideas
Expand All @@ -23,7 +23,7 @@ tags: synth audio pico sequencer
# ModularMonk Design ideas

* Only one voice: CV and gate output
* runing knob
* tuning knob
* tempo knob
* random jitter timing
* have a vocodor: Analog [VODER 1939](https://en.wikipedia.org/wiki/Voder) circuit? Some [technical circuit details in this whitepaper](https://www.specialtyansweringservice.net/wp-content/uploads/resources_papers/what-is-the-voder/The-Voder.pdf)
* have a vocoder: Analog [VODER 1939](https://en.wikipedia.org/wiki/Voder) circuit? Some [technical circuit details in this whitepaper](https://www.specialtyansweringservice.net/wp-content/uploads/resources_papers/what-is-the-voder/The-Voder.pdf)
2 changes: 1 addition & 1 deletion _posts/2023-06-03-Euclidean-Rhythm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date: 2023-06-03
tags: music synth mathematica supercollider
---

[Euclidean rhythms](https://en.wikipedia.org/wiki/Euclidean_rhythm) are a way to space *n* onset events across *m* positions (essentially, pulses or beats) as evenly possible. Ffor example, 4 onsets across 16 positions, will result in 4 evenly spaced onsets. However, if the number of onsets is relatively prime with respect to the number of pulses, the resulting pattern is more interesting. This was [discovered somewhat recently by Godfried T. Toussaint](http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf). A [nice interactive javascript example is online with 4 samples](https://reprimande.github.io/euclideansequencer/). Play with it and you'll hear some interesting ideas, especially if you choose relative primes. **But how do you implement it...**
[Euclidean rhythms](https://en.wikipedia.org/wiki/Euclidean_rhythm) are a way to space *n* onset events across *m* positions (essentially, pulses or beats) as evenly possible. For example, 4 onsets across 16 positions, will result in 4 evenly spaced onsets. However, if the number of onsets is relatively prime with respect to the number of pulses, the resulting pattern is more interesting. This was [discovered somewhat recently by Godfried T. Toussaint](http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf). A [nice interactive javascript example is online with 4 samples](https://reprimande.github.io/euclideansequencer/). Play with it and you'll hear some interesting ideas, especially if you choose relative primes. **But how do you implement it...**

The best popular explanation I have found online (with some visualizations) is a [medium post by Jeff Holtzkener](https://medium.com/code-music-noise/euclidean-rhythms-391d879494df) which introduced me to its implementation in terms of the [Bresenham line algorithm](https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm) for pixelating lines (plus a floor operation). This can be done simply in Mathematica as:

Expand Down
2 changes: 1 addition & 1 deletion _posts/2023-06-27-Great-ideas-from-Korea.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ Business and art ideas inspired by my recent trip to Korea...
- chinese/korean character LED backlit pushbuttons on synthesizers
- incense vending machine (with altar where you can light incense to Buddha, etc.)
- K-pop videos, but with chiguiros
- airsoft target range in an empty retail storefront somewhere with high tourist foot-traffic. No human silloutes, only targets
- airsoft target range in an empty retail storefront somewhere with high tourist foot-traffic. No human silhouettes, only targets
- book on the lives of the Korean martyrs, and what western Christians can learn from their examples (specifically: a lay-lead program of evangelization and catechesis, dedication, ...)
Loading