]> gitweb.factorcode.org Git - factor.git/blob - extra/machine-learning/rebalancing/rebalancing-tests.factor
more test IN: cleanup.
[factor.git] / extra / machine-learning / rebalancing / rebalancing-tests.factor
1 ! Copyright (C) 2012 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs kernel machine-learning.rebalancing math
4 math.statistics math.text.english sequences tools.test
5 math.vectors ;
6
7 { t } [
8     { 1 1 1 2 } [ [ number>text ] map ] [ ] bi
9     100,000 balance-labels nip
10     histogram values first2 - abs 3,000 <
11 ] unit-test
12
13
14 { t } [
15     { 1 1 1 2 } [ [ number>text ] map ] [ ] bi
16     { 1/10 9/10 } 100,000 skew-labels nip
17     histogram values { 10,000 90,000 } -.05 v~
18 ] unit-test