UNPKG

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