## 2021-10-04

### Functionals in Probability and Bayesian Inference

My work on transportation policy research in part involves conducting & analyzing surveys of people's travel behaviors & attitudes. Analyzing survey data requires an understanding of basic probability and statistics, which is an area that I previously felt I had just enough knowledge of to get by when learning about statistical physics but that I need to build more practical skills in now. In the process of refreshing my understanding of probability and statistics, I thought more about Bayes's theorem. In the context of hypothesis testing or inference, Bayes's theorem can be stated as follows: given a hypothesis $$\mathrm{H}$$ and data $$\mathrm{D}$$ such that the likelihood of measuring the data under that hypothesis is $$\operatorname{P}(\mathrm{D}|\mathrm{H})$$, and given a prior probability $$\operatorname{P}(\mathrm{H})$$ associated with that hypothesis, the posterior probability of that hypothesis is $\operatorname{P}(\mathrm{H}|\mathrm{D}) = \frac{\operatorname{P}(\mathrm{D}|\mathrm{H})\operatorname{P}(\mathrm{H})}{\operatorname{P}(\mathrm{D})}$ given the data. The key is that the denominator is evaluated as a sum $\operatorname{P}(\mathrm{D}) = \sum_{\mathrm{H}'} \operatorname{P}(\mathrm{D}|\mathrm{H}')\operatorname{P}(\mathrm{H}')$ where the label $$\mathrm{H}'$$ runs over all possible hypothesis.

In practice, however, the set of hypotheses doesn't literally encompass all hypotheses but encompasses only one particular type of function with one or a few free parameters which then go into the prior probability distribution. For one free parameter, if the hypothesis specifies only the value of the (assumed continuous) parameter $$\theta$$, if the prior probability of that hypothesis is given by a density $$f_{\mathrm{H}}(\theta)$$, and the likelihood of measuring a (assumed continuous) data vector $$D$$ under that hypothesis is the density $$f(D|\theta)$$, then Bayes's theorem gives $f_{\mathrm{H}}(\theta|D) = \frac{f(D|\theta) f_{\mathrm{H}}(\theta)}{\int f(D|\theta') f_{\mathrm{H}}(\theta')~\mathrm{d}\theta'}$ as the posterior probability density under that hypothesis given the data.

I understood that in most cases, a single class of likelihood functions varied through a single parameter is good enough, and especially for the purposes of pedagogy, it is useful to keep things simple & analytical. Even so, I was more broadly unsatisfied with the lack of explanation for how to more generally consider summing over all possible hypotheses.

This post is my attempt to address some of those issues. Follow the jump to see more explanation as well as discussion of other tangentially related philosophical points.

## 2021-09-27

### Moved Closer to UC Davis

This is an update from the last few weeks. I have finally moved, a year later than originally planned, and live closer to my job at UC Davis. This has allowed me to go into the office regularly, which in turn has allowed me to meet my supervisors and colleagues in person after having worked remotely for a year. I was really looking forward to this because I felt that when I and my colleagues were all working remotely, it was much harder to exchange ideas, get feedback on my ideas and progress, and learn about the tricks of the trade. In particular, when everyone was working fully remotely, I would have needed to schedule meetings with colleagues in the absence of serendipitous in-person interactions, and others would feel similarly about each other too. I felt this made it easier (almost like the Nash equilibrium of a prisoner's dilemma game) for each individual to settle for limited scheduled virtual interactions punctuating long stretches of working alone without much feedback instead of making that effort to keep meeting regularly; I certainly felt that the need to schedule each remote meeting and the challenges associated with interacting remotely left me feeling more tired & less motivated than would be the case when working in person. Separately, I've been able to explore the town of Davis a little more: I appreciate the presence of sidewalks on every road, though they could be a little better designed. Plus, the weather right now is quite hot, and as climate change makes summers hotter & longer and fire seasons longer & more intense, I wonder how much longer I'll feel comfortable living here in the long-run, though I can see myself living here comfortably in the short-run.

## 2021-08-15

### Featured Comments: Week of 2021 August 8

There was one post that got one comments this past week, so I'll repost that.

#### Some Recent Troubles with pCloud and Google Chat

Commenter pCloud said, "Hi, thank you for taking the time to write your concerns. If you need assistance or to discuss any of the points with pCloud's representative, please contact support@pcloud.com". (The link going to the official pCloud site tells me that this is an official employee of pCloud. This would not surprise me, because regardless of pCloud's actual customer service quality, it does aggressively post on blogs and social media sites in response to customer complaints.)

Thanks to that employee for commenting, though I ask that pCloud employees, if they see this post, not comment on it as there is no need. I don't have any other posts planned for this month. In any case, if you like what I write, please continue subscribing and commenting!

## 2021-08-09

### Some Recent Troubles with pCloud and Google Chat

Originally, I was going to write a post just about my experiences with pCloud, following up on a recent post in which I wrote of wanting a secure cloud storage service that preserves data privacy and concluded that pCloud is the best option for my needs. Since then, Google forced me to migrate from Google Hangouts to the new Google Chat, so I decided to write about experiences with both of those in a single post. Note that this isn't a full review of either product, as I haven't explored either one in great depth. This is just a short write-up of my experiences using each product to satisfy my needs. Furthermore, in the interest of my own privacy, I won't be posting any screenshots.

#### pCloud

I have been using pCloud for the last 1.5 months. In that time, I have experienced a few benefits but significantly more concerning problems. The benefits are that the zero-knowledge encryption service seems trustworthy (to someone like me who has some technical knowledge but no specific expertise with encryption), the integration with Linux Mint seems reasonably good as it is possible to open both the standard and zero-knowledge encrypted folders using desktop file managers, the web interface makes sharing links with others easy, and it is cheap. Before I list the problems, I should note that I've only tried pCloud for my own purposes on my laptop that has Linux Mint 20 "Ulyana" MATE installed. Therefore, it isn't clear whether the problems are specific to this setup.

The problems are as follows.

1. For folders protected by standard encryption, some folders don't transfer properly and may require multiple attempts to transfer, whether using the desktop file manager or the web interface. It may take a few sessions to figure out which folders didn't transfer properly. (It may also be possible that pCloud, having the encryption keys, is secretly deleting folders. This would be extremely troubling, but I haven't paid close enough attention to know whether a folder didn't transfer properly or whether it did but was later deleted.)
2. File transfers are very slow, because while some transfers can go up to 20 MB per second (which is reasonable given that I have an Internet connection that allows for up to 100 MB per second in each direction), most file transfers are only around 1 MB per second. Any transfer that involves copying thousands of small files & folders especially seems to create a bottleneck and slow things down further. For this reason, it took me many hours over several days to transfer hundreds of gigabytes of files to pCloud.
3. The web interface doesn't allow for uploading folders as such (only file contents within an existing folder).
4. When transferring to folders protected by zero-knowledge encryption, timeouts occur unpredictably and require encrypting and again decrypting those folders. Additionally, such transfers have unpredictably but on multiple occasions (though certainly not on every occasion) caused the desktop to freeze.

These problems are troubling enough that I wouldn't recommend pCloud to others, despite the fact that it is one of the few secure cloud storage providers that protects data privacy (at least with zero-knowledge encryption) and ostensibly gives Linux users the same benefits as users of other operating systems. I'm a patient person and I've spent enough money on this, so I'm willing to put more time into making this work. However, if these problems keep occurring regularly or if I see even worse problems like evidence of pCloud deleting files that were uploaded without zero-knowledge encryption, I will likely switch to Tresorit and keep looking for other alternatives too.

Without even getting into the particular issues with Google Chat, I'd like to express how strange it is that Google seems to change its messaging platform around once every 4-5 years. It feels like Google thinks it has to catch up to other services or like Google really doesn't care about its messaging platform.

Having said that, there are benefits and problems with Google Chat. I do appreciate that it has migrated my previous conversations from Google Hangouts. Additionally, many of the features, like document sharing within conversations, seem pretty nifty. However, there are two big problems that I have with the design of Google Chat along with its companion program Google Meet.

1. The version of Google Chat that is integrated into Gmail is missing quite a few features compared to the way that Google Hangouts was integrated into Gmail, like seeing contacts who are online (as opposed to only seeing previous conversation threads, which is a problem because before, I could have a chance of seeing someone pop online that I haven't talked to in a while and would therefore get the idea of reaching out to that person, whereas now, seeing only recent messages self-reinforces a narrowing group of conversations). The separate Google Chat website at least has the date or time of the most recent message in a thread (whereas the version of Google Chat integrated into Gmail lacks even this) but does not have the aforementioned feature of seeing contacts who are online.
2. Splitting voice or video calls out of Google Hangouts and into Google Meet is problematic because Google Meet lacks the immediacy of a Google Hangouts call: when a call is placed on Google Hangouts, the website or app will immediately ring for all recipients, whereas when a Google Meet link is created, the sender must wait for recipients to react to a single beep indicating a new message containing the link.

I think I can get used to Google Chat and Google Meet soon enough. If nothing else, perhaps it is an ironic consolation that I won't have to deal with it so much because the group of people that I keep in touch with over Google Hangouts (and now Google Chat) has significantly narrowed over the years (as I now keep in touch with most people through platforms other than Facebook products or Google Chat).

## 2021-07-01

### Twelfth Paper: "Near-field radiative heat transfer in many-body systems"

My twelfth paper has been published! It is in volume 93, issue 2 of Reviews of Modern Physics, and an older preprint of it is available too for those who don't have access to academic journals (it is identical in content and only differs in formatting). Unlike my previous blog posts about published papers that I have written, this one will not strictly use the thousand most common words in English. This is because unlike my previous papers, which put forth novel ideas advancing the field of nanophotonics, this is a review paper that gives a broad historical scientific overview of the subject, namely, the flow of heat through light (i.e. electromagnetic (EM) fields) between objects that are typically separated by less than 1 micron (approximately 1% of the width of a typical human hair). It goes over work that other scientists have done theoretically and experimentally in this subject, and this paper in particular is divided into two main sections.

The first section, to which my PhD advisor & I made most of our contributions, is about the flow of heat via EM fields between just 2 objects. Relevant issues include choices of materials (mainly metals/conductors versus insulators), choices of shapes for objects, advances in experimental measurement techniques, advances in computational simulation techniques, and derivations of upper limits to the flow of heat via EM fields between 2 objects (mostly referring to my previous 2 papers that were the subject of the following linked blog post).

The second section, which constitutes the bulk of the paper, is about the flow of heat via EM fields among more than 2 objects. Relevant issues include changes in temperature over time in objects that are very small compared to their separations, the fact that the heat flow among more than 2 objects involves very complicated interactions among them, the fact that material properties could depend on temperature so there could be many possible sets of object temperatures where heat flows but temperatures don't change, heat flow via EM fields over distances longer than 1 micron, applications of heat flow via EM fields to microscopy techniques, heat flow via EM fields in materials that can be attracted to permanent magnets, and applications of heat flow via EM fields to engineer new devices.

## 2021-05-17

### Manually Creating a Rudimentary Searchable Image Tagging System

This post is the third in a series of three posts about some changes I have been making in my personal life with respect to how I interact with online social media platforms. When I published the second post in this series, I was on the lookout for secure privacy-respecting cloud storage services. As of this post, I still haven't committed to a specific service. One of my requirements has been that the service should allow me to share certain files or folders securely with others. Unfortunately, unless I use a service like Google Drive which has just as little respect for data privacy as Facebook does, it isn't clear how I can easily tag images with details about people, location, and other comments in a way that I or others can easily search. My proposed solution, involving BASH scripts, is far from perfect, it is very much a work in progress, and it is arguably somewhat specific to my particular situation. Follow the jump to see more details.