LaundrySorcery

Log | Files | Refs

commit d8da5c62fc782cf8543cfa0a7339a1f9b387b98b
parent d2fe809580b5cd5b11d1a3671caba522625c1334
Author: Dominik Schmidt <das1993@hotmail.com>
Date:   Sun,  1 Jul 2018 14:42:11 +0000

Convert scrreprt to scrartcl

Diffstat:
doc/Documentation.tex | 28++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/doc/Documentation.tex b/doc/Documentation.tex @@ -1,4 +1,4 @@ -\documentclass{scrreprt} +\documentclass{scrartcl} \usepackage{fontspec} \setmainfont{STIX Two Text} \usepackage{amsmath} @@ -32,15 +32,15 @@ \begin{document} \maketitle - \chapter{Sensory} + \section{Sensory} To determine whether the washing machine is on or off we tape a light-sensor to the ON-LED. This has a drawback: The machine registers as ON while in delayed start mode, which is good for displaying whether the - machine is free but bad for the machine learning chapter. + machine is free but bad for the machine learning section. The light sensor we chose is a light dependant resistor (LDR), leaving us with the problem on how to read out the resistance with the given hardware (a Raspberry Pi) - \section{Read-out Circuit} + \subsection{Read-out Circuit} Since the Raspberry Pi does not have an ADC, we need a different way to read out the resistance of the LDR. \begin{figure}[H] \centering @@ -60,7 +60,7 @@ \end{figure} To get our measurement data we use the time for a charge-cycle. - \section{Interpretation of Timings} + \subsection{Interpretation of Timings} Our program now gets a series of charging times $\Delta t$. How do we interpret these values to figure out whether the washing machine is on or off? To figure that out, we make two assumptions: @@ -86,7 +86,7 @@ \frac{\mu_1 + \mu_2}{2} \end{equation} - \subsection{Measurement of Gaussians} + \subsubsection{Measurement of Gaussians} We do not want hard-coded gaussians in our program. Therefore, the gaussians are guessed continuously from the measurements with the following method: \begin{align} \mu[k] &= \mu[k-1] \lambda + \Delta t[k] \cdot (1-\lambda)\\ @@ -101,7 +101,7 @@ \begin{equation} \lambda[k] = \min\left\{0.99999, 0.75 + 0.25\frac{k}{1000}\right\} \end{equation} - \subsection{Bootstrapping} + \subsubsection{Bootstrapping} We make no a-priori assumption on these gaussians. This results in a problem: While we know the decision boundary between two gaussians, we have no idea on how the on-state is distributed at the beginning. @@ -110,12 +110,12 @@ After that first decision we can train the $(\mu_{ON},\sigma_{ON}^2)$ and use the proper decider. - \subsection{Outlier Resistancy} + \subsubsection{Outlier Resistancy} If we redecided every time a single value across the decision boundary occurded, we would switch between states all the time. Hence, we only switch the guessed state once $100$ \emph{consecutive} values have been measured. - \subsection{Updates During Possible Transition} + \subsubsection{Updates During Possible Transition} What do we do when we detect an outlier? Do we train our gaussian with it, or do we ignore it? Both versions have drawbacks: Training the gaussian yields a large spurious variance during a transition. @@ -124,13 +124,13 @@ Hence we do something in between: when we are detecting outliers, we make a copy of the gaussian before the outliers started, update the gaussian with the outliers and when we decide to switch, we restore the gaussian to its copy before the outliers. - \chapter{Machine Learning} + \section{Machine Learning} We now want to guess how long it will take until the washing is finished. This is complicated by the fact that the washing machine has multiple programs, which all have different durations. Additionally, program duration can vary by how much laundry is in the machine. - \section{Learning Program Lengths} + \subsection{Learning Program Lengths} To address this issue, we use the K-Means clustering algorithm. Since we do not know the number of clusters, we start with $k=1$ and increase k, until the maximal variance of the cluster is below a threshold. @@ -148,7 +148,7 @@ \max_{i} \frac{\sigma_i}{\mu_i} &< \tau_{rel} \end{align} - \section{Guessing the Remaining Time} + \subsection{Guessing the Remaining Time} We now have clusters of gaussians, and want to know: How long is a washing going to take? \begin{align} @@ -172,7 +172,7 @@ Which is exactly the expectation $E[T]$. - \subsection{Improving the Guess} + \subsubsection{Improving the Guess} This can be improved, since we have some additional information: We know, the program has been running for $t_0$ seconds. Hence, we rewrite our guess to: @@ -202,7 +202,7 @@ &= \frac{P[C=c]}{\sum_i P[C=c]\cdot P[T \geq t_0 | C=c]} \cdot P[T \geq t_0 | C=c] \end{align} This expression, while computationally difficult for large number of clusters, can be evaluated. - \section{Guessing the Cluster} + \subsection{Guessing the Cluster} Now, since we are here anyways, we can as well guess the most probable cluster, too. \begin{equation} \hat{C} = \argmax_{i} P[C=i | T \geq t_0]