**Work**

- I have implemented a visualization tool in Matlab which plots several statistics for the Six Hump Camel Back
- (x, y) coordinates of (non-greedy) samples m to n
- error against sample number
- best reward against samples number
- reward against samples number
- Below are some results

- Kurt/Michael told me the F-test using 1 to
*n*degrees of freedom is correct - See Regression problems section of the F-test wikipedia page for reference
- In my case, two regression models are being compared representing before and after split. The first has one parameter (average before split) and the other two parameters (average of left child after split and the average of the right child after splitting).
- p2 - p1 is therefore 2 - 1 = 1 and n - p2 is n - 2
- The residual sum of squares (of sum of squared errors) is calculated as follows
- RSS = ∑ (y - f(x))² where y is the return of one sample and f(x) is the mean of the data
- In my case the input consists of 6 values; countLeft, countRight, ySumLeft, ySumRight, ySumSquaredLeft, ySumSquaredRight
- The totalCount, yTotalSum and yTotalSquaredSum values of the parent node can be calculated by summing the left child's value and the right child's value
- The mean of the three data sets are of course the sum divided by the count
- Given these values the RSS can also be calculated by
- RSS = ySumSquared - (2 * yMean * ySum) + (count * yMean²)
- With this formula to calculate the RSS, the wikipedia's formula can be solved
- RSS1 = yTotalSumSquared - (2 * yTotalMean * yTotalSum) + (totalCount * yTotalMean²)
- RSS21 = yLeftSumSquared - (2 * yLeftMean * yLeftSum) + (leftCount * yLeftMean²)
- RSS22 = yRightSumSquared - (2 * yRightMean * yRightSum) + (rightCount * yRightMean²)
- RSS2 = RSS21 + RSS22
- Fcalc = (RSS1 - RSS2) / (RSS2 / (totalCount - 2))
- Finally, a split should be introducted when the statistics before and after the split are shown to be significantly different which is the case if (Fcalc >= Fcrit), where Fcrit is the critical value from the F distribution table for degrees of freedom 1

**Planning**

- Write everything relevant from this blog into the Latex draft already
- Think about the names of all 4 combinations of algorithms
- Implement TLS taking the regression tree component in a multi-step environment. Think about the representation of the sequence of the actions fed to the TLS component (and later to the HOLOP component)