1 | var B = require("./base");
|
2 | var P = require("./probability");
|
3 | var S = require("./statistics");
|
4 |
|
5 | var R = B;
|
6 | B.mix(R, P);
|
7 | B.mix(R, S);
|
8 |
|
9 | module.exports = R;
|
10 |
|
11 | // var T = require("./lib/test");
|
12 | // var M = require("./lib/matrix");
|
13 | // var _ = require("lodash");
|
14 | /*
|
15 | console.log("S=", S);
|
16 |
|
17 | R.M = M;
|
18 | R.NN = require("./lib/neural");
|
19 | R.NN.RBM = require("./lib/neural/rbm");
|
20 |
|
21 | M.precision = R.precision;
|
22 | */
|
23 | /*
|
24 | console.log("mix B");
|
25 | B.mix(R, B);
|
26 | console.log("mix M");
|
27 | R.mix(R, M);
|
28 | console.log("mix S");
|
29 | R.mix(R, S);
|
30 | console.log("mix P");
|
31 | R.mix(R, P);
|
32 | console.log("mix T");
|
33 | R.mix(R, T);
|
34 | console.log("mix _");
|
35 | R.mix(R, _);
|
36 | // R.mix(R, NN);
|
37 | R.NN = NN;
|
38 | R.NN.RBM = RBM;
|
39 | */
|
40 | /*
|
41 | console.log("mix ...");
|
42 | B.mix(R, {
|
43 | samples:function(space, size, arg) {
|
44 | var arg = _.defaults(arg, {replace:true});
|
45 | if (arg.replace)
|
46 | return R.calls(size, function() { return _.sample(space); });
|
47 | else
|
48 | return _.sampleSize(space, size);
|
49 | },
|
50 | });
|
51 | // console.log("R.randomM=", R.randomM);
|
52 |
|
53 | console.log("amix");
|
54 | B.amix({
|
55 | // matrix
|
56 | rows:M.rows,
|
57 | cols:M.cols,
|
58 | row:M.row,
|
59 | col:M.col,
|
60 | tr:M.tr,
|
61 | strM:M.strM,
|
62 | not:M.not,
|
63 | bnot:M.bnot,
|
64 | neg:M.neg,
|
65 | abs:M.abs,
|
66 | sin:M.sin,
|
67 | cos:M.cos,
|
68 | tan:M.tan,
|
69 | asin:M.asin,
|
70 | acos:M.acos,
|
71 | atan:M.atan,
|
72 | inv:M.inv,
|
73 | all:M.all,
|
74 | any:M.any,
|
75 | same:M.same,
|
76 | isFinite:M.isFinite,
|
77 | isNaN:M.isNaN,
|
78 | sqrt:M.sqrt,
|
79 | ceil:M.ceil,
|
80 | floor:M.floor,
|
81 | round:M.round,
|
82 | log:M.log,
|
83 | exp:M.exp,
|
84 | pow:M.pow,
|
85 | mapreduce:M.mapreduce,
|
86 | lshifteq:M.lshifteq,
|
87 | rshifteq:M.rshifteq,
|
88 | add:M.add,
|
89 | sub:M.sub,
|
90 | mul:M.mul,
|
91 | div:M.div,
|
92 | mod:M.mod,
|
93 | and:M.and,
|
94 | or:M.or,
|
95 | xor:M.xor,
|
96 | band:M.band,
|
97 | bor:M.bor,
|
98 | bxor:M.bxor,
|
99 | eq:M.eq,
|
100 | neq:M.neq,
|
101 | geq:M.geq,
|
102 | leq:M.leq,
|
103 | lt:M.lt,
|
104 | gt:M.gt,
|
105 | t:M.t,
|
106 | det:M.det,
|
107 | norm2:M.norm2,
|
108 | norm2Squared:M.norm2Squared,
|
109 | norm2inf:M.norm2inf,
|
110 | dot:M.dot,
|
111 | det:M.det,
|
112 | dim:M.dim,
|
113 | eig:M.eig,
|
114 | LU:M.LU,
|
115 | svd:M.svd,
|
116 | sumM:M.sumM,
|
117 | rowSum:M.rowSum,
|
118 | colSum:M.colSum,
|
119 | rowMean:M.rowMean,
|
120 | colMean:M.colMean,
|
121 | addMV:M.addMV,
|
122 | mapM:M.mapM,
|
123 | mapMM:M.mapMM,
|
124 | flatM:M.flatM,
|
125 | getBlock:M.getBlock,
|
126 | setBlock:M.setBlock,
|
127 | getDiag:M.getDiag,
|
128 | diag:M.diag,
|
129 | parseFloat:M.parseFloat,
|
130 | parseDate:M.parseDate,
|
131 | parseCSV:M.parseCSV,
|
132 | toCSV:M.toCSV,
|
133 | // statistics
|
134 | max:S.max,
|
135 | min:S.min,
|
136 | sum:S.sum,
|
137 | product:S.product,
|
138 | mean:S.mean,
|
139 | range:S.range,
|
140 | unique:S.unique,
|
141 | median:S.median,
|
142 | variance:S.variance,
|
143 | deviation:S.deviation,
|
144 | sd:S.sd,
|
145 | cov:S.cov,
|
146 | cor:S.cor,
|
147 | normalize:S.normalize,
|
148 | // lodash
|
149 | chunk:_.chunk,
|
150 | compact:_.compact,
|
151 | // concat:_.concat
|
152 | difference:_.difference,
|
153 | differenceBy:_.differenceBy,
|
154 | differenceWith:_.differenceWith,
|
155 | drop:_.drop,
|
156 | dropRight:_.dropRight,
|
157 | dropRightWhile:_.dropRightWhile,
|
158 | dropWhile:_.dropWhile,
|
159 | fill:_.fill,
|
160 | findIndex:_.findIndex,
|
161 | findLastIndex:_.findLastIndex,
|
162 | flatten:_.flatten,
|
163 | flattenDeep:_.flattenDeep,
|
164 | flattenDepth:_.flattenDepth,
|
165 | fromPairs:_.fromPairs,
|
166 | head:_.head,
|
167 | indexOf:_.indexOf,
|
168 | initial:_.initial,
|
169 | intersection:_.intersection,
|
170 | intersectionBy:_.intersectionBy,
|
171 | intersectionWith:_.intersectionWith,
|
172 | // _.join
|
173 | last:_.last,
|
174 | // _.lastIndexOf
|
175 | nth:_.nth,
|
176 | pull:_.pull,
|
177 | pullAll:_.pullAll,
|
178 | pullAllBy:_.pullAllBy,
|
179 | pullAllWith:_.pullAllWith,
|
180 | pullAt:_.pullAt,
|
181 | remove:_.remove,
|
182 | // _.reverse
|
183 | // _.slice
|
184 | sortedIndex:_.sortedIndex,
|
185 | sortedIndexBy:_.sortedIndexBy,
|
186 | sortedIndexOf:_.sortedIndexOf,
|
187 | sortedLastIndex:_.sortedLastIndex,
|
188 | sortedLastIndexBy:_.sortedLastIndexBy,
|
189 | sortedLastIndexOf:_.sortedLastIndexOf,
|
190 | sortedUniq:_.sortedUniq,
|
191 | sortedUniqBy:_.sortedUniqBy,
|
192 | tail:_.tail,
|
193 | take:_.take,
|
194 | takeRight:_.takeRight,
|
195 | takeRightWhile:_.takeRightWhile,
|
196 | takeWhile:_.takeWhile,
|
197 | union:_.union,
|
198 | unionBy:_.unionBy,
|
199 | unionWith:_.unionWith,
|
200 | uniq:_.uniq,
|
201 | uniqBy:_.uniqBy,
|
202 | uniqWith:_.uniqWith,
|
203 | unzip:_.unzip,
|
204 | unzipWith:_.unzipWith,
|
205 | without:_.without,
|
206 | // _.xor
|
207 | // _.xorBy
|
208 | // _.xorWith
|
209 | zip:_.zip,
|
210 | zipObject:_.zipObject,
|
211 | zipObjectDeep:_.zipObjectDeep,
|
212 | zipWith:_.zipWith,
|
213 | // Collection
|
214 | countBy:_.countBy,
|
215 | // _.each → forEach
|
216 | // _.eachRight → forEachRight
|
217 | // every:_.every
|
218 | // filter:_.filter
|
219 | // find:_.find
|
220 | findLast:_.findLast,
|
221 | flatMap:_.flatMap,
|
222 | flatMapDeep:_.flatMapDeep,
|
223 | flatMapDepth:_.flatMapDepth,
|
224 | // _.forEach
|
225 | forEachRight:_.forEachRight,
|
226 | groupBy:_.groupBy,
|
227 | // includes:_.includes
|
228 | invokeMap:_.invokeMap,
|
229 | keyBy:_.keyBy,
|
230 | // _.map
|
231 | orderBy:_.orderBy,
|
232 | partition:_.partition,
|
233 | // _.reduce
|
234 | reduceRight:_.reduceRight,
|
235 | reject:_.reject,
|
236 | sample:_.sample,
|
237 | sampleSize:_.sampleSize,
|
238 | shuffle:_.shuffle,
|
239 | size:_.size,
|
240 | // some:_.some
|
241 | sortBy:_.sortBy,
|
242 | });
|
243 | */
|