@postalsys/otp-detect 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scoreCandidates = scoreCandidates;
4
+ exports.detectOtp = detectOtp;
5
+ const analyze_js_1 = require("./analyze.js");
6
+ const model_js_1 = require("./model.js");
7
+ const model_data_js_1 = require("./model-data.js");
8
+ // Models already checked against FEATURE_NAMES
9
+ const checked = new WeakSet();
10
+ function scored(input, model) {
11
+ if (!checked.has(model)) {
12
+ (0, model_js_1.checkModel)(model);
13
+ checked.add(model);
14
+ }
15
+ // The same code printed several times counts once, with its best score
16
+ const best = new Map();
17
+ for (const occ of (0, analyze_js_1.analyze)(input)) {
18
+ const score = (0, model_js_1.predict)(model, occ.features);
19
+ const prev = best.get(occ.candidate.code);
20
+ if (!prev || score > prev.score) {
21
+ best.set(occ.candidate.code, { code: occ.candidate.code, raw: occ.candidate.raw, score, source: occ.source });
22
+ }
23
+ }
24
+ return [...best.values()].sort((a, b) => b.score - a.score);
25
+ }
26
+ /**
27
+ * Every code-like token in the message with its score, best first. Meant for debugging and for
28
+ * callers that want to apply their own rules.
29
+ */
30
+ function scoreCandidates(input, options = {}) {
31
+ return scored(input, options.model ?? model_data_js_1.MODEL);
32
+ }
33
+ /**
34
+ * Finds the one-time code in a parsed email, or returns null. The message is not trusted: check
35
+ * that it is authenticated (DKIM aligned with the sender) before offering the code to a user.
36
+ * Codes from an `OTP-Token` header (postal-mime `message.otp`) should be preferred when present.
37
+ */
38
+ function detectOtp(input, options = {}) {
39
+ const model = options.model ?? model_data_js_1.MODEL;
40
+ const threshold = options.threshold ?? model.threshold;
41
+ const top = scored(input, model)[0];
42
+ return top && top.score >= threshold ? top : null;
43
+ }
44
+ exports.default = { detectOtp, scoreCandidates };
@@ -0,0 +1,16 @@
1
+ /** Phrases that name a one-time code */
2
+ export declare const STRONG: RegExp;
3
+ /** Generic words for a code or secret, weaker evidence on their own */
4
+ export declare const WEAK: RegExp;
5
+ /** How a one-time code is introduced or limited: instructions, expiry, warnings */
6
+ export declare const CUE: RegExp;
7
+ /** Words that introduce the other kinds of numbers an email is full of */
8
+ export declare const NEGATIVE: RegExp;
9
+ /** Codes that are handed out but prove nothing: promotions, referrals, invitations, gifts */
10
+ export declare const PROMO: RegExp;
11
+ /** Start and end offsets of every match, sorted by start */
12
+ export declare function findAll(re: RegExp, text: string): {
13
+ start: number;
14
+ end: number;
15
+ }[];
16
+ export declare function matches(re: RegExp, text: string): boolean;
@@ -0,0 +1,287 @@
1
+ "use strict";
2
+ // Words that tell a one-time code apart from every other number in an email. The lists are hand
3
+ // written and multilingual; the model learns how much each class matters from how close it is to
4
+ // a candidate. Adding a language means adding phrases here, not retraining on its mail.
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PROMO = exports.NEGATIVE = exports.CUE = exports.WEAK = exports.STRONG = void 0;
7
+ exports.findAll = findAll;
8
+ exports.matches = matches;
9
+ function compile(phrases) {
10
+ return new RegExp(phrases.map(p => `(?:${p})`).join('|'), 'giu');
11
+ }
12
+ /** Phrases that name a one-time code */
13
+ exports.STRONG = compile([
14
+ // English
15
+ 'verification code',
16
+ 'verify code',
17
+ 'validation code',
18
+ 'security code',
19
+ 'confirmation code',
20
+ 'one[- ]time (?:pass(?:code|word)|code|pin|password|key)',
21
+ '\\botp\\b',
22
+ 'pass ?code',
23
+ 'log ?in code',
24
+ 'sign[- ]?in code',
25
+ 'access code',
26
+ 'authentication code',
27
+ 'auth code',
28
+ '\\b2fa\\b',
29
+ 'two[- ]factor',
30
+ '2-step',
31
+ 'two[- ]step',
32
+ 'temporary (?:code|password|pin)',
33
+ 'single[- ]use code',
34
+ 'guard code',
35
+ 'magic code',
36
+ 'activation code',
37
+ 'reset code',
38
+ 'recovery code',
39
+ 'device code',
40
+ 'approval code',
41
+ 'your code(?: is)?',
42
+ 'code to (?:sign|log|verify|confirm|continue|complete)',
43
+ 'enter (?:this|the following|the) code',
44
+ // Estonian
45
+ 'kinnituskood',
46
+ 'turvakood',
47
+ 'ühekordne (?:kood|parool|salasõna)',
48
+ 'sisselogimiskood',
49
+ 'kontrollkood',
50
+ 'autentimiskood',
51
+ 'verifitseerimiskood',
52
+ 'aktiveerimiskood',
53
+ 'sinu kood',
54
+ 'teie kood',
55
+ // German
56
+ 'bestätigungscode',
57
+ 'sicherheitscode',
58
+ 'einmal-?(?:code|passwort|kennwort)',
59
+ 'verifizierungscode',
60
+ 'anmeldecode',
61
+ 'ihr code',
62
+ 'zugangscode',
63
+ 'prüfcode',
64
+ // French, Spanish, Portuguese, Italian
65
+ 'code de (?:vérification|confirmation|sécurité|connexion|validation)',
66
+ 'code à usage unique',
67
+ 'votre code',
68
+ 'código de (?:verificación|verificação|seguridad|segurança|confirmación|confirmação|acceso|acesso)',
69
+ 'tu código',
70
+ 'seu código',
71
+ 'codice (?:di verifica|di sicurezza|di accesso|di conferma|otp)',
72
+ // Dutch, Nordic, Finnish
73
+ 'verificatiecode',
74
+ 'beveiligingscode',
75
+ 'inlogcode',
76
+ 'bevestigingscode',
77
+ 'verifieringskod',
78
+ 'engångskod',
79
+ 'säkerhetskod',
80
+ 'bekræftelseskode',
81
+ 'sikkerhedskode',
82
+ 'engangskode',
83
+ 'bekreftelseskode',
84
+ 'vahvistuskoodi',
85
+ 'turvakoodi',
86
+ 'kertakäyttöinen',
87
+ // Baltic, Polish, Czech
88
+ 'verifikācijas kods',
89
+ 'apstiprinājuma kods',
90
+ 'drošības kods',
91
+ 'patvirtinimo kodas',
92
+ 'saugos kodas',
93
+ 'kod weryfikacyjny',
94
+ 'kod potwierdzający',
95
+ 'kod jednorazowy',
96
+ 'ověřovací kód',
97
+ 'bezpečnostní kód',
98
+ // Russian, Ukrainian
99
+ 'код подтверждения',
100
+ 'проверочный код',
101
+ 'код для входа',
102
+ 'одноразов\\p{L}* (?:код|пароль)',
103
+ 'код безопасности',
104
+ 'ваш код',
105
+ 'код підтвердження',
106
+ // CJK, Turkish
107
+ '验证码',
108
+ '驗證碼',
109
+ '認証コード',
110
+ '確認コード',
111
+ 'ワンタイム',
112
+ '인증번호',
113
+ '인증 코드',
114
+ 'doğrulama kodu',
115
+ 'güvenlik kodu'
116
+ ]);
117
+ /** Generic words for a code or secret, weaker evidence on their own */
118
+ exports.WEAK = compile([
119
+ '\\bcodes?\\b',
120
+ '\\bkood\\b',
121
+ '\\bpin\\b',
122
+ '\\bpassword\\b',
123
+ '\\bparool\\b',
124
+ '\\bsalasõna\\b',
125
+ '\\btoken\\b',
126
+ '\\bkods\\b',
127
+ '\\bkodas\\b',
128
+ '\\bkode\\b',
129
+ '\\bkod\\b',
130
+ '\\bkoodi\\b',
131
+ '\\bcodice\\b',
132
+ '\\bcódigo\\b',
133
+ // \b only knows ASCII word characters
134
+ '(?<!\\p{L})код(?!\\p{L})',
135
+ 'コード',
136
+ '码',
137
+ '碼',
138
+ 'kontrollsõna'
139
+ ]);
140
+ /** How a one-time code is introduced or limited: instructions, expiry, warnings */
141
+ exports.CUE = compile([
142
+ '\\benter\\b',
143
+ '\\btype\\b',
144
+ '\\bpaste\\b',
145
+ 'expires?',
146
+ 'valid (?:for|until)',
147
+ '\\bminutes?\\b',
148
+ '\\bmins?\\b',
149
+ "(?:do not|don't|never) share",
150
+ "(?:did not|didn't) (?:request|try|attempt)",
151
+ 'ignore this (?:e-?mail|message)',
152
+ 'sisesta',
153
+ 'kehtib',
154
+ 'kehtiv',
155
+ 'minuti',
156
+ 'ära jaga',
157
+ 'eingeben',
158
+ 'gültig',
159
+ 'minuten',
160
+ 'nicht weiter',
161
+ 'ingres[ae]',
162
+ 'introduce',
163
+ 'válido',
164
+ 'minutos',
165
+ 'saisissez',
166
+ 'valable',
167
+ 'введите',
168
+ 'действител',
169
+ 'минут',
170
+ '分钟',
171
+ '有效'
172
+ ]);
173
+ /** Words that introduce the other kinds of numbers an email is full of */
174
+ exports.NEGATIVE = compile([
175
+ '\\border\\b',
176
+ 'invoice',
177
+ 'receipt',
178
+ 'tracking',
179
+ 'shipment',
180
+ 'parcel',
181
+ 'package',
182
+ '\\bphone\\b',
183
+ '\\btel\\b',
184
+ '\\bfax\\b',
185
+ '\\bmobile\\b',
186
+ '\\bref(?:erence)?\\b',
187
+ 'customer',
188
+ 'account (?:no|number)',
189
+ 'booking',
190
+ 'reservation',
191
+ 'ticket',
192
+ 'promo',
193
+ 'discount',
194
+ 'coupon',
195
+ 'voucher',
196
+ 'gift',
197
+ '\\bzip\\b',
198
+ 'postal',
199
+ 'price',
200
+ '\\btotal\\b',
201
+ 'amount',
202
+ '\\biban\\b',
203
+ '\\bvat\\b',
204
+ 'license',
205
+ 'serial',
206
+ '\\bid\\b',
207
+ 'member',
208
+ 'transaction',
209
+ 'tellimus',
210
+ '\\barve\\b',
211
+ 'viitenumber',
212
+ 'telefon',
213
+ 'pakk',
214
+ 'pakiautomaat',
215
+ 'kupong',
216
+ 'sooduskood',
217
+ '\\bsumma\\b',
218
+ 'kokku',
219
+ '\\bhind\\b',
220
+ 'registrikood',
221
+ 'isikukood',
222
+ 'bestellung',
223
+ 'rechnung',
224
+ 'sendungsnummer',
225
+ 'kundennummer',
226
+ 'gutschein',
227
+ 'pedido',
228
+ 'factura',
229
+ 'commande',
230
+ 'facture',
231
+ 'заказ',
232
+ 'счет'
233
+ ]);
234
+ /** Codes that are handed out but prove nothing: promotions, referrals, invitations, gifts */
235
+ exports.PROMO = compile([
236
+ 'promo',
237
+ 'discount',
238
+ 'coupon',
239
+ 'voucher',
240
+ 'referral',
241
+ '\\brefer\\b',
242
+ 'invite',
243
+ 'invitation',
244
+ '\\bgift\\b',
245
+ 'redeem',
246
+ '\\boffer\\b',
247
+ '\\bsale\\b',
248
+ '\\d+ ?% off',
249
+ '\\bfree\\b',
250
+ '\\bsave\\b',
251
+ 'share (?:your|this) code',
252
+ 'friends?',
253
+ '\\bvip\\b',
254
+ 'checkout',
255
+ 'sooduskood',
256
+ 'soodus',
257
+ 'allahindlus',
258
+ 'kinkekaart',
259
+ 'kupong',
260
+ 'tasuta',
261
+ 'gutschein',
262
+ 'rabatt',
263
+ 'empfehl',
264
+ 'descuento',
265
+ 'cupón',
266
+ 'réduction',
267
+ 'parrainage',
268
+ 'скидк',
269
+ 'промокод',
270
+ '优惠'
271
+ ]);
272
+ /** Start and end offsets of every match, sorted by start */
273
+ function findAll(re, text) {
274
+ const out = [];
275
+ re.lastIndex = 0;
276
+ for (let m = re.exec(text); m; m = re.exec(text)) {
277
+ out.push({ start: m.index, end: m.index + m[0].length });
278
+ if (m[0].length === 0) {
279
+ re.lastIndex++;
280
+ }
281
+ }
282
+ return out;
283
+ }
284
+ function matches(re, text) {
285
+ re.lastIndex = 0;
286
+ return re.test(text);
287
+ }
@@ -0,0 +1,2 @@
1
+ import type { Model } from './model.js';
2
+ export declare const MODEL: Model;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MODEL = void 0;
4
+ exports.MODEL = { "version": "1", "featureNames": ["len", "digits", "upper", "lower", "isDigits", "isUpperAlpha", "isMixedCase", "kindGrouped", "kindSpaced", "kindDashedPart", "hasDash", "leadingZero", "distinctRatio", "trivialSequence", "looksYear", "colonBefore", "hashBefore", "currencyNear", "plusOrParenBefore", "digitNearby", "percentAfter", "strongBefore", "strongAfter", "weakBefore", "weakAfter", "cueBefore", "cueAfter", "negBefore", "negAfter", "strongInLine", "weakInLine", "negInLine", "strongRank", "lineLen", "aloneOnLine", "blockLen", "aloneInBlock", "fontSize", "fontRatio", "isLargestFont", "bold", "letterSpacing", "link", "heading", "mono", "hidden", "quoted", "relPosition", "fromHtml", "occurrences", "inOtherDoc", "inSubject", "subjectStrong", "subjectWeak", "subjectNeg", "docStrong", "docCue", "docLen", "candidates", "distinctCodes", "candidateIndex", "promoBefore", "promoAfter", "promoInLine", "docPromo", "subjectPromo", "vowelRatio", "longestLetterRun", "caseChanges"], "trees": [{ "feature": [36, 21, 24, 57, 58, 37], "threshold": [1.0000000180025095e-35, 34.50000000000001, 38.50000000000001, 7.135289099297014, 12.500000000000002, 15.875000000000002], "left": [1, -1, 3, -2, 5, -5], "right": [4, 2, -4, -3, -7, -6], "leaves": [3.8882785241515254, 0.7450066803648863, -5.441726646764886, -5.411048231323532, -3.9141191158872726, 5.01409297957159, -3.840143317873001] }, { "feature": [26, 66, 4, 21, 60, 34], "threshold": [126.50000000000001, 0.23303167420814483, 1.0000000180025095e-35, 34.50000000000001, 1.5000000000000002, 1.0000000180025095e-35], "left": [1, -1, 3, 4, -3, -5], "right": [2, -2, -7, 5, -4, -6], "leaves": [0.1126007182736782, -0.12421089923237993, -0.1984394335237441, -1.5731304755560664, -0.06372182184129996, -0.42017673070320705, -0.02206959856470396] }, { "feature": [1, 27, 15, 47, 24, 33], "threshold": [5.500000000000001, 999.5000000000001, 1.0000000180025095e-35, 0.9650398775634544, 999.5000000000001, 18.500000000000004], "left": [-1, -2, 3, -3, -5, -6], "right": [1, 2, 4, -4, 5, -7], "leaves": [-0.07759967722810494, -0.06941017101129604, 0.05458438762122539, 1.19156752970599, 0.18372429232440352, 2.4911293337044587, 0.024162786766842886] }, { "feature": [1, 0, 15, 59, 24, 33], "threshold": [5.500000000000001, 7.500000000000001, 1.0000000180025095e-35, 11.500000000000002, 61.50000000000001, 7.500000000000001], "left": [-1, 2, -2, 4, -3, -5], "right": [1, -7, 3, 5, -4, -6], "leaves": [-0.07504114626038838, 0.06751516585398959, 0.05001106412315731, 0.6047162107474564, 1.312434218931232, -0.1021531598035458, -0.09137615054500225] }, { "feature": [66, 36, 58, 21, 24, 37], "threshold": [0.23303167420814483, 1.0000000180025095e-35, 12.500000000000002, 99.50000000000001, 6.500000000000001, 15.875000000000002], "left": [-1, -2, 3, -3, -4, -5], "right": [1, 2, -7, 4, 5, -6], "leaves": [0.007892574376598205, -0.08732521964832854, 0.03833037795008976, 0.004166289829066903, -0.03987093062623498, -3.501125334526686, -0.009934098411525642] }, { "feature": [1, 0, 27, 24, 23, 62], "threshold": [5.500000000000001, 7.500000000000001, 999.5000000000001, 45.50000000000001, 1.5000000000000002, 493.50000000000006], "left": [-1, 2, -2, -3, -4, -5], "right": [1, -7, 3, 4, 5, -6], "leaves": [-0.06872355731753936, -0.06599071768579139, 0.08167518243047872, 2.6357770014731283, 1.6662534866490082, 0.19739571524460686, -0.09737872390589672] }, { "feature": [26, 66, 1, 32, 0, 24], "threshold": [126.50000000000001, 0.23303167420814483, 5.500000000000001, 1.0000000180025095e-35, 7.500000000000001, 61.50000000000001], "left": [1, -1, -3, 4, 5, -4], "right": [2, -2, 3, -7, -6, -5], "leaves": [0.10299837183336742, -0.10710978889126244, -0.08213993606622053, 0.05944244665049382, 0.40219890890858934, -0.2014740452083119, -0.05497681315633671] }, { "feature": [26, 66, 1, 32, 0, 47], "threshold": [126.50000000000001, 0.23303167420814483, 5.500000000000001, 1.0000000180025095e-35, 7.500000000000001, 0.8764291360082893], "left": [1, -1, -3, 4, -4, -5], "right": [2, -2, 3, -7, 5, -6], "leaves": [0.10160997285571788, -0.09372831225017127, -0.07821833269440398, 0.18019265884749647, -0.08567835979205224, -1.368924016442686, -0.05604101310649145] }, { "feature": [26, 66, 35, 37, 59, 4], "threshold": [112.50000000000001, 0.23303167420814483, 7.500000000000001, 14.833333333333334, 1.5000000000000002, 1.0000000180025095e-35], "left": [1, 2, 3, -1, 5, -5], "right": [4, -4, -3, -2, -7, -6], "leaves": [1.2240462320244645, 0.19485874696993366, 0.06963043138873647, -0.08743760672871598, -0.11487373646697524, 0.17786871543080954, -0.06252483446910619] }, { "feature": [1, 26, 66, 0, 25, 27], "threshold": [5.500000000000001, 62.50000000000001, 0.09307359307359309, 6.500000000000001, 36.50000000000001, 999.5000000000001], "left": [1, 2, 3, -1, -2, -6], "right": [5, -5, -4, 4, -3, -7], "leaves": [0.09920686100319741, 2.2055647928668556, 0.5744343502079821, -0.04923772113614876, -0.07500973391927501, -0.07640657396807307, 0.08190482742172149] }, { "feature": [26, 66, 15, 57, 58, 24], "threshold": [126.50000000000001, 0.23303167420814483, 1.0000000180025095e-35, 7.03922194562531, 12.500000000000002, 1.5000000000000002], "left": [1, -1, -3, 4, -4, -5], "right": [2, -2, 3, -7, 5, -6], "leaves": [0.10189554924360399, -0.07817335522007458, -0.06720260976787838, 0.09671661572530338, 2.311134435707112, 0.2548018106991937, -0.08047615818714456] }, { "feature": [1, 32, 2, 27, 15, 47], "threshold": [5.500000000000001, 3.5000000000000004, 1.0000000180025095e-35, 63.50000000000001, 1.0000000180025095e-35, 0.021647121341401235], "left": [-1, 2, 3, -2, 5, -3], "right": [1, -7, -6, 4, -5, -4], "leaves": [-0.06154257674100843, -0.12434733173764233, 0.35144791990997937, 0.054350758304896954, 0.1934966198566453, -0.24226422743098383, -0.062436387441639554] }, { "feature": [1, 23, 64, 27, 4, 7], "threshold": [5.500000000000001, 3.5000000000000004, 1.0000000180025095e-35, 999.5000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, -1, -4, -5, -6], "right": [3, -3, -2, 4, 5, -7], "leaves": [0.09965296023925137, -0.14972566214187402, -0.06840951217525097, -0.07285545089362043, -0.1134311771839358, 0.12880730943877391, -0.006609826494015588] }, { "feature": [1, 26, 66, 0, 26, 0], "threshold": [5.500000000000001, 64.50000000000001, 0.09307359307359309, 4.500000000000001, 49.50000000000001, 7.500000000000001], "left": [1, 2, 3, -1, -2, -6], "right": [5, -5, -4, 4, -3, -7], "leaves": [0.028412839988885052, 0.2175500793131116, 1.1043248730438133, -0.02692760458849532, -0.0780118670868647, 0.07523651987557553, -0.0655533135320026] }, { "feature": [1, 26, 66, 0, 0, 27], "threshold": [5.500000000000001, 64.50000000000001, 0.09307359307359309, 4.500000000000001, 7.500000000000001, 999.5000000000001], "left": [1, 2, 3, -1, 5, -5], "right": [4, -4, -3, -2, -7, -6], "leaves": [-0.0064563479783610435, 0.31431776572782494, -0.03717117089491167, -0.07277272171412301, -0.056573765881990715, 0.0959178323592945, -0.0780911624958964] }, { "feature": [26, 59, 24, 21, 21, 36], "threshold": [126.50000000000001, 1.5000000000000002, 8.500000000000002, 34.50000000000001, 161.50000000000003, 1.0000000180025095e-35], "left": [-1, -2, -3, -4, -5, -6], "right": [1, 2, 3, 4, 5, -7], "leaves": [0.066404928582682, 0.08204884163723153, 0.029032661150688418, -0.1999408304251821, 0.0994336785862256, -0.04871236469035129, -0.1962238472924949] }, { "feature": [23, 47, 32, 66, 28, 21], "threshold": [3.5000000000000004, 0.5373804904526719, 1.0000000180025095e-35, 0.22649572649572652, 1.5000000000000002, 32.50000000000001], "left": [1, -1, 3, 4, -3, -6], "right": [2, -2, 5, -5, -4, -7], "leaves": [0.08960577022513644, -0.20318676203570957, -0.9558776484781432, 0.05395194124094868, -0.07925934461384149, -0.32741340640579747, -0.056026457674541376] }, { "feature": [1, 23, 32, 4, 7, 0], "threshold": [5.500000000000001, 5.500000000000001, 3.5000000000000004, 1.0000000180025095e-35, 1.0000000180025095e-35, 6.500000000000001], "left": [1, -1, 3, -3, -4, -5], "right": [2, -2, -7, 4, 5, -6], "leaves": [0.037756191332697336, -0.06442776877331292, -0.14195536202038458, 0.11608449981302177, 0.05844737352004832, -0.19326875490821552, -0.06225072348651393] }, { "feature": [26, 66, 26, 47, 59, 15], "threshold": [64.50000000000001, 0.23303167420814483, 59.50000000000001, 0.24283756819256988, 10.500000000000002, 1.0000000180025095e-35], "left": [1, 2, -1, 4, -2, -6], "right": [5, -5, 3, -4, -3, -7], "leaves": [0.09219292790873983, 1.3651090301810682, -0.040223510564347, 0.020860732572945597, -0.06284893358533923, -0.059200871293507144, 0.04186470687175297] }, { "feature": [1, 26, 60, 27, 4, 7], "threshold": [5.500000000000001, 64.50000000000001, 2.5000000000000004, 999.5000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, -1, -4, -5, -6], "right": [3, -3, -2, 4, 5, -7], "leaves": [0.08908618688260965, -0.09180719761503389, -0.06213908814259531, -0.07114465622907888, -0.11386310944885634, 0.10876154656321105, -0.011057817987156961] }, { "feature": [32, 66, 46, 47, 12, 57], "threshold": [1.0000000180025095e-35, 0.19375000000000003, 1.0000000180025095e-35, 0.23951243972043904, 0.8377192982456142, 7.135289099297014], "left": [1, 2, -1, 4, 5, -4], "right": [3, -3, -2, -7, -6, -5], "leaves": [0.07434953764932464, -0.22832215229334377, -0.06057078378685696, 0.1179606873710729, -0.06344751544559568, -0.05976394564244935, -0.0837462086079242] }, { "feature": [1, 68, 0, 19, 33, 59], "threshold": [5.500000000000001, 1.5000000000000002, 6.500000000000001, 1.0000000180025095e-35, 7.500000000000001, 1.5000000000000002], "left": [1, -1, 3, -3, -5, -6], "right": [2, -2, 4, -4, 5, -7], "leaves": [-0.057623953372950766, 0.06585226759705046, 0.10278825782275168, -0.08889737742421501, -1.1334521458844797, 0.0951416294428382, -0.0770824372436653] }, { "feature": [57, 47, 19, 58, 33, 15], "threshold": [7.03922194562531, 0.27963990580994635, 1.0000000180025095e-35, 12.500000000000002, 8.500000000000002, 1.0000000180025095e-35], "left": [1, 2, 3, -1, -2, -5], "right": [-7, 5, -4, 4, -3, -6], "leaves": [0.05358684852052689, 0.3129165349477694, -0.06862743021099345, -0.10764930120372439, -0.090686647058134, 0.05506341438509954, -0.0676155809323791] }, { "feature": [57, 19, 66, 28, 33, 58], "threshold": [7.03922194562531, 1.0000000180025095e-35, 0.19375000000000003, 1.5000000000000002, 6.500000000000001, 12.500000000000002], "left": [1, 2, 3, -1, 5, -5], "right": [4, -4, -3, -2, -7, -6], "leaves": [-0.6558076502547069, 0.07664822186949886, -0.04235159436577181, -0.09992037852414926, -0.08768447167185009, 0.15528007285850096, -0.07781255708569702] }, { "feature": [15, 26, 60, 10, 27, 1], "threshold": [1.0000000180025095e-35, 124.50000000000001, 2.5000000000000004, 1.0000000180025095e-35, 63.50000000000001, 7.500000000000001], "left": [1, 2, -1, 4, -4, -5], "right": [3, -3, -2, -7, 5, -6], "leaves": [0.06979067358715776, -0.07345337225638991, -0.06097075708454647, -0.11202665588836563, 0.08267576214814058, 0.30926312478829376, -0.16890759712017112] }, { "feature": [1, 47, 57, 32, 2, 19], "threshold": [5.500000000000001, 0.27963990580994635, 7.161233954801744, 3.5000000000000004, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, -1, 4, 5, -4], "right": [3, -3, -2, -7, -6, -5], "leaves": [0.01751149054225924, -0.08993164338177552, -0.07935919273340909, 0.08390145728011433, -0.12076453116283524, -0.14990374762734607, -0.06487124965039141] }, { "feature": [57, 47, 15, 33, 37, 47], "threshold": [7.03922194562531, 0.4117764591662804, 1.0000000180025095e-35, 27.500000000000004, 12.733333333333336, 0.9650398775634544], "left": [1, 2, 3, 4, -1, -6], "right": [5, -5, -4, -3, -2, -7], "leaves": [0.23424769764559913, -0.06962727561898344, 0.052979979511953726, 0.10259306278664454, -0.0852862607604364, -0.07719535636836007, 0.06717025249828514] }, { "feature": [32, 66, 19, 46, 27, 28], "threshold": [2.5000000000000004, 0.19375000000000003, 1.0000000180025095e-35, 1.0000000180025095e-35, 7.500000000000001, 1.5000000000000002], "left": [1, 2, 3, 4, -1, -2], "right": [-7, -6, -5, -4, 5, -3], "leaves": [-0.4401506421727761, -0.3758183879022651, 0.07538137191230561, -0.1581801691142029, -0.0992274062347659, -0.04969484506649975, -0.0647374136030192] }, { "feature": [23, 33, 58, 37, 60, 21], "threshold": [3.5000000000000004, 6.500000000000001, 12.500000000000002, 14.533333333333335, 1.0000000180025095e-35, 34.50000000000001], "left": [-1, 2, 3, -2, -5, -6], "right": [1, 4, -4, -3, 5, -7], "leaves": [0.05598885169780791, 0.27996623696971656, -0.060326811092347145, 0.1502300064690269, 0.006085497044623135, -0.1521251857669204, -0.059272076679060585] }, { "feature": [57, 19, 4, 10, 22, 28], "threshold": [7.161233954801744, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 228.50000000000003, 113.50000000000001], "left": [1, 2, 3, -1, -3, -4], "right": [-7, -6, 4, -2, 5, -5], "leaves": [0.009755584619502334, -0.0989623852058285, 0.16081577553581394, -0.18608749117098838, 0.061516845253612375, -0.09018447332247613, -0.0661020929621987] }, { "feature": [47, 66, 59, 32, 36, 66], "threshold": [0.27963990580994635, 0.3141447368421053, 14.500000000000002, 1.0000000180025095e-35, 1.0000000180025095e-35, 0.23303167420814483], "left": [1, 2, -1, -4, -5, -6], "right": [3, -3, -2, 4, 5, -7], "leaves": [0.057566742055772224, -0.08922362761585802, -0.0718201135134225, 0.0025675715080955897, -0.06399606110381506, -0.6641985465710717, -0.07472484295731903] }, { "feature": [32, 26, 66, 24, 27, 4], "threshold": [2.5000000000000004, 126.50000000000001, 0.24500000000000002, 40.50000000000001, 999.5000000000001, 1.0000000180025095e-35], "left": [1, 2, 3, -1, -4, -5], "right": [-7, 4, -3, -2, 5, -6], "leaves": [0.06925558463778991, 0.2137127688678084, -0.03750020012524384, -0.08550688737620811, -0.03261772015167017, 0.05035648150280532, -0.06566432146815211] }, { "feature": [15, 26, 51, 10, 61, 27], "threshold": [1.0000000180025095e-35, 124.50000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35, 195.50000000000003, 7.500000000000001], "left": [1, -1, -2, 4, -4, -5], "right": [3, 2, -3, -7, 5, -6], "leaves": [0.0348318647136811, -0.06250760222801012, 0.029205535223966496, -0.17085542391073005, -0.35258062116254785, 0.09103282765558078, -0.12541961566659515] }, { "feature": [26, 60, 62, 1, 32, 27], "threshold": [126.50000000000001, 2.5000000000000004, 274.50000000000006, 7.500000000000001, 1.0000000180025095e-35, 999.5000000000001], "left": [1, 2, -1, -2, 5, -5], "right": [4, -4, 3, -3, -7, -6], "leaves": [-0.16178169643699583, 0.07365961942357419, 0.41729421143182654, -0.05540119835640085, -0.11290407177450262, 0.019315831017100053, -0.062051040721758516] }, { "feature": [15, 23, 47, 10, 61, 27], "threshold": [1.0000000180025095e-35, 2.5000000000000004, 0.9650398775634544, 1.0000000180025095e-35, 195.50000000000003, 9.500000000000002], "left": [1, -1, -2, 4, -4, -5], "right": [3, 2, -3, -7, 5, -6], "leaves": [0.04971293792383504, -0.055037359265942144, 0.08040938623863597, -0.17502033264530406, -0.310966212902868, 0.08475456540884609, -0.12092114683511633] }, { "feature": [57, 47, 66, 9, 28, 15], "threshold": [7.105375788875558, 0.30607496322475586, 0.23303167420814483, 1.0000000180025095e-35, 41.50000000000001, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -5], "right": [-7, 5, -4, -3, -2, -6], "leaves": [-0.13894014550925401, 0.07956602460949719, -0.09305231683695038, -0.03819325573873313, -0.08448649177060641, 0.02010627320468523, -0.06502538663804693] }, { "feature": [15, 26, 27, 2, 33, 46], "threshold": [1.0000000180025095e-35, 109.50000000000001, 52.50000000000001, 1.0000000180025095e-35, 16.500000000000004, 1.0000000180025095e-35], "left": [1, -1, 3, 4, -3, -6], "right": [2, -2, 5, -5, -4, -7], "leaves": [0.03646603338626971, -0.04541071789008581, -0.7134351168486657, -0.06743561102627137, -0.00966088050960154, 0.07832994223873896, -0.10855121601142415] }, { "feature": [66, 19, 10, 0, 47, 51], "threshold": [0.3141447368421053, 1.0000000180025095e-35, 1.0000000180025095e-35, 4.500000000000001, 0.5124871214906269, 1.0000000180025095e-35], "left": [1, 2, 3, -1, -2, -3], "right": [-7, -6, -5, 4, 5, -4], "leaves": [-0.05816458193741963, 0.06973115674450324, -0.13801828704146232, 0.12883470421473942, -0.08797945240948381, -0.07696676473216843, -0.0708019613547252] }, { "feature": [23, 29, 35, 58, 55, 60], "threshold": [5.500000000000001, 1.0000000180025095e-35, 6.500000000000001, 12.500000000000002, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, -1, 3, 4, -3, -6], "right": [2, -2, 5, -5, -4, -7], "leaves": [0.07382658334349206, -0.08658457800458431, -0.12582766762506523, 0.062195951787542406, 0.13084689351938403, -0.001482902207272549, -0.0642180994247988] }, { "feature": [57, 47, 66, 19, 15, 47], "threshold": [7.161233954801744, 0.25068184579375535, 0.3141447368421053, 1.0000000180025095e-35, 1.0000000180025095e-35, 0.9650398775634544], "left": [1, 2, 3, -1, -4, -6], "right": [5, 4, -3, -2, -5, -7], "leaves": [0.07302991129780508, -0.08858871101188741, -0.06467915066931458, -0.0682005130940633, 0.030761229751698017, -0.08240237651428452, 0.08449121727504949] }, { "feature": [23, 47, 62, 15, 32, 24], "threshold": [3.5000000000000004, 0.4864079431259541, 331.50000000000006, 1.0000000180025095e-35, 1.0000000180025095e-35, 8.500000000000002], "left": [1, 2, -1, -2, -5, -6], "right": [4, -4, 3, -3, 5, -7], "leaves": [-0.11336560310558484, 0.05842325855657724, 0.19103881742630577, -0.08402468915436682, 0.006863914086355049, 0.018684146204621617, -0.07647328502080415] }, { "feature": [57, 19, 66, 26, 57, 58], "threshold": [7.161233954801744, 1.0000000180025095e-35, 0.3141447368421053, 276.50000000000006, 9.271764540198037, 2.5000000000000004], "left": [1, 2, 3, -1, 5, -5], "right": [4, -4, -3, -2, -7, -6], "leaves": [0.08378018192501155, 0.013795851941120419, -0.047547565902073034, -0.08191104532402872, 0.05009566988297302, -0.10367547427283873, 0.023465232331418378] }, { "feature": [57, 47, 66, 19, 33, 58], "threshold": [7.03922194562531, 0.4037047092129378, 0.23303167420814483, 1.0000000180025095e-35, 6.500000000000001, 13.500000000000002], "left": [1, 2, 3, -1, 5, -5], "right": [4, -4, -3, -2, -7, -6], "leaves": [0.0656492668450338, -0.08493843452031948, -0.027917204223487303, -0.048963497870196784, -0.07139438006470125, 0.10050876334132833, -0.07413836530892778] }, { "feature": [0, 66, 46, 28, 68, 19], "threshold": [4.500000000000001, 0.14835164835164838, 1.0000000180025095e-35, 115.50000000000001, 4.500000000000001, 1.0000000180025095e-35], "left": [-1, 2, 3, 4, -2, -4], "right": [1, -7, -6, 5, -3, -5], "leaves": [-0.07356890051494584, -0.10939003510128767, 0.5815499681354473, 0.05868816667603678, -0.07308907695906829, -0.1267715671853657, -0.03594803349816887] }, { "feature": [23, 47, 59, 47, 57, 57], "threshold": [5.500000000000001, 0.5124871214906269, 1.5000000000000002, 0.27196057539271273, 7.161233954801744, 6.296187660686791], "left": [1, 2, -1, 4, 5, -4], "right": [3, -3, -2, -7, -6, -5], "leaves": [0.22511381423080723, 0.04735054437787416, -0.08778891888186119, -0.09725624721870497, 0.03768093581750734, -0.09374461457341503, -0.05686695331465043] }, { "feature": [32, 61, 19, 4, 27, 27], "threshold": [2.5000000000000004, 195.50000000000003, 1.0000000180025095e-35, 1.0000000180025095e-35, 52.50000000000001, 74.50000000000001], "left": [1, -1, 3, -2, -3, -4], "right": [-7, 2, -6, 4, 5, -5], "leaves": [-0.1090648866956703, -0.0030489127685156734, -0.18541370946973912, 0.4995514893967301, 0.05774412332316734, -0.07750126687032634, -0.05531697681641162] }, { "feature": [32, 64, 23, 60, 47, 28], "threshold": [2.5000000000000004, 1.5000000000000002, 45.50000000000001, 2.5000000000000004, 0.8471308669361834, 110.50000000000001], "left": [1, 2, 3, 4, -1, -4], "right": [-7, -6, 5, -3, -2, -5], "leaves": [0.06806864963022285, -0.11078271927964552, -0.08819895556866013, -0.1385804985266982, 0.005941411845186218, -0.08090394083380606, -0.06252418952468115] }, { "feature": [23, 47, 33, 58, 23, 47], "threshold": [5.500000000000001, 0.5338739559273793, 6.500000000000001, 12.500000000000002, 81.50000000000001, 0.23951243972043904], "left": [1, -1, 3, 4, -3, -6], "right": [2, -2, 5, -5, -4, -7], "leaves": [0.06568127894032198, -0.07758947523211458, 0.06397532795170702, -0.10844654083571292, 0.12135916926637214, -0.003620467935606857, -0.07068435590599902] }, { "feature": [57, 47, 47, 66, 19, 52], "threshold": [7.03922194562531, 0.5124871214906269, 0.5052812090510405, 0.4058823529411765, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -4], "right": [-7, -6, 5, -3, -2, -5], "leaves": [0.045920202141232415, -0.08439436636944257, -0.07825147352897294, -0.10285072985232331, 1.5397512455492057, -0.06553726215881982, -0.04883285008204764] }, { "feature": [64, 26, 32, 10, 66, 47], "threshold": [1.5000000000000002, 64.50000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35, 0.32738095238095244, 0.2144298424894112], "left": [1, -1, 3, 4, -2, -5], "right": [-7, 2, 5, -4, -3, -6], "leaves": [0.054625349928682926, 0.042088716208020835, -0.05557295525778616, -0.0853820835383351, 0.01738711235003938, -0.08279623261999174, -0.0750420324199465] }, { "feature": [0, 0, 27, 12, 10, 25], "threshold": [4.500000000000001, 6.500000000000001, 999.5000000000001, 0.9722222222222223, 1.0000000180025095e-35, 30.500000000000004], "left": [-1, 2, -2, -3, 5, -5], "right": [1, 4, 3, -4, -7, -6], "leaves": [-0.0665084641348372, -0.06773756865558639, 0.08213061523231961, 0.008707273660892237, 0.0959946494141683, -0.018721755428611882, -0.10657264877227242] }, { "feature": [57, 47, 66, 57, 55, 35], "threshold": [7.105375788875558, 0.29496235798369014, 0.3141447368421053, 6.419179932041678, 1.0000000180025095e-35, 14.500000000000002], "left": [1, 2, 3, -1, -5, -6], "right": [4, -4, -3, -2, 5, -7], "leaves": [-0.029658402777855215, 0.06613938086192943, -0.054887359012201244, -0.035191086732012294, -0.10403897389913977, 0.07011248530698093, -0.08220283050064135] }, { "feature": [57, 19, 66, 9, 12, 51], "threshold": [7.161233954801744, 1.0000000180025095e-35, 0.3141447368421053, 1.0000000180025095e-35, 0.6545092838196288, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -6], "right": [5, -5, -4, -3, -2, -7], "leaves": [-0.034769132376311934, 0.05170309773951951, -0.1275930130690831, -0.03606290362693752, -0.07573350554261978, -0.07462776404992119, 0.03403231831955719] }, { "feature": [57, 19, 66, 28, 57, 1], "threshold": [7.03922194562531, 1.0000000180025095e-35, 0.05322128851540617, 110.50000000000001, 9.271764540198037, 9.500000000000002], "left": [1, 2, 3, -1, -5, -6], "right": [4, -4, -3, -2, 5, -7], "leaves": [-0.09504765167242704, 0.05062269544677253, -0.015815146931323926, -0.07685364081523244, -0.06357540506585602, 0.028287884261936704, 0.6888178237585757] }, { "feature": [57, 15, 47, 11, 52, 47], "threshold": [7.161233954801744, 1.0000000180025095e-35, 0.30961640019262465, 1.0000000180025095e-35, 1.0000000180025095e-35, 0.9650398775634544], "left": [1, 2, -1, -2, -3, -6], "right": [5, -5, 3, 4, -4, -7], "leaves": [0.011349881486716678, -0.08328587309548648, -0.027329006235067163, 0.969334788309737, 0.05026709941096626, -0.07602320631614587, 0.062308122946342595] }, { "feature": [23, 61, 57, 57, 37, 60], "threshold": [3.5000000000000004, 195.50000000000003, 6.967438170207934, 6.419179932041678, 23.500000000000004, 42.50000000000001], "left": [1, -1, 3, 4, -3, -6], "right": [2, -2, 5, -5, -4, -7], "leaves": [-0.14244126246838626, 0.05351334719214337, -0.05266916699418466, 0.13407678598362777, 0.02810706952543965, -0.06980786255543044, 0.028913785393939795] }, { "feature": [64, 55, 23, 60, 50, 47], "threshold": [1.5000000000000002, 3.5000000000000004, 39.50000000000001, 5.500000000000001, 1.0000000180025095e-35, 0.23951243972043904], "left": [1, 2, 3, -1, -3, -4], "right": [-7, -6, 4, -2, 5, -5], "leaves": [0.055469763253896, -0.11327740638923132, -0.08187789161189149, 0.04119525926653576, -0.024940808664212215, -0.09526546992234847, -0.07143534675530075] }, { "feature": [57, 47, 47, 66, 9, 33], "threshold": [7.03922194562531, 0.5124871214906269, 0.508992752659849, 0.4058823529411765, 1.0000000180025095e-35, 6.500000000000001], "left": [1, 2, 3, 4, -1, -6], "right": [5, -5, -4, -3, -2, -7], "leaves": [0.03956807444885137, -0.09972576631374164, -0.06917864353285014, 0.6013487727699807, -0.053814039324909316, 0.021388009432454967, -0.0728623998830814] }, { "feature": [23, 47, 66, 49, 33, 57], "threshold": [5.500000000000001, 0.6038371738184855, 0.42481203007518803, 1.5000000000000002, 6.500000000000001, 7.001700788236549], "left": [1, 2, -1, 4, -4, -5], "right": [3, -3, -2, -7, 5, -6], "leaves": [0.0686946256282421, -0.12929476078452024, -0.07938701656938218, 0.04498027561682979, 0.0001475499709575572, -0.09208712032736553, -0.07225324382479294] }, { "feature": [15, 33, 55, 52, 34, 21], "threshold": [1.0000000180025095e-35, 54.50000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 999.5000000000001], "left": [1, 2, 3, -1, -3, -5], "right": [-7, 5, 4, -2, -4, -6], "leaves": [-0.09503388672800524, 0.13005073987929114, -0.053063949879391364, 0.05488906711471919, -0.07131577148837163, 0.04970456938855771, 0.03487702413773731] }, { "feature": [64, 55, 23, 0, 25, 55], "threshold": [1.0000000180025095e-35, 2.5000000000000004, 45.50000000000001, 7.500000000000001, 1.5000000000000002, 1.0000000180025095e-35], "left": [1, 2, -1, -2, -3, -6], "right": [5, -5, 3, 4, -4, -7], "leaves": [0.053249888779517945, 0.013630269275928414, 0.1953349324300138, -0.08257861174242109, -0.07637313905400941, -0.10429988067454306, -0.00023158996788614434] }, { "feature": [15, 1, 34, 59, 0, 10], "threshold": [1.0000000180025095e-35, 6.500000000000001, 1.0000000180025095e-35, 2.5000000000000004, 9.500000000000002, 1.0000000180025095e-35], "left": [1, -1, -2, 4, -3, -6], "right": [5, 2, 3, -5, -4, -7], "leaves": [-0.010106092588314512, -0.03713753330182889, -1.1984440810482242, -0.15947634307949568, -0.2045739735480087, 0.052296210006934456, -0.09644683317707477] }, { "feature": [10, 0, 66, 23, 27, 45], "threshold": [1.0000000180025095e-35, 4.500000000000001, 0.3141447368421053, 45.50000000000001, 999.5000000000001, 1.0000000180025095e-35], "left": [1, -1, 3, -2, -3, -6], "right": [5, 2, -5, 4, -4, -7], "leaves": [-0.05311426716632466, 0.05599251302302858, -0.08245232549422932, 0.02130470072708186, -0.037958469998957224, -0.09021871522466902, 0.17112828078149034] }, { "feature": [12, 0, 0, 47, 7, 15], "threshold": [0.8834841628959277, 4.500000000000001, 6.500000000000001, 0.6582909176466526, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, -1, -2, 4, 5, -3], "right": [-7, 2, 3, -6, -5, -4], "leaves": [-0.07584541412866314, 0.060307611986366055, -0.017699900370715612, 0.05493119582806558, -0.15699034823938407, -0.13153852298782437, -0.03810805012388767] }, { "feature": [26, 55, 34, 24, 67, 59], "threshold": [126.50000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35, 23.500000000000004, 2.5000000000000004, 2.5000000000000004], "left": [-1, 2, -2, -3, 5, -4], "right": [1, -7, 3, 4, -6, -5], "leaves": [0.034507825426108814, -0.013189784448939302, 0.06933212369794571, -0.6790145576677014, -0.22294408012848838, -0.07737648259326883, 0.011902762897310005] }, { "feature": [32, 10, 19, 61, 5, 27], "threshold": [2.5000000000000004, 1.0000000180025095e-35, 1.0000000180025095e-35, 195.50000000000003, 1.0000000180025095e-35, 7.500000000000001], "left": [1, 2, 3, -1, 5, -2], "right": [-7, -6, -5, 4, -4, -3], "leaves": [-0.09478256812757979, -0.20218133485057166, 0.04276519984532389, -0.03274652320844565, -0.0789625285274857, -0.05782750185282422, -0.05022540642342263] }, { "feature": [15, 47, 33, 54, 57, 51], "threshold": [1.0000000180025095e-35, 0.30607496322475586, 53.50000000000001, 1.0000000180025095e-35, 6.81728322602456, 1.0000000180025095e-35], "left": [1, 2, -1, -2, -3, -5], "right": [-7, 5, 3, 4, -4, -6], "leaves": [-0.03157612050895064, 0.03231808708089197, 1.5560974450343865, -0.03467696293975677, -0.08657997985774707, 0.05354465026677829, 0.0330842901159684] }, { "feature": [15, 52, 57, 66, 32, 10], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 6.296187660686791, 0.14835164835164838, 3.5000000000000004, 1.0000000180025095e-35], "left": [1, 2, -1, 4, -2, -6], "right": [5, -5, 3, -4, -3, -7], "leaves": [-0.10517037547887996, 0.021154515950978878, -0.0733594346640324, -0.0599980394755254, 0.0360259424693523, 0.04633868830837027, -0.09219395158752443] }, { "feature": [15, 26, 60, 33, 33, 27], "threshold": [1.0000000180025095e-35, 124.50000000000001, 42.50000000000001, 55.50000000000001, 56.50000000000001, 74.50000000000001], "left": [1, -1, 3, -2, 5, -3], "right": [-7, 2, -6, 4, -5, -4], "leaves": [0.02321531121347347, -0.06994697466218618, 1.1819292015641143, -0.04962833229388027, -0.002175621036887025, 0.045098848750256604, 0.02987214764496751] }, { "feature": [59, 47, 28, 28, 32, 59], "threshold": [14.500000000000002, 0.24283756819256988, 123.50000000000001, 457.50000000000006, 1.0000000180025095e-35, 1.5000000000000002], "left": [1, 2, -1, -2, -4, -5], "right": [-7, 4, 3, -3, 5, -6], "leaves": [-0.09291398763646469, 0.072795495317846, 0.008661260648291137, 0.009035617660385667, 0.08596519858154417, -0.07636226086027509, -0.07176505439979447] }, { "feature": [59, 55, 23, 58, 33, 21], "threshold": [13.500000000000002, 3.5000000000000004, 45.50000000000001, 12.500000000000002, 16.500000000000004, 182.50000000000003], "left": [1, 2, -1, 4, 5, -2], "right": [-7, -6, 3, -5, -4, -3], "leaves": [0.03804568803322876, 0.05055398319431177, -0.11413303635983213, 0.0073067955245285495, 0.06409246196471674, -0.08265654562241598, -0.07073080061727573] }, { "feature": [0, 12, 23, 57, 27, 0], "threshold": [4.500000000000001, 0.8834841628959277, 39.50000000000001, 9.812303809611791, 999.5000000000001, 6.500000000000001], "left": [-1, 2, 3, -2, -4, -5], "right": [1, -7, 4, -3, 5, -6], "leaves": [-0.05582559123377578, 0.05699464854011621, 0.46896520838667394, -0.07787418152186226, 0.056342954081400526, -0.02296108247481258, -0.023897077798335824] }, { "feature": [49, 55, 61, 9, 23, 0], "threshold": [1.5000000000000002, 3.5000000000000004, 195.50000000000003, 1.0000000180025095e-35, 93.50000000000001, 6.500000000000001], "left": [1, 2, -1, 4, -2, -3], "right": [-7, -6, 3, -5, 5, -4], "leaves": [-0.08291968100671238, 0.04458154941877826, 0.024809625069370844, -0.03981139320377084, -0.09087404330421725, -0.1090526448148258, -0.057269959550708294] }, { "feature": [59, 46, 19, 55, 61, 23], "threshold": [14.500000000000002, 1.0000000180025095e-35, 1.0000000180025095e-35, 3.5000000000000004, 195.50000000000003, 93.50000000000001], "left": [1, 2, 3, 4, -1, -2], "right": [-7, -6, -5, -4, 5, -3], "leaves": [-0.08725002739092548, 0.0534759072590318, 0.004114837100077459, -0.07783612194842134, -0.07282099987836714, -0.0773189394227663, -0.07287535695577706] }, { "feature": [46, 19, 66, 62, 26, 27], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 0.13961038961038963, 317.50000000000006, 126.50000000000001, 52.50000000000001], "left": [1, 2, 3, -1, -2, -3], "right": [-7, -6, -5, 4, 5, -4], "leaves": [-0.14729851722022202, 0.0712275519172924, -0.1408661658107286, 0.02504293655821277, -0.017892258964425874, -0.07136841791588693, -0.07925457708048012] }, { "feature": [32, 62, 46, 23, 57, 33], "threshold": [2.5000000000000004, 327.50000000000006, 1.0000000180025095e-35, 5.500000000000001, 6.419179932041678, 16.500000000000004], "left": [1, -1, 3, -2, 5, -3], "right": [-7, 2, -6, 4, -5, -4], "leaves": [-0.0719427852101284, 0.06211648508483878, -0.10334265080530798, -0.004711031316259633, 0.017624773693475447, -0.08079384039750687, -0.045509671371461] }, { "feature": [58, 24, 47, 57, 3, 38], "threshold": [2.5000000000000004, 190.50000000000003, 0.25068184579375535, 9.271764540198037, 1.0000000180025095e-35, 0.87749999364217], "left": [-1, 2, -2, 4, -4, -5], "right": [1, 3, -3, -7, 5, -6], "leaves": [0.035951518613654046, 0.033663485469067715, -0.03913341275086358, -0.0924545718049318, 0.6829594201457868, -0.0002812781361827625, 0.05548556957181098] }, { "feature": [0, 0, 27, 12, 7, 57], "threshold": [4.500000000000001, 6.500000000000001, 999.5000000000001, 0.9722222222222223, 1.0000000180025095e-35, 9.871506542196514], "left": [-1, 2, -2, -3, 5, -5], "right": [1, 4, 3, -4, -7, -6], "leaves": [-0.04988847571610649, -0.06600116839113528, 0.06950307512277255, 0.0021431050698827478, -0.009275860391855463, 0.2673312901128792, -0.13729474271120465] }, { "feature": [15, 11, 51, 59, 10, 27], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.5000000000000002, 1.0000000180025095e-35, 60.50000000000001], "left": [1, 2, -1, -3, 5, -5], "right": [4, 3, -2, -4, -7, -6], "leaves": [-0.0293267348637877, 0.02357009758822315, 0.2196267391201222, -0.009776432769460174, -0.05588235488434215, 0.051083208087329246, -0.07645954716530373] }, { "feature": [52, 24, 33, 26, 21, 0], "threshold": [1.0000000180025095e-35, 8.500000000000002, 8.500000000000002, 64.50000000000001, 610.5000000000001, 4.500000000000001], "left": [1, 2, -1, -3, -4, -6], "right": [5, 3, -2, 4, -5, -7], "leaves": [0.08835462960332964, -0.002309198318695629, 0.021062746871190086, 0.006377355369319946, -0.05569894759994525, -0.08252233830832223, 0.061580266925690345] }, { "feature": [26, 66, 15, 1, 26, 56], "threshold": [126.50000000000001, 0.4058823529411765, 1.0000000180025095e-35, 6.500000000000001, 947.5000000000001, 1.0000000180025095e-35], "left": [1, -1, 3, -3, -5, -6], "right": [2, -2, 4, -4, 5, -7], "leaves": [0.046388602879980645, -0.07798918912222857, -0.021852521873335536, -0.11211862318901718, -0.11501203450781415, 0.002608345263892824, 0.08579050358560697] }, { "feature": [52, 10, 25, 38, 24, 21], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 40.50000000000001, 0.8944444444444445, 8.500000000000002, 999.5000000000001], "left": [1, 2, 3, -1, -3, -6], "right": [5, -5, 4, -2, -4, -7], "leaves": [0.5938612254075671, 0.05037038166713245, 0.03762250545085841, -0.020149231924894914, -0.08129796189316701, -0.010871598198222797, 0.08221002701479856] }, { "feature": [64, 57, 33, 59, 58, 60], "threshold": [1.5000000000000002, 6.419179932041678, 16.500000000000004, 14.500000000000002, 12.500000000000002, 2.5000000000000004], "left": [1, 2, -1, 4, 5, -3], "right": [-7, 3, -2, -6, -5, -4], "leaves": [-0.09944568008797554, 0.0007164452621137613, 0.02680811757782351, -0.07260192707092808, 0.07131271175808708, -0.06769503829064254, -0.05441304648892101] }, { "feature": [49, 9, 66, 10, 23, 45], "threshold": [2.5000000000000004, 1.0000000180025095e-35, 0.3100961538461539, 1.0000000180025095e-35, 93.50000000000001, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -3], "right": [-7, -6, -5, 5, -2, -4], "leaves": [0.05189537778512531, 0.006938755716952421, -0.07544655968697805, 0.25930258655204574, -0.032101785028283245, -0.0867860139618547, -0.07563369390273555] }, { "feature": [10, 66, 47, 55, 33, 1], "threshold": [1.0000000180025095e-35, 0.4058823529411765, 0.24283756819256988, 1.0000000180025095e-35, 10.500000000000002, 5.500000000000001], "left": [1, 2, -1, 4, -2, -4], "right": [-7, -6, 3, 5, -3, -5], "leaves": [0.029350259389578616, -0.16898537001361838, -0.01756266009353016, -0.033081279420054226, 0.05947296493543816, -0.056799681723559405, -0.06013490380814605] }, { "feature": [64, 32, 14, 28, 33, 59], "threshold": [1.5000000000000002, 2.5000000000000004, 1.0000000180025095e-35, 163.50000000000003, 5.500000000000001, 10.500000000000002], "left": [1, 2, -1, 4, 5, -3], "right": [-7, 3, -2, -6, -5, -4], "leaves": [0.013486395824183376, -0.16899140837793417, -0.02322195932573283, 0.671857113600131, 0.0038466039850289777, -0.0813452579582698, -0.06831908150594053] }, { "feature": [48, 58, 60, 35, 55, 28], "threshold": [1.0000000180025095e-35, 12.500000000000002, 1.0000000180025095e-35, 16.500000000000004, 1.0000000180025095e-35, 7.500000000000001], "left": [1, -1, 3, 4, -3, -6], "right": [2, -2, 5, -5, -4, -7], "leaves": [0.0008359118183885639, 0.05544449109750395, -0.11675160798843914, 0.04852640813978659, 0.035810467100568864, 0.061420853221025085, -0.07752374560653895] }, { "feature": [57, 47, 66, 9, 66, 38], "threshold": [7.161233954801744, 0.5124871214906269, 0.3827838827838828, 1.0000000180025095e-35, 0.37171052631578955, 0.87749999364217], "left": [1, 2, 3, -1, -4, -5], "right": [-7, 4, -3, -2, 5, -6], "leaves": [0.03351208922720209, -0.08830339435241298, -0.04829904774511976, -0.07845601619101454, 0.4460830561646332, 0.014831889680627623, -0.04301323801642515] }, { "feature": [9, 64, 46, 55, 55, 1], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 3.5000000000000004, 1.0000000180025095e-35, 5.500000000000001], "left": [1, 2, 3, -1, -4, -5], "right": [-7, 4, -3, -2, 5, -6], "leaves": [0.024047135856928987, -0.0573654642125323, -0.06659646227259486, -0.09870198758710964, -0.030934023217574158, 0.07804821380194604, -0.08288274787921102] }, { "feature": [9, 61, 23, 57, 57, 51], "threshold": [1.0000000180025095e-35, 443.50000000000006, 93.50000000000001, 6.967438170207934, 6.296187660686791, 1.0000000180025095e-35], "left": [1, -1, -2, 4, -3, -5], "right": [-7, 2, 3, 5, -4, -6], "leaves": [-0.06759788937028686, 0.030592231035054714, -0.05102559110024171, 0.027832941107270755, -0.08529418786001304, 0.03848683938757119, -0.08829800026294352] }, { "feature": [52, 38, 66, 46, 19, 10], "threshold": [1.0000000180025095e-35, 1.1266025641025643, 0.3141447368421053, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, 3, 4, 5, -1], "right": [-7, -6, -5, -4, -3, -2], "leaves": [0.030897888137432612, -0.04095208057557345, -0.07441738152668152, -0.06780278608965011, -0.05356976224716972, -0.05206916971281847, 0.03991282999408732] }, { "feature": [12, 12, 23, 58, 54, 23], "threshold": [0.8834841628959277, 0.7947368421052633, 39.50000000000001, 5.500000000000001, 1.0000000180025095e-35, 999.5000000000001], "left": [1, -1, -2, 4, -4, -5], "right": [3, 2, -3, -7, 5, -6], "leaves": [-0.014087124487114312, 0.07300943013823186, 0.010904804785875183, -0.0009730598821152428, 0.010262338731257039, 0.5188597587295609, -0.054835418457913766] }, { "feature": [49, 19, 26, 33, 21, 52], "threshold": [2.5000000000000004, 1.0000000180025095e-35, 5.500000000000001, 55.50000000000001, 620.5000000000001, 1.0000000180025095e-35], "left": [1, 2, -1, 4, -2, -3], "right": [-7, -6, 3, -5, 5, -4], "leaves": [-0.1405904601566253, 0.0353158222463973, -0.038742279295380405, 0.06858090184668807, 0.03741000460827131, -0.06649488460427866, -0.07825648205540103] }, { "feature": [32, 55, 61, 23, 27, 57], "threshold": [3.5000000000000004, 3.5000000000000004, 195.50000000000003, 87.50000000000001, 68.50000000000001, 6.296187660686791], "left": [1, 2, -1, -2, -3, -4], "right": [-7, -6, 3, 4, 5, -5], "leaves": [-0.06902913071692428, 0.03610220234078403, -0.09675526471384938, -0.04708745283818383, 0.02089450485014023, -0.07756204909647653, -0.052435010097056846] }, { "feature": [14, 52, 29, 21, 35, 15], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 620.5000000000001, 55.50000000000001, 1.0000000180025095e-35], "left": [1, 2, 3, -1, 5, -2], "right": [-7, -6, -5, 4, -4, -3], "leaves": [0.045967856403360936, -0.07518665889014611, 0.004803871252856732, 0.04557463882158971, -0.054050439485158, 0.043760138341142854, -0.1206332396768644] }, { "feature": [32, 14, 35, 33, 55, 58], "threshold": [3.5000000000000004, 1.0000000180025095e-35, 166.50000000000003, 55.50000000000001, 1.0000000180025095e-35, 12.500000000000002], "left": [1, 2, 3, 4, 5, -1], "right": [-7, -6, -5, -4, -3, -2], "leaves": [-0.039114862982121745, 0.06579078543891773, 0.028139248930771188, 0.040691255989449955, -0.07364078704832985, -0.13163146506070744, -0.05770864852414012] }, { "feature": [57, 12, 9, 42, 11, 48], "threshold": [7.03922194562531, 0.5325630252100841, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, -1, 3, 4, -2, -6], "right": [5, 2, -5, -4, -3, -7], "leaves": [-0.08948146344773808, 0.021783001203715666, 0.11387136399515672, -0.05261155627941301, -0.09506850939623498, -0.0016308513471954432, -0.07516663468084787] }, { "feature": [0, 53, 57, 33, 27, 0], "threshold": [4.500000000000001, 1.0000000180025095e-35, 6.296187660686791, 16.500000000000004, 999.5000000000001, 9.500000000000002], "left": [-1, 2, 3, -2, 5, -4], "right": [1, -7, 4, -3, -6, -5], "leaves": [-0.0500949500423156, -0.13762082753555668, -0.0035290459473739204, -0.0693316460630025, 0.04315479554857195, 0.010919273471591679, 0.03381520304629908] }, { "feature": [58, 23, 24, 12, 47, 12], "threshold": [4.500000000000001, 84.50000000000001, 324.50000000000006, 0.8834841628959277, 0.7495435010441408, 0.8248081841432225], "left": [1, -1, 3, -3, -5, -6], "right": [2, -2, 4, -4, 5, -7], "leaves": [0.055196885981097954, -0.004829737366762017, 0.03191643014482319, -0.037050501235214105, -0.08898089491537428, -0.07475748889750983, 0.06894473079582351] }, { "feature": [10, 15, 57, 47, 57, 51], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 6.419179932041678, 0.27196057539271273, 7.161233954801744, 1.0000000180025095e-35], "left": [1, 2, -1, 4, -2, -4], "right": [-7, -6, 3, 5, -3, -5], "leaves": [-0.06458430443322809, 0.0364769409463944, -0.07235896493079294, -0.07030708298201536, 0.045037709866336456, 0.03112876568679676, -0.053060625549637114] }, { "feature": [58, 35, 55, 24, 21, 34], "threshold": [12.500000000000002, 16.500000000000004, 1.0000000180025095e-35, 40.50000000000001, 157.50000000000003, 1.0000000180025095e-35], "left": [1, 2, -1, -3, -4, -6], "right": [5, 3, -2, 4, -5, -7], "leaves": [-0.10196299248374392, 0.014563367740959421, -0.022173823737993772, -0.019213522037624484, 0.06448090371923221, -0.05427150568757449, 0.09249739500515237] }, { "feature": [58, 47, 11, 24, 12, 47], "threshold": [2.5000000000000004, 0.5124871214906269, 1.0000000180025095e-35, 324.50000000000006, 0.8834841628959277, 0.4309396630117687], "left": [1, 2, -1, 4, -4, -6], "right": [3, -3, -2, 5, -5, -7], "leaves": [0.030415832664251366, 0.1421953305666756, -0.04512855086988114, 0.026582077069844442, -0.02045362058991064, -0.08966257354060747, -0.005920365103800521] }, { "feature": [9, 46, 14, 0, 28, 23], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 6.500000000000001, 115.50000000000001, 3.5000000000000004], "left": [1, 2, 3, 4, -1, -3], "right": [-7, -6, -5, 5, -2, -4], "leaves": [-0.06133936161642926, 0.03779760947401344, 0.042537632770396544, -0.02409193650401112, -0.1172209753692443, -0.056335478202277134, -0.08681753361234489] }, { "feature": [14, 46, 66, 9, 42, 33], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 0.3141447368421053, 1.0000000180025095e-35, 1.0000000180025095e-35, 55.50000000000001], "left": [1, 2, 3, 4, 5, -1], "right": [-7, -6, -5, -4, -3, -2], "leaves": [0.008836226693646223, 0.05187267426040579, -0.05288446183070955, -0.09124602032810668, -0.03306556972149471, -0.06764776800919906, -0.12051370686119178] }, { "feature": [15, 0, 1, 12, 26, 23], "threshold": [1.0000000180025095e-35, 6.500000000000001, 5.500000000000001, 0.9722222222222223, 62.50000000000001, 93.50000000000001], "left": [1, 2, -1, -2, -4, -6], "right": [5, 4, 3, -3, -5, -7], "leaves": [-0.011774472900873769, 0.06862659568959252, -0.02994874278947455, 0.019140236367831947, -0.06115525364343886, 0.0485346140078491, -0.006835584895300566] }, { "feature": [62, 47, 55, 35, 36, 58], "threshold": [327.50000000000006, 0.24283756819256988, 1.0000000180025095e-35, 8.500000000000002, 1.0000000180025095e-35, 4.500000000000001], "left": [-1, -2, 3, -3, 5, -5], "right": [1, 2, 4, -4, -7, -6], "leaves": [-0.07070311896947015, 0.020661322460881253, -0.1405004528653316, -0.03506847916076633, 0.03148502783113843, -0.08021545410872127, 0.06558697285123676] }, { "feature": [55, 55, 34, 24, 24, 0], "threshold": [3.5000000000000004, 1.0000000180025095e-35, 1.0000000180025095e-35, 999.5000000000001, 23.500000000000004, 4.500000000000001], "left": [1, 2, 3, -1, -3, -5], "right": [-7, 5, 4, -2, -4, -6], "leaves": [-0.013480191268380166, 0.07089867415302513, 0.03886468876825905, -0.10908083217389056, -0.06650766283257736, 0.03252560671955649, -0.06718412171077058] }, { "feature": [59, 58, 60, 12, 35, 36], "threshold": [14.500000000000002, 12.500000000000002, 2.5000000000000004, 0.5325630252100841, 16.500000000000004, 1.0000000180025095e-35], "left": [1, 2, 3, -1, -2, -5], "right": [-7, 5, -4, 4, -3, -6], "leaves": [-0.07493191627265132, -0.016599908701146672, 0.022892863003842287, -0.0588994260522637, -0.04887823321049961, 0.09215812658310148, -0.06667503642665142] }, { "feature": [12, 35, 61, 23, 12, 33], "threshold": [0.4083333333333334, 159.50000000000003, 62.50000000000001, 93.50000000000001, 0.8834841628959277, 55.50000000000001], "left": [-1, 2, -2, 4, -3, -5], "right": [1, -7, 3, 5, -4, -6], "leaves": [-0.15962302621889218, -0.08740994001254436, 0.048677444299414036, -0.012242413567248683, -0.019591815404827195, 0.03810780873828973, -0.06515782609644717] }, { "feature": [19, 49, 26, 26, 11, 55], "threshold": [1.0000000180025095e-35, 2.5000000000000004, 5.500000000000001, 126.50000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, -1, -2, 5, -3], "right": [-7, -6, 3, 4, -5, -4], "leaves": [-0.11474440310173309, 0.034469349318738636, -0.028356529962227657, 0.020410842525437862, 0.07377329618146526, -0.07089309755406023, -0.06800327695563832] }, { "feature": [47, 58, 24, 28, 55, 0], "threshold": [0.6038371738184855, 2.5000000000000004, 92.50000000000001, 526.5000000000001, 1.0000000180025095e-35, 9.500000000000002], "left": [1, -1, 3, -2, -4, -5], "right": [-7, 2, 4, -3, 5, -6], "leaves": [0.03780645814501629, 0.03933230710961168, -0.014405212367459267, -0.08046600300114908, -0.0407070278769489, 0.06164314124213691, -0.044577513339340236] }, { "feature": [64, 27, 42, 28, 59, 33], "threshold": [1.5000000000000002, 63.50000000000001, 1.0000000180025095e-35, 457.50000000000006, 1.5000000000000002, 12.500000000000002], "left": [1, -1, 3, -2, 5, -3], "right": [-7, 2, -6, 4, -5, -4], "leaves": [-0.06835827066171522, 0.03906642940374225, -0.11020431333675124, 0.056818277441995024, -0.017127501201193666, -0.07050975214138015, -0.06538985468118423] }, { "feature": [9, 10, 42, 35, 32, 58], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 161.50000000000003, 3.5000000000000004, 4.500000000000001], "left": [1, 2, 3, 4, -1, -5], "right": [-7, 5, -4, -3, -2, -6], "leaves": [0.02213487292610965, -0.04511543494233926, -0.06645090592148875, -0.05854339120063077, 0.045048228543074664, -0.07674246782400643, -0.08975286471986178] }, { "feature": [57, 9, 12, 67, 62, 57], "threshold": [7.03922194562531, 1.0000000180025095e-35, 0.5325630252100841, 5.500000000000001, 304.50000000000006, 9.271764540198037], "left": [1, 2, -1, 4, -2, -6], "right": [5, -5, 3, -4, -3, -7], "leaves": [-0.07966963201932967, -0.09048488790340564, 0.02668418078238683, -0.026871233947548395, -0.0991713400495589, -0.04951706897210091, 0.05266350578734801] }, { "feature": [23, 12, 60, 26, 25, 27], "threshold": [93.50000000000001, 0.8834841628959277, 2.5000000000000004, 323.50000000000006, 1.5000000000000002, 67.50000000000001], "left": [1, -1, 3, -2, -5, -6], "right": [4, 2, -4, -3, 5, -7], "leaves": [0.03953325499234203, 0.05464489815296412, -0.03234532653837679, -0.08578794124422769, 0.07873032484721898, -0.09689241259466351, -0.014972512017867779] }, { "feature": [42, 9, 66, 52, 13, 14], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 0.4058823529411765, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -3], "right": [-7, -6, -5, 5, -2, -4], "leaves": [0.007141370326914734, -0.2367368821292397, 0.055715897385933334, -0.12297981050302176, -0.03936494769553142, -0.08753439627501902, -0.08009876292050049] }, { "feature": [28, 57, 38, 57, 27, 47], "threshold": [462.50000000000006, 6.419179932041678, 1.7032967032967035, 7.135289099297014, 60.50000000000001, 0.29496235798369014], "left": [1, 2, -1, 4, -3, -4], "right": [-7, 3, -2, -6, 5, -5], "leaves": [-0.09048348099484718, 0.06578592356697555, -0.04222522789055253, 0.0709019950947611, -0.008793192775898786, -0.034408231387613376, -0.009479599302392061] }, { "feature": [15, 0, 28, 14, 25, 10], "threshold": [1.0000000180025095e-35, 6.500000000000001, 110.50000000000001, 1.0000000180025095e-35, 28.500000000000004, 1.0000000180025095e-35], "left": [1, 2, -1, -2, -4, -6], "right": [5, 4, 3, -3, -5, -7], "leaves": [-0.07869704851690029, 0.016560729107616138, -0.11341919318620775, 0.042477494697748544, -0.04563888348615808, 0.029600263290242557, -0.057459179052595656] }, { "feature": [15, 1, 1, 12, 35, 23], "threshold": [1.0000000180025095e-35, 6.500000000000001, 5.500000000000001, 0.8377192982456142, 40.50000000000001, 93.50000000000001], "left": [1, 2, -1, -2, -4, -6], "right": [5, 4, 3, -3, -5, -7], "leaves": [-0.013519216542103089, 0.05508147548736619, -0.029265308445149598, -0.11183939830224006, 0.003270242341114968, 0.04115387423371933, -0.005244589097793544] }, { "feature": [14, 9, 52, 57, 37, 29], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 6.147398776793273, 14.833333333333334, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -3], "right": [-7, -6, -5, 5, -2, -4], "leaves": [0.031443881083886495, -0.07800456763892513, 0.012499396125520099, -0.037489528000531895, 0.039261837540296635, -0.09076526859585714, -0.11808928008538828] }, { "feature": [46, 14, 61, 57, 33, 35], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 195.50000000000003, 6.296187660686791, 16.500000000000004, 123.50000000000001], "left": [1, 2, -1, 4, -2, -4], "right": [-7, -6, 3, 5, -3, -5], "leaves": [-0.06940331849061372, -0.06984777201667962, 0.009414912410569534, 0.025661129591390965, -0.05602432655627248, -0.11788910414946539, -0.06105961643100756] }, { "feature": [49, 58, 35, 55, 66, 36], "threshold": [2.5000000000000004, 12.500000000000002, 16.500000000000004, 1.0000000180025095e-35, 0.21825396825396828, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -5], "right": [-7, 5, -4, -3, -2, -6], "leaves": [-0.12724175815826047, -0.000659206869847199, 0.03260894169160319, 0.015104372439595313, -0.05459648197981629, 0.08608620693732068, -0.07627702402498333] }, { "feature": [62, 46, 14, 9, 25, 27], "threshold": [327.50000000000006, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 69.50000000000001, 63.50000000000001], "left": [-1, 2, 3, 4, -2, -3], "right": [1, -7, -6, -5, 5, -4], "leaves": [-0.061879843304516374, 0.04756770259055218, -0.09150443152821426, 0.009728993800252994, -0.08456729178379908, -0.10927551460549184, -0.06325658191789256] }, { "feature": [14, 26, 55, 57, 47, 47], "threshold": [1.0000000180025095e-35, 64.50000000000001, 1.0000000180025095e-35, 7.001700788236549, 0.4117764591662804, 0.12906138031019368], "left": [1, -1, 3, 4, 5, -2], "right": [-7, 2, -6, -5, -4, -3], "leaves": [0.03145886767258915, -0.08001494115306818, 0.018851882582057167, -0.06534273169889672, -0.0780113494610091, 0.014776569015480995, -0.10675741279132263] }, { "feature": [9, 13, 66, 67, 33, 38], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 0.3141447368421053, 4.500000000000001, 16.500000000000004, 0.87749999364217], "left": [1, 2, 3, 4, -1, -4], "right": [-7, -6, 5, -3, -2, -5], "leaves": [-0.027078750462218845, 0.017088199891279167, 0.047626600192345186, 0.15956246867868093, -0.038553376703612585, -0.20864439326116557, -0.08795329473069186] }, { "feature": [49, 13, 35, 9, 42, 22], "threshold": [2.5000000000000004, 1.0000000180025095e-35, 161.50000000000003, 1.0000000180025095e-35, 1.0000000180025095e-35, 6.500000000000001], "left": [1, 2, 3, 4, -1, -2], "right": [-7, -6, -5, -4, 5, -3], "leaves": [0.014837370132048406, 0.05092543087505652, -0.07990853772307745, -0.08327792432472753, -0.06328086000674465, -0.20735734948228474, -0.07270068652349597] }, { "feature": [55, 34, 24, 58, 34, 21], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 40.50000000000001, 12.500000000000002, 1.0000000180025095e-35, 157.50000000000003], "left": [1, 2, -1, -3, 5, -5], "right": [4, 3, -2, -4, -7, -6], "leaves": [-0.033224390304262226, 0.04468500899346907, -0.09113776392544064, 0.05238326693927506, -0.03143733545969222, 0.04173889481965213, 0.05385542095392282] }, { "feature": [59, 58, 33, 55, 1, 34], "threshold": [14.500000000000002, 12.500000000000002, 16.500000000000004, 1.0000000180025095e-35, 2.5000000000000004, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -5], "right": [-7, 5, -4, -3, -2, -6], "leaves": [0.0026274086783854393, -0.11051813123791945, 0.01881161590849171, 0.010055788153827006, -0.04156074283086191, 0.0773296402267146, -0.06504443333369106] }, { "feature": [32, 42, 14, 9, 13, 10], "threshold": [4.500000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, 3, 4, 5, -1], "right": [-7, -6, -5, -4, -3, -2], "leaves": [0.01675267813636488, -0.02349349915982406, -0.1830864849091512, -0.0910286567643599, -0.10732895814140675, -0.06314725064986922, -0.06850437950257614] }, { "feature": [67, 27, 55, 27, 0, 61], "threshold": [5.500000000000001, 70.50000000000001, 2.5000000000000004, 74.50000000000001, 4.500000000000001, 999.5000000000001], "left": [1, 2, -1, -3, -4, -5], "right": [-7, 3, -2, 4, 5, -6], "leaves": [-0.0822272572649995, 0.07640440173834358, 0.18901374080181887, -0.03637420833932884, -0.05844509824911026, 0.02085475033605435, -0.037275674082427476] }, { "feature": [35, 55, 55, 64, 47, 47], "threshold": [125.50000000000001, 3.5000000000000004, 1.0000000180025095e-35, 1.0000000180025095e-35, 0.5124871214906269, 0.12906138031019368], "left": [1, 2, 3, 4, 5, -1], "right": [-7, -6, -5, -4, -3, -2], "leaves": [-0.04571156877493729, 0.029050035500697863, -0.07829377561806272, -0.08497512626320299, 0.028045487745783016, -0.05912671947487998, -0.05590395336633959] }, { "feature": [10, 66, 47, 57, 57, 55], "threshold": [1.0000000180025095e-35, 0.4058823529411765, 0.23951243972043904, 6.296187660686791, 7.161233954801744, 1.0000000180025095e-35], "left": [1, 2, 3, -1, -2, -4], "right": [-7, -6, 5, 4, -3, -5], "leaves": [-0.05160103027523836, 0.04222203821684735, -0.053195320666260926, -0.041121342183618056, 0.015723592934015693, -0.04981619708243759, -0.046992330033840686] }, { "feature": [9, 49, 42, 35, 33, 55], "threshold": [1.0000000180025095e-35, 2.5000000000000004, 1.0000000180025095e-35, 159.50000000000003, 53.50000000000001, 1.0000000180025095e-35], "left": [1, 2, 3, 4, 5, -1], "right": [-7, -6, -5, -4, -3, -2], "leaves": [-0.0154501290132098, 0.029721787770179378, 0.03708147616721745, -0.05770009187234951, -0.046521347666724146, -0.0719114886238703, -0.08580786993581256] }, { "feature": [57, 42, 47, 62, 14, 33], "threshold": [7.03922194562531, 1.0000000180025095e-35, 0.5850957756315562, 304.50000000000006, 1.0000000180025095e-35, 6.500000000000001], "left": [1, 2, 3, -1, -2, -6], "right": [5, -5, -4, 4, -3, -7], "leaves": [-0.06664914401595291, 0.0241356880476245, -0.11918300307519757, -0.040790598772934075, -0.06049410063809876, 0.015314676583334767, -0.04749691579299725] }, { "feature": [12, 23, 58, 40, 36, 28], "threshold": [0.8834841628959277, 23.500000000000004, 12.500000000000002, 1.0000000180025095e-35, 1.0000000180025095e-35, 120.50000000000001], "left": [1, -1, 3, -2, -4, -5], "right": [-7, 2, 4, -3, 5, -6], "leaves": [0.0406373586225821, -0.032783640533714506, 0.019602294774955564, -0.02904857802523969, 0.28384949531395853, 0.06687142118070664, -0.019453124973373512] }, { "feature": [10, 61, 15, 23, 56, 58], "threshold": [1.0000000180025095e-35, 62.50000000000001, 1.0000000180025095e-35, 45.50000000000001, 1.0000000180025095e-35, 4.500000000000001], "left": [1, -1, -2, 4, -3, -6], "right": [5, 2, 3, -5, -4, -7], "leaves": [-0.07694014306201134, -0.002421346994752963, 0.005231518232340576, 0.0816504750096529, -0.001169253069803018, 0.03392039281650711, -0.07863006825637558] }, { "feature": [14, 9, 10, 66, 55, 45], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 1.0000000180025095e-35, 0.32738095238095244, 1.0000000180025095e-35, 1.0000000180025095e-35], "left": [1, 2, 3, 4, -1, -4], "right": [-7, -6, 5, -3, -2, -5], "leaves": [0.0031893007703319813, 0.03726020719400596, -0.02115586563484951, -0.04725531779778508, 0.09001771752926704, -0.0820011438539232, -0.10162192627900823] }, { "feature": [26, 26, 55, 34, 24, 36], "threshold": [64.50000000000001, 5.500000000000001, 1.0000000180025095e-35, 1.0000000180025095e-35, 23.500000000000004, 1.0000000180025095e-35], "left": [1, -1, 3, -3, -4, -6], "right": [2, -2, 5, 4, -5, -7], "leaves": [-0.08157565173065187, 0.03455025180710313, -0.005858010307961508, 0.014426343083271988, -0.09789162932855798, -0.013067441079941811, 0.04465510127426936] }, { "feature": [9, 49, 57, 33, 2, 35], "threshold": [1.0000000180025095e-35, 2.5000000000000004, 6.296187660686791, 16.500000000000004, 4.500000000000001, 123.50000000000001], "left": [1, 2, 3, 4, -1, -4], "right": [-7, -6, 5, -3, -2, -5], "leaves": [-0.11329482945837457, 0.030411710486775895, 0.005387419135029038, 0.0144149513467305, -0.05216698365198278, -0.0742721626773674, -0.08759083016792224] }, { "feature": [28, 57, 57, 32, 0, 12], "threshold": [462.50000000000006, 6.419179932041678, 7.383678802485448, 1.0000000180025095e-35, 4.500000000000001, 0.4083333333333334], "left": [1, -1, -2, 4, -4, -5], "right": [3, 2, -3, -7, 5, -6], "leaves": [-0.07002838674700158, 0.03562805478050178, -0.05901713572470202, -0.0612075492594481, -0.14067440423815633, 0.01655208739865644, -0.047662192424586025] }, { "feature": [66, 46, 14, 27, 2, 27], "threshold": [0.3141447368421053, 1.0000000180025095e-35, 1.0000000180025095e-35, 72.50000000000001, 3.5000000000000004, 74.50000000000001], "left": [1, 2, 3, 4, -1, -3], "right": [-7, -6, -5, 5, -2, -4], "leaves": [-0.07627123816114995, 0.036998060599740965, 0.1688356475258014, 0.015141686531811882, -0.09914401105977448, -0.06326242089750996, -0.03182045784390515] }, { "feature": [46, 19, 26, 62, 2, 42], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 4.500000000000001, 327.50000000000006, 11.500000000000002, 1.0000000180025095e-35], "left": [1, 2, -1, 4, -2, -4], "right": [-7, -6, 3, 5, -3, -5], "leaves": [-0.10475980546495292, -0.0840031822455835, 0.06428039694321162, 0.019471146421181598, -0.042074494831860605, -0.06107099567989054, -0.057546423848175376] }, { "feature": [12, 12, 35, 24, 21, 1], "threshold": [0.8480769230769232, 0.7947368421052633, 9.500000000000002, 158.50000000000003, 93.50000000000001, 4.500000000000001], "left": [1, 2, 3, -1, -2, -4], "right": [-7, -6, 5, 4, -3, -5], "leaves": [0.027985996100476886, 0.03371667787741838, -0.1201665066346072, -0.04003491406387395, 0.01996668828259592, 0.04038666358707231, -0.02017698932275724] }, { "feature": [9, 52, 26, 67, 15, 33], "threshold": [1.0000000180025095e-35, 1.0000000180025095e-35, 64.50000000000001, 5.500000000000001, 1.0000000180025095e-35, 55.50000000000001], "left": [1, 2, 3, -1, 5, -3], "right": [-7, -6, 4, -2, -5, -4], "leaves": [0.03798005640914713, -0.04940179994762936, -0.046066443826429056, 0.010127330973295847, 0.007825660578946615, 0.029540911889766104, -0.08561632510216087] }, { "feature": [58, 12, 24, 25, 12, 51], "threshold": [4.500000000000001, 0.5536398467432951, 6.500000000000001, 40.50000000000001, 0.8429276315789475, 1.0000000180025095e-35], "left": [1, -1, -3, 4, -4, -6], "right": [2, -2, 3, 5, -5, -7], "leaves": [-0.08528982960089036, 0.020121263809007098, 0.032599563569687136, 0.08389298234048637, -0.07409586635058009, -0.046277668666205585, 0.01378724102508585] }, { "feature": [46, 59, 59, 60, 62, 37], "threshold": [1.0000000180025095e-35, 14.500000000000002, 12.500000000000002, 1.5000000000000002, 304.50000000000006, 16.350000000000005], "left": [1, 2, 3, 4, -1, -4], "right": [-7, -6, 5, -3, -2, -5], "leaves": [-0.09686697496679637, 0.015405749427248556, -0.026310810483662767, 0.08102040815408745, -0.09804290082738205, -0.06512374673817813, -0.062419120750044715] }, { "feature": [28, 57, 37, 57, 11, 57], "threshold": [462.50000000000006, 6.419179932041678, 23.500000000000004, 7.203777406559518, 1.0000000180025095e-35, 9.271764540198037], "left": [1, 2, -1, -3, 5, -5], "right": [4, 3, -2, -4, -7, -6], "leaves": [-0.0882688679934193, 0.054474550363935184, 0.03807157406245843, -0.03334293615015833, -0.01722744414339304, 0.055412857707391766, 0.05696934366149919] }, { "feature": [42, 58, 58, 58, 12, 34], "threshold": [1.0000000180025095e-35, 2.5000000000000004, 12.500000000000002, 8.500000000000002, 0.6545092838196288, 1.0000000180025095e-35], "left": [1, -1, 3, 4, -2, -5], "right": [-7, 2, 5, -4, -3, -6], "leaves": [0.02391593533583382, -0.06613027274666343, 0.007359411815788529, -0.05393854443258535, -0.04526035529697225, 0.07720150028618408, -0.05060128573916797] }, { "feature": [57, 42, 47, 55, 35, 47], "threshold": [7.400315047266914, 1.0000000180025095e-35, 0.24283756819256988, 1.0000000180025095e-35, 17.500000000000004, 0.9650398775634544], "left": [1, 2, -1, 4, -2, -6], "right": [5, -5, 3, -4, -3, -7], "leaves": [0.02104709813965308, -0.088076091768379, 0.00028024169830852215, 0.022309832665463977, -0.07367911858910085, -0.06882098430739454, 0.040254800471556] }, { "feature": [59, 28, 57, 11, 37, 34], "threshold": [14.500000000000002, 462.50000000000006, 6.419179932041678, 1.0000000180025095e-35, 14.200000000000001, 1.0000000180025095e-35], "left": [1, 2, -1, 4, 5, -3], "right": [-7, 3, -2, -6, -5, -4], "leaves": [-0.06304635255360541, 0.03000497319563819, -0.004209177447556743, 0.11778061348878804, -0.0207285525603815, 0.05091140277990587, -0.0675593029538627] }], "threshold": 0.97 };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * One tree in flat arrays. Internal node i compares feature[i] with threshold[i]: values less
3
+ * than or equal go left. A child index >= 0 is another internal node, a negative index c is the
4
+ * leaf ~c (that is -c - 1) in `leaves`.
5
+ */
6
+ export type Tree = {
7
+ feature: number[];
8
+ threshold: number[];
9
+ left: number[];
10
+ right: number[];
11
+ leaves: number[];
12
+ };
13
+ export type Model = {
14
+ version: string;
15
+ featureNames: readonly string[];
16
+ trees: Tree[];
17
+ /** Default decision threshold on the probability, picked on held-out data */
18
+ threshold: number;
19
+ };
20
+ export declare function checkModel(model: Model): void;
21
+ /** Probability that the candidate is the one-time code */
22
+ export declare function predict(model: Model, row: number[]): number;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ // Evaluates the gradient boosted trees exported by training/train.py.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.checkModel = checkModel;
5
+ exports.predict = predict;
6
+ const features_js_1 = require("./features.js");
7
+ function checkModel(model) {
8
+ const names = model.featureNames;
9
+ if (names.length !== features_js_1.FEATURE_NAMES.length || names.some((n, i) => n !== features_js_1.FEATURE_NAMES[i])) {
10
+ throw new Error('The model was trained on a different feature list than this version computes');
11
+ }
12
+ }
13
+ function evalTree(tree, row) {
14
+ if (tree.feature.length === 0) {
15
+ return tree.leaves[0] ?? 0;
16
+ }
17
+ let node = 0;
18
+ for (;;) {
19
+ const value = row[tree.feature[node]];
20
+ const next = value <= tree.threshold[node] ? tree.left[node] : tree.right[node];
21
+ if (next < 0) {
22
+ return tree.leaves[-next - 1];
23
+ }
24
+ node = next;
25
+ }
26
+ }
27
+ /** Probability that the candidate is the one-time code */
28
+ function predict(model, row) {
29
+ let sum = 0;
30
+ for (const tree of model.trees) {
31
+ sum += evalTree(tree, row);
32
+ }
33
+ return 1 / (1 + Math.exp(-sum));
34
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,18 @@
1
+ import type { Candidate } from './candidates.js';
2
+ import type { Doc } from './doc.js';
3
+ export type MessageInput = {
4
+ subject?: string | undefined;
5
+ /** The text/plain body */
6
+ text?: string | undefined;
7
+ /** The text/html body */
8
+ html?: string | undefined;
9
+ };
10
+ export type Occurrence = {
11
+ candidate: Candidate;
12
+ source: Doc['source'];
13
+ features: number[];
14
+ };
15
+ /** Bodies larger than this are cut; code notifications are a few kilobytes */
16
+ export declare const MAX_BODY_CHARS: number;
17
+ export declare function renderDocs(input: MessageInput): Doc[];
18
+ export declare function analyze(input: MessageInput): Occurrence[];
@@ -0,0 +1,36 @@
1
+ // Shared by the library and the training data dump, so that both compute features the same way.
2
+ import { extractCandidates } from './candidates.js';
3
+ import { renderText } from './doc.js';
4
+ import { candidateFeatures, docContext, messageContext } from './features.js';
5
+ import { renderHtml } from './html.js';
6
+ /** Bodies larger than this are cut; code notifications are a few kilobytes */
7
+ export const MAX_BODY_CHARS = 512 * 1024;
8
+ export function renderDocs(input) {
9
+ const docs = [];
10
+ if (input.html) {
11
+ docs.push(renderHtml(input.html.slice(0, MAX_BODY_CHARS)));
12
+ }
13
+ if (input.text) {
14
+ docs.push(renderText(input.text.slice(0, MAX_BODY_CHARS)));
15
+ }
16
+ return docs.filter(d => d.text.length > 0);
17
+ }
18
+ export function analyze(input) {
19
+ const docs = renderDocs(input);
20
+ const perDoc = docs.map(doc => ({ doc, candidates: extractCandidates(doc) }));
21
+ const distinctCodes = new Set(perDoc.flatMap(d => d.candidates.map(c => c.code))).size;
22
+ const subject = (input.subject ?? '').slice(0, 1000);
23
+ const out = [];
24
+ for (const { doc, candidates } of perDoc) {
25
+ const ctx = docContext(doc, candidates);
26
+ const otherText = docs
27
+ .filter(d => d !== doc)
28
+ .map(d => d.text)
29
+ .join('\n');
30
+ const msg = messageContext(subject, otherText, distinctCodes);
31
+ candidates.forEach((candidate, i) => {
32
+ out.push({ candidate, source: doc.source, features: candidateFeatures(ctx, msg, i) });
33
+ });
34
+ }
35
+ return out;
36
+ }
@@ -0,0 +1,14 @@
1
+ import type { Doc } from './doc.js';
2
+ export type CandidateKind = 'token' | 'dashed-part' | 'grouped' | 'spaced';
3
+ export type Candidate = {
4
+ /** The code as it would be typed: separators inside digit groups and spaced letters removed */
5
+ code: string;
6
+ /** The text as it appears in the document */
7
+ raw: string;
8
+ start: number;
9
+ end: number;
10
+ kind: CandidateKind;
11
+ };
12
+ /** Whether a token without separators looks like a code */
13
+ export declare function codeLike(core: string): boolean;
14
+ export declare function extractCandidates(doc: Doc): Candidate[];