forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
228 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
--- | ||
References | ||
========== |
File renamed without changes.
77 changes: 77 additions & 0 deletions
77
_drafts/inbetween-posts/2018-11-05-my-insurance-company-ipo.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: "IPO: An 'ethical' insurance company!" | ||
layout: post | ||
subtitle: Preventive healthcare and an attempt to align the incentives of the insurer and the insured. | ||
categories: | ||
- "economic" | ||
--- | ||
|
||
|
||
Hello potential customer, welcome. Here is the pitch: | ||
|
||
Purchase health insurance from us for $5,000 per year. | ||
You can reduce that cost by giving us information and following our advice. | ||
|
||
Our business model is simple. | ||
|
||
We make money by reducing the costs of your health care. | ||
We set your insurance cost to be the average cost of health care. | ||
We bet that the advice we give, the regular check ups we schedule, the nudges we provide, will make you healthier. | ||
Thus, we make money and you live longer! | ||
|
||
|
||
We do this by providing preventive care and by nudging you to take care of yourself. | ||
|
||
- If we can catch the cancer early (through regular screening), we make money. | ||
- If we prevent a heart attack (through your diet and exercise reigime), we make money. | ||
- If we catch a calcium defficiency early (through regular blood tests) and thus avoid a potential broken bone, we make money. | ||
|
||
Gambits / nudges: | ||
|
||
<!-- behaviourial econ? --> | ||
|
||
- If you agree to have your genome sequenced, we will reduce the cost by $500 per year (we pay for the sequencing). | ||
- If you wear a fitness tracker and hit predetermined goals we will reduce the cost by $250 per year. | ||
- If you show up to your 3 month check up we will reduce the cost by $50. | ||
|
||
## Preventative healthcare | ||
|
||
 | ||
|
||
It is well known that our current system is lazy. We wait utill you are sick, or have noticable symptoms, before we act. | ||
Often this is too late, the health outcomes are poor and the costs are high. | ||
|
||
For example, aetherosclerosis (the build up of plaque in your arteries) is a slow process that can start in your 20s. It can lead to a heart attack in your 50s. Depending on how early we catch it, the cost of treatment can vary from $0 (if we change your diet and exercise) to $30,000 for an angioplasty to $100,000 (if we catch it late). | ||
|
||
Preventative healthcare is the idea that we can reduce the costs of health care by preventing diseases before they occur. This is done by regular check ups, screenings, and by nudging you to take care of yourself. While most agree that this is a good idea, the current system does not incentivise this behaviour. | ||
|
||
## Aligning incentives | ||
|
||
The incentives of current insurers and insured are not well aligned. | ||
Your insurer makes money as long as you are alive to pay your premiums. | ||
Though, if you bound to a hospital bed, they simply increase your premiums. | ||
|
||
<!-- Make money vs live a long healthy life. --> | ||
|
||
<!-- how does helth insueance work. does it increase in cost over time? --> | ||
|
||
|
||
Now, I claim, we, the insurance providers, have a large incentive to accurately forecast your future health, and to gather information that is predictive of future complications and to act to minimise your health care costs. | ||
|
||
Imagine (or maybe you don't have to...). Your genome reveals that you have the HER2 gene. We schedule and pay for regular screenings starting from when you turn 40. The logic being that the earlier we catch the cancer, the less damage it does and thus we have a smaller bill to insure! A win-win! | ||
|
||
|
||
## Nudges | ||
|
||
<!-- review the concept here? --> | ||
|
||
## Problems | ||
|
||
There are some problems I can see with this idea: | ||
|
||
__Privacy__. To make accurate predictions, we need to know a lot about you. This may concern some. There may be ways to mitigate this concern through clever use of encryption and other technologies. | ||
|
||
__Gaming our system__. It's easy to imagine people trying to game our system. For example, they could wear a fitness tracker on their dog and claim the steps as their own. Care will have to be taken in designing our nudges and rewards to avoid this. | ||
|
||
__Fairness__. We need to make sure that our system is fair. | ||
We don't want to charge people more for insurance due to factors out of their control (e.g. their genome). |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
_drafts/technical-posts/2020-01-10-the-future-of-model-based-rl.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
title: "Projection into the typical set: PITS" | ||
subtitle: "A new approach to solving inverse problems" | ||
layout: post | ||
permalink: /pits | ||
categories: | ||
- "research" | ||
scholar: | ||
bibliography: "pits.bib" | ||
--- | ||
|
||
Inverse problems are a class of problems where we want to find the input to a function given the output. For example, | ||
|
||
We consider the setting where we have access to a prior $p(x)$ and likelihood function $p(y \mid x)$. We observe $y$ and want to recover $x$. | ||
|
||
Using Bayes rule, we can write the posterior as; | ||
|
||
$$ | ||
\begin{align*} | ||
p(x | y) &= \frac{p(y | x) p(x)}{p(y)} \tag{Bayes rule} \\ | ||
x^* &= \arg \max_x p(x | y) \tag{the MAP solution} | ||
\end{align*} | ||
$$ | ||
|
||
> MAP will return the most likely value of $x$, given $y$. | ||
However, is the most likely value of $x$ the 'best' guess of $x$? | ||
|
||
We offer an alternative approach, suggesting that our guess of $x$ should be typical. This frames the inverse problem as a problem of projection into the typical set (PITS). | ||
|
||
$$ | ||
\begin{align*} | ||
x^* &= \arg \max_{x \in \mathcal T(p(x))_\epsilon} p(y | x) \tag{PITS} | ||
\end{align*} | ||
$$ | ||
|
||
where $\mathcal T(p(x))_\epsilon$ is the $\epsilon$-typical set of $p(x)$. | ||
|
||
We provide a few posts to help you understand PITS; | ||
|
||
1. Background on typicality [link]({{ site.baseurl }}/pits/typicality) | ||
2. MAP produces solutions that are not typical. [link]({{ site.baseurl }}/pits/map) | ||
3. A method to apply PITS arbitrary distributions using neural flows. [link]({{ site.baseurl }}/pits/flow) | ||
4. A demonstration of the PITS approach to inverse problems applied to neural flows. [link]({{ site.baseurl }}/pits/mnist-demo) | ||
|
||
The advantages of this approach are; | ||
|
||
- we have a way to control the quality (/typicality) of the solution. (missing from posterior sampling formulations) | ||
- we can provide guarantees on ...? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
title: "The MAP solution is not the best solution?" | ||
subtitle: "MAP produces solutions that are not typical" | ||
layout: post | ||
permalink: /pits/map | ||
scholar: | ||
bibliography: "pits.bib" | ||
--- | ||
|
||
Here we pick the prior and likelihood to be Gaussian distributions. | ||
|
||
$$ | ||
\begin{align*} | ||
p(x) &= \mathcal{N}(0, \sigma_x^2) \\ | ||
p(y|x) &= \mathcal{N}(x, \sigma_y^2) | ||
\end{align*} | ||
$$ | ||
|
||
## MAP solution | ||
|
||
For Guassian prior and likelihood, can derive the MAP solution in closed form as follows; | ||
|
||
$$ | ||
\begin{align*} | ||
x^*&= \arg \max_x \frac{p(y|x)p(x)}{p(y)} \\ | ||
&= \arg \max_x p(y|x)p(x) \\ | ||
&= \arg \max_x \log p(y|x) + \log p(x) \\ | ||
&= \arg \max_x -\frac{1}{2\sigma_y^2}||y - x||^2 - \frac{1}{2\sigma_x^2}||x||^2 \\ | ||
\end{align*} | ||
$$ | ||
|
||
$$ | ||
\begin{align*} | ||
\nabla_x \left( -\frac{1}{2\sigma_y^2}||y - x||^2 - \frac{1}{2\sigma_x^2}||x||^2 \right) &= \nabla_x \left( -\frac{1}{2\sigma_y^2}||y - x||^2 \right) + \nabla_x \left( -\frac{1}{2\sigma_x^2}||x||^2 \right) \\ | ||
&= \frac{1}{\sigma_y^2}(y - x) - \frac{1}{\sigma_x^2}x \\ | ||
&= 0 \\ | ||
x &= \frac{\sigma_x^2}{\sigma_x^2 + \sigma_y^2}y \\ | ||
p(x|y) &= \mathcal{N}\left(\frac{\sigma_x^2}{\sigma_x^2 + \sigma_y^2}y, \frac{\sigma_x^2\sigma_y^2}{\sigma_x^2 + \sigma_y^2}\right) \\ | ||
\end{align*} | ||
$$ | ||
|
||
## PITS solution | ||
|
||
For Gaussian distributions we can rewrite PITS as; | ||
|
||
$$ | ||
\begin{align*} | ||
x^* &= \arg \max_{x \in \mathcal T(p(x))_\epsilon} p(y | x) \tag{PITS} \\ | ||
&= \arg \min_{x \in \mathcal T(p(x))_\epsilon} \parallel x - y \parallel^2 | ||
\end{align*} | ||
$$ | ||
|
||
Thus finding $x^*$ becomes a problem of finding the closest point in the $\epsilon$-typical set of $p(x)$ to $y$. Which can be calculated by normalising $y$. | ||
|
||
$$ | ||
\begin{align*} | ||
x^* &= \frac{y}{\parallel y \parallel} | ||
\end{align*} | ||
$$ | ||
|
||
|
||
## An illustrated example | ||
|
||
Let's pick the prior to be a Gaussian distribution with mean 0 and standard deviation 1. And the likelihood to be a Gaussian distribution with mean 1 and standard deviation 0.5. | ||
|
||
|
||
<img src="{{ site.baseurl }}/assets/pits/pits-ip.png"> | ||
<figcaption>Illustration of the inverse problem for a Gaussian prior and likelihood. Top; | ||
</figcaption> | ||
|
||
<img src="{{ site.baseurl }}/assets/pits/map-solns.png"> | ||
<figcaption> | ||
The observed $y$'s are updated to be more likely under the prior. | ||
</figcaption> | ||
|
||
<img src="{{ site.baseurl }}/assets/pits/pits-solns.png"> | ||
<figcaption> | ||
The observed $y$'s are projected into the typical set. | ||
</figcaption> | ||
|
||
## Bibliography | ||
|
||
{% bibliography --cited %} |
33 changes: 0 additions & 33 deletions
33
_posts/inbetween-posts/2018-11-05-my-insurance-company-ipo.md
This file was deleted.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
_posts/personal-posts/2015-07-05-right-beliefs-wrong-reasons.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.