(Vec data)
| 112 | } |
| 113 | |
| 114 | @Override |
| 115 | public void setUsingData(Vec data) |
| 116 | { |
| 117 | data = data.sortedCopy(); |
| 118 | |
| 119 | //approximate y by taking | 1st quant - 3rd quantile| |
| 120 | int n = data.length(); |
| 121 | setScale(Math.abs(data.get(n/4) - data.get(3*n/4))); |
| 122 | |
| 123 | //approximate x by taking the median value |
| 124 | //Note, technicaly, any value is equaly likely to be the true median of a chachy distribution, so we dont care about the exact median |
| 125 | setLocation(data.get(n/2)); |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * The Cauchy distribution is unique in that it does not have a mean value (undefined). |
nothing calls this directly
no test coverage detected