kortschak
a377c62d90
stat: add simple linear regression
2016-08-05 14:59:01 +09:30
Armadilloa16
926be36d48
ROC function
...
Produces a ROC curve either for all possible
cutoffs, or for n equally spaced cutoffs.
2016-04-26 16:05:46 +09:30
kortschak
e65a547b1f
{dist,distmv,sample,stat}: add missing copyright headers and package docs
2016-03-08 10:09:59 +10:30
Vladimir Chalupecky
5ff467937f
Remove redundant slice types from function signatures
2015-02-10 21:32:08 +09:00
btracey
3093608919
Zeroed count in Histogram so the correct answer is returned when count != nil
2015-01-10 12:42:45 -08:00
btracey
a723bc27d8
Fix Histogram implementation.
...
The former behavior of Histogram did not agree with the documentation. The documentation matched
the spirit of floats.Within, so keep the documentation and fix the behavior. This change updates
the function behavior, as well as corrects the test and the example.
2015-01-10 10:41:15 -08:00
Jonathan J Lawlor
37fb643151
Merge pull request #19 from gonum/covariance-matrix
...
CovarianceMatrix function
2014-12-26 08:58:45 -05:00
Jonathan J Lawlor
fb2fe6268d
fix weighted covariance implementation
...
Weighted covariance accidentally used squared weights. Added a test
case and fixed implementation.
2014-12-23 21:41:15 -05:00
Jonathan J Lawlor
2ce22f9385
update Correlation godoc and comments
...
as discussed
2014-11-15 00:51:58 -05:00
Jonathan J Lawlor
007b3e00f6
fix punctuation in Variance godoc
2014-11-14 17:49:36 -05:00
Jonathan J Lawlor
1be4dbe329
improve comments in correlation
2014-11-14 15:31:11 -05:00
Jonathan J Lawlor
062f132f95
improve citation comment
2014-11-14 15:30:36 -05:00
Jonathan J Lawlor
f3c5d5f73a
split out mean formula into its own line
2014-11-14 15:17:40 -05:00
Jonathan J Lawlor
9bbef05726
lens -> lengths
2014-11-14 11:32:41 -05:00
Jonathan J Lawlor
1ec3bdcfd9
Fix formatting in MeanVariance godoc
2014-11-14 11:32:25 -05:00
Jonathan J Lawlor
2a1b746881
rename mean and variance variables
2014-11-14 11:15:00 -05:00
Jonathan J Lawlor
cb9229f2d7
make return from MeanStdDev clearer
2014-11-14 11:09:44 -05:00
Jonathan J Lawlor
189f14fe6e
move comment in MeanVariance
2014-11-14 11:05:39 -05:00
Jonathan J Lawlor
cbcf380d18
add comments about two-pass correction
2014-11-14 11:04:48 -05:00
Jonathan J Lawlor
19a293ddf5
remove unneeded Skew comment
2014-11-14 10:57:01 -05:00
Jonathan J Lawlor
1165d7d844
remove unneeded ExKurtosis comment
2014-11-14 10:56:40 -05:00
Jonathan J Lawlor
a766f2b2b7
comment for source of covariance algo
2014-11-14 00:07:45 -05:00
Jonathan J Lawlor
530d3d8d07
comment for source of correlation algo
2014-11-14 00:07:31 -05:00
Jonathan J Lawlor
0dfa0ae36f
run go fmt
...
forgot about it
2014-11-13 23:13:13 -05:00
Jonathan J Lawlor
23e2570a5f
change MomentAbout help text
2014-11-13 23:11:54 -05:00
Jonathan J Lawlor
b999ca7a54
use two pass correction in covariance
2014-11-13 23:11:53 -05:00
Jonathan J Lawlor
94330409b6
use two pass correction in correlation
2014-11-13 23:11:53 -05:00
Jonathan J Lawlor
cf4e806f4c
Rename MomentAt -> MomentAbout
...
Change the name of MomentAt to MomentAbout, as discussed on gonum-dev.
2014-11-07 21:20:16 -05:00
Jonathan J Lawlor
de2c9e7595
Simplify Moment Sig
...
Simplify the moment function to no longer take a mean, and implement
tests.
2014-11-07 21:17:58 -05:00
Jonathan J Lawlor
cefae5e543
Simplify ExKurtosis Sig
...
Remove mean and std from the input to ExKurtosis.
2014-11-07 18:33:15 -05:00
Jonathan J Lawlor
943fa00fdc
Simplify Skew Sig
...
Simplify the Skew interface to remove dependence on mean and standard
deviation calculation.
2014-11-07 18:23:43 -05:00
Jonathan J Lawlor
d310d7322a
Simplify Correlation Sig
...
This used similar code as the Covariance function. Also, the example
was incorrect (verified via MATLAB) and had a line
`meanY := Mean(x, w)`
Which demonstrates the problem of calculating the weighted mean and
standard deviation externally.
2014-11-07 00:09:08 -05:00
Jonathan J Lawlor
c69ec6cd62
Simplify covariance sig
...
Changed covariance to remove the need to supply the means. Also
implemented the corrected two-pass method to estimate the covariance.
2014-11-06 23:00:27 -05:00
Jonathan J Lawlor
58e93505df
Add MeanStdDev function
...
This function is used to calculate both the mean and standard
deviation, which should save some calculation under most circumstances.
2014-11-06 20:51:18 -05:00
Jonathan J Lawlor
40ba293d33
simplify sig to StdDev
...
Removed the mean from the standard deviation calculation.
2014-11-06 20:45:03 -05:00
Jonathan J Lawlor
1d2d682785
implement new MeanVariance and Variance
...
Simplified Variance by removing the input mean from the sig, and
implemented a MeanVariance function which calculates the corrected
two-pass corrected sample variance. It also calculates the mean, so it
returns that as well, which should save some calculation under most
cases.
2014-11-06 20:40:10 -05:00
Jonathan J Lawlor
e9a80a0b06
Modify check on p to catch when p is NaN
...
Changed the first check to make sure that p is not NaN. Previously, it
would pass the check and could reach the “Impossible” panic depending
on the other inputs. Now it produces a “stat: percentile out of
bounds” panic.
2014-11-02 23:20:22 -05:00
Jonathan J Lawlor
1047631bc3
simplify bhattacharyyaCoeff
...
Removed unnecessary multiply by zero “shortcut.”
2014-11-02 23:00:23 -05:00
Jonathan J Lawlor
29c0aab8c7
fix mistake in the doc and sig for StdScore
...
For some reason StdScore used “variance” when it should have read
“standard deviation.” None of the calculations had to be changed.
2014-10-30 23:53:30 -04:00
Jonathan J Lawlor
59a8dd5c51
reorder special cases in Quantile
...
Moved the NaN check above the Sorted check, because Sorted is false for
slices with NaN. This made the NaN code unreachable so I believe it
was unintentional.
2014-10-30 23:33:26 -04:00
Jonathan J Lawlor
67819425bf
reorder KS special cases for NaN
...
The NaN checks were evaluated after the checks for sorted inputs, and
because slices with NaNs are unsorted, the NaN checks were unreachable.
I’ve reordered them to be in line with the spirit of the code.
2014-10-30 22:50:55 -04:00
Jonathan J Lawlor
46c8ade262
Reword help for KolmogorovSmirnov
...
Reworded the first couple sentences to KS, which seemed to be sentence
fragments.
2014-10-30 22:37:23 -04:00
Jonathan J Lawlor
0c7ecf8e08
fix spelling mistake
2014-10-30 20:49:32 -04:00
Jonathan J Lawlor
19f7ba742a
simplify implementation of cross entropy
...
Changed the implementation to match the simpler flow of Entropy. This
will also result in fewer operations.
2014-10-19 21:59:35 -04:00
Jonathan J Lawlor
09110229ac
remove redundant check for nil
...
The previous conditional covers the cases where weights == nil, so
there is no need to check the converse.
2014-10-19 21:52:54 -04:00
Jonathan J Lawlor
f510cbd899
Handle NaN inputs in CDF
...
When sort.Float64sAreSorted is called, it panics on NaN inputs.
The way the code is written, there seems to be an intent that if the
input x contains a NaN, then the function should return a NaN. I
switched the order of the conditional statements so that this became
possible.
I also modified the test cases so that cases with NaN could be
evaluated.
2014-10-19 18:28:50 -04:00
Jonathan J Lawlor
c9b363350b
improve bhattacharyyaCoeff short circuit
...
Old code seemed to be a typo. There was no difference in result though.
2014-10-19 17:42:06 -04:00
Jonathan J Lawlor
ff1d7c0a89
fix spelling error CumululantKinds
...
There was a misspelling in the doc for CDF.
2014-10-19 17:06:44 -04:00
btracey
4cb368c5a0
Improved comments. Fixed special case documentation of the public comment, and added better documentation to the working
...
of the algorithm
2014-09-18 18:32:23 -07:00
btracey
13e9477173
Unreachable code path panic change
2014-09-18 17:56:14 -07:00