@sparkleideas/ruv-swarm 1.0.18-patch.1
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.
- package/README.md +1565 -0
- package/bin/ruv-swarm-clean.js +1872 -0
- package/bin/ruv-swarm-memory.js +119 -0
- package/bin/ruv-swarm-secure-heartbeat.js +1549 -0
- package/bin/ruv-swarm-secure.js +1689 -0
- package/package.json +221 -0
- package/src/agent.ts +342 -0
- package/src/benchmark.js +267 -0
- package/src/claude-flow-enhanced.js +839 -0
- package/src/claude-integration/advanced-commands.js +561 -0
- package/src/claude-integration/core.js +112 -0
- package/src/claude-integration/docs.js +1548 -0
- package/src/claude-integration/env-template.js +39 -0
- package/src/claude-integration/index.js +209 -0
- package/src/claude-integration/remote.js +408 -0
- package/src/cli-diagnostics.js +364 -0
- package/src/cognitive-pattern-evolution.js +1317 -0
- package/src/daa-cognition.js +977 -0
- package/src/daa-service.d.ts +298 -0
- package/src/daa-service.js +1116 -0
- package/src/diagnostics.js +533 -0
- package/src/errors.js +528 -0
- package/src/github-coordinator/README.md +193 -0
- package/src/github-coordinator/claude-hooks.js +162 -0
- package/src/github-coordinator/gh-cli-coordinator.js +260 -0
- package/src/hooks/cli.js +82 -0
- package/src/hooks/index.js +1900 -0
- package/src/index-enhanced.d.ts +371 -0
- package/src/index-enhanced.js +734 -0
- package/src/index.d.ts +287 -0
- package/src/index.js +405 -0
- package/src/index.ts +457 -0
- package/src/logger.js +182 -0
- package/src/logging-config.js +179 -0
- package/src/mcp-daa-tools.js +735 -0
- package/src/mcp-tools-benchmarks.js +328 -0
- package/src/mcp-tools-enhanced.js +2863 -0
- package/src/memory-config.js +42 -0
- package/src/meta-learning-framework.js +1359 -0
- package/src/neural-agent.js +830 -0
- package/src/neural-coordination-protocol.js +1363 -0
- package/src/neural-models/README.md +118 -0
- package/src/neural-models/autoencoder.js +543 -0
- package/src/neural-models/base.js +269 -0
- package/src/neural-models/cnn.js +497 -0
- package/src/neural-models/gnn.js +447 -0
- package/src/neural-models/gru.js +536 -0
- package/src/neural-models/index.js +273 -0
- package/src/neural-models/lstm.js +551 -0
- package/src/neural-models/neural-presets-complete.js +1306 -0
- package/src/neural-models/presets/graph.js +392 -0
- package/src/neural-models/presets/index.js +279 -0
- package/src/neural-models/presets/nlp.js +328 -0
- package/src/neural-models/presets/timeseries.js +368 -0
- package/src/neural-models/presets/vision.js +387 -0
- package/src/neural-models/resnet.js +534 -0
- package/src/neural-models/transformer.js +515 -0
- package/src/neural-models/vae.js +489 -0
- package/src/neural-network-manager.js +1938 -0
- package/src/neural-network.ts +296 -0
- package/src/neural.js +574 -0
- package/src/performance-benchmarks.js +898 -0
- package/src/performance.js +458 -0
- package/src/persistence-pooled.js +695 -0
- package/src/persistence.js +480 -0
- package/src/schemas.js +864 -0
- package/src/security.js +218 -0
- package/src/singleton-container.js +183 -0
- package/src/sqlite-pool.js +587 -0
- package/src/sqlite-worker.js +141 -0
- package/src/types.ts +164 -0
- package/src/utils.ts +286 -0
- package/src/wasm-loader.js +601 -0
- package/src/wasm-loader2.js +404 -0
- package/src/wasm-memory-optimizer.js +783 -0
- package/src/wasm-types.d.ts +63 -0
- package/wasm/README.md +347 -0
- package/wasm/neuro-divergent.wasm +0 -0
- package/wasm/package.json +18 -0
- package/wasm/ruv-fann.wasm +0 -0
- package/wasm/ruv_swarm_simd.wasm +0 -0
- package/wasm/ruv_swarm_wasm.d.ts +391 -0
- package/wasm/ruv_swarm_wasm.js +2164 -0
- package/wasm/ruv_swarm_wasm_bg.wasm +0 -0
- package/wasm/ruv_swarm_wasm_bg.wasm.d.ts +123 -0
- package/wasm/wasm-bindings-loader.mjs +435 -0
- package/wasm/wasm-updates.md +684 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NLP Neural Network Presets
|
|
3
|
+
* Production-ready configurations for natural language processing tasks
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const nlpPresets = {
|
|
7
|
+
// Social Media Sentiment Analysis
|
|
8
|
+
sentiment_analysis_social: {
|
|
9
|
+
name: 'Social Media Sentiment Analyzer',
|
|
10
|
+
description: 'Optimized for real-time sentiment analysis on social media posts',
|
|
11
|
+
model: 'transformer',
|
|
12
|
+
config: {
|
|
13
|
+
dimensions: 512,
|
|
14
|
+
heads: 8,
|
|
15
|
+
layers: 6,
|
|
16
|
+
ffDimensions: 2048,
|
|
17
|
+
vocabSize: 30000,
|
|
18
|
+
maxLength: 280,
|
|
19
|
+
dropoutRate: 0.1,
|
|
20
|
+
},
|
|
21
|
+
training: {
|
|
22
|
+
batchSize: 32,
|
|
23
|
+
learningRate: 5e-5,
|
|
24
|
+
warmupSteps: 1000,
|
|
25
|
+
epochs: 10,
|
|
26
|
+
optimizer: 'adamw',
|
|
27
|
+
},
|
|
28
|
+
performance: {
|
|
29
|
+
expectedAccuracy: '92-94%',
|
|
30
|
+
inferenceTime: '12ms',
|
|
31
|
+
memoryUsage: '512MB',
|
|
32
|
+
trainingTime: '2-3 hours on GPU',
|
|
33
|
+
},
|
|
34
|
+
useCase: 'Twitter, Facebook, Instagram sentiment tracking',
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
// Document Summarization
|
|
38
|
+
document_summarization: {
|
|
39
|
+
name: 'Document Summarizer',
|
|
40
|
+
description: 'Extract key information from long documents',
|
|
41
|
+
model: 'transformer',
|
|
42
|
+
config: {
|
|
43
|
+
dimensions: 768,
|
|
44
|
+
heads: 12,
|
|
45
|
+
layers: 12,
|
|
46
|
+
ffDimensions: 3072,
|
|
47
|
+
vocabSize: 50000,
|
|
48
|
+
maxLength: 1024,
|
|
49
|
+
dropoutRate: 0.15,
|
|
50
|
+
},
|
|
51
|
+
training: {
|
|
52
|
+
batchSize: 16,
|
|
53
|
+
learningRate: 3e-5,
|
|
54
|
+
warmupSteps: 2000,
|
|
55
|
+
epochs: 15,
|
|
56
|
+
optimizer: 'adamw',
|
|
57
|
+
gradientAccumulation: 4,
|
|
58
|
+
},
|
|
59
|
+
performance: {
|
|
60
|
+
expectedAccuracy: '88-91%',
|
|
61
|
+
inferenceTime: '45ms',
|
|
62
|
+
memoryUsage: '1.2GB',
|
|
63
|
+
trainingTime: '8-10 hours on GPU',
|
|
64
|
+
},
|
|
65
|
+
useCase: 'News articles, research papers, legal documents',
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
// Question Answering
|
|
69
|
+
question_answering: {
|
|
70
|
+
name: 'Question Answering System',
|
|
71
|
+
description: 'Extract answers from context paragraphs',
|
|
72
|
+
model: 'transformer',
|
|
73
|
+
config: {
|
|
74
|
+
dimensions: 768,
|
|
75
|
+
heads: 12,
|
|
76
|
+
layers: 8,
|
|
77
|
+
ffDimensions: 3072,
|
|
78
|
+
vocabSize: 40000,
|
|
79
|
+
maxLength: 512,
|
|
80
|
+
dropoutRate: 0.1,
|
|
81
|
+
includePositionalEmbeddings: true,
|
|
82
|
+
},
|
|
83
|
+
training: {
|
|
84
|
+
batchSize: 24,
|
|
85
|
+
learningRate: 2e-5,
|
|
86
|
+
warmupSteps: 1500,
|
|
87
|
+
epochs: 20,
|
|
88
|
+
optimizer: 'adamw',
|
|
89
|
+
},
|
|
90
|
+
performance: {
|
|
91
|
+
expectedAccuracy: '85-88%',
|
|
92
|
+
inferenceTime: '25ms',
|
|
93
|
+
memoryUsage: '900MB',
|
|
94
|
+
trainingTime: '6-8 hours on GPU',
|
|
95
|
+
},
|
|
96
|
+
useCase: 'Customer support, educational systems, information retrieval',
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// Named Entity Recognition
|
|
100
|
+
named_entity_recognition: {
|
|
101
|
+
name: 'Named Entity Recognizer',
|
|
102
|
+
description: 'Identify and classify named entities in text',
|
|
103
|
+
model: 'lstm',
|
|
104
|
+
config: {
|
|
105
|
+
inputSize: 300,
|
|
106
|
+
hiddenSize: 256,
|
|
107
|
+
numLayers: 2,
|
|
108
|
+
outputSize: 9, // B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC, B-MISC, I-MISC, O
|
|
109
|
+
bidirectional: true,
|
|
110
|
+
returnSequence: true,
|
|
111
|
+
dropoutRate: 0.3,
|
|
112
|
+
},
|
|
113
|
+
training: {
|
|
114
|
+
batchSize: 64,
|
|
115
|
+
learningRate: 1e-3,
|
|
116
|
+
epochs: 30,
|
|
117
|
+
optimizer: 'adam',
|
|
118
|
+
earlyStoppingPatience: 5,
|
|
119
|
+
},
|
|
120
|
+
performance: {
|
|
121
|
+
expectedAccuracy: '91-93%',
|
|
122
|
+
inferenceTime: '8ms',
|
|
123
|
+
memoryUsage: '256MB',
|
|
124
|
+
trainingTime: '3-4 hours on GPU',
|
|
125
|
+
},
|
|
126
|
+
useCase: 'Information extraction, document processing, knowledge graphs',
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
// Language Translation
|
|
130
|
+
language_translation: {
|
|
131
|
+
name: 'Neural Machine Translator',
|
|
132
|
+
description: 'Translate between multiple languages',
|
|
133
|
+
model: 'transformer',
|
|
134
|
+
config: {
|
|
135
|
+
dimensions: 512,
|
|
136
|
+
heads: 8,
|
|
137
|
+
layers: 6,
|
|
138
|
+
ffDimensions: 2048,
|
|
139
|
+
vocabSize: 32000,
|
|
140
|
+
maxLength: 256,
|
|
141
|
+
dropoutRate: 0.1,
|
|
142
|
+
shareEmbeddings: true,
|
|
143
|
+
},
|
|
144
|
+
training: {
|
|
145
|
+
batchSize: 128,
|
|
146
|
+
learningRate: 1e-4,
|
|
147
|
+
warmupSteps: 4000,
|
|
148
|
+
epochs: 50,
|
|
149
|
+
optimizer: 'adam',
|
|
150
|
+
labelSmoothing: 0.1,
|
|
151
|
+
},
|
|
152
|
+
performance: {
|
|
153
|
+
expectedAccuracy: '86-89% BLEU',
|
|
154
|
+
inferenceTime: '30ms',
|
|
155
|
+
memoryUsage: '800MB',
|
|
156
|
+
trainingTime: '24-48 hours on GPU',
|
|
157
|
+
},
|
|
158
|
+
useCase: 'Real-time translation, document localization',
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
// Text Classification
|
|
162
|
+
text_classification_multi: {
|
|
163
|
+
name: 'Multi-class Text Classifier',
|
|
164
|
+
description: 'Classify text into multiple categories',
|
|
165
|
+
model: 'gru',
|
|
166
|
+
config: {
|
|
167
|
+
inputSize: 300,
|
|
168
|
+
hiddenSize: 256,
|
|
169
|
+
numLayers: 3,
|
|
170
|
+
outputSize: 20, // Number of classes
|
|
171
|
+
bidirectional: true,
|
|
172
|
+
dropoutRate: 0.4,
|
|
173
|
+
returnSequence: false,
|
|
174
|
+
},
|
|
175
|
+
training: {
|
|
176
|
+
batchSize: 128,
|
|
177
|
+
learningRate: 1e-3,
|
|
178
|
+
epochs: 25,
|
|
179
|
+
optimizer: 'adam',
|
|
180
|
+
classWeights: 'balanced',
|
|
181
|
+
},
|
|
182
|
+
performance: {
|
|
183
|
+
expectedAccuracy: '89-92%',
|
|
184
|
+
inferenceTime: '6ms',
|
|
185
|
+
memoryUsage: '384MB',
|
|
186
|
+
trainingTime: '2-3 hours on GPU',
|
|
187
|
+
},
|
|
188
|
+
useCase: 'Email categorization, content moderation, topic classification',
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
// Conversational AI
|
|
192
|
+
conversational_ai: {
|
|
193
|
+
name: 'Conversational AI Model',
|
|
194
|
+
description: 'Generate contextual responses in conversations',
|
|
195
|
+
model: 'transformer',
|
|
196
|
+
config: {
|
|
197
|
+
dimensions: 768,
|
|
198
|
+
heads: 12,
|
|
199
|
+
layers: 10,
|
|
200
|
+
ffDimensions: 3072,
|
|
201
|
+
vocabSize: 50000,
|
|
202
|
+
maxLength: 512,
|
|
203
|
+
dropoutRate: 0.1,
|
|
204
|
+
useMemory: true,
|
|
205
|
+
},
|
|
206
|
+
training: {
|
|
207
|
+
batchSize: 16,
|
|
208
|
+
learningRate: 2e-5,
|
|
209
|
+
warmupSteps: 2000,
|
|
210
|
+
epochs: 30,
|
|
211
|
+
optimizer: 'adamw',
|
|
212
|
+
useReinforcementLearning: true,
|
|
213
|
+
},
|
|
214
|
+
performance: {
|
|
215
|
+
expectedAccuracy: '87-90%',
|
|
216
|
+
inferenceTime: '40ms',
|
|
217
|
+
memoryUsage: '1.5GB',
|
|
218
|
+
trainingTime: '48-72 hours on GPU',
|
|
219
|
+
},
|
|
220
|
+
useCase: 'Chatbots, virtual assistants, customer service',
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
// Code Generation
|
|
224
|
+
code_generation: {
|
|
225
|
+
name: 'Code Generator',
|
|
226
|
+
description: 'Generate code from natural language descriptions',
|
|
227
|
+
model: 'transformer',
|
|
228
|
+
config: {
|
|
229
|
+
dimensions: 1024,
|
|
230
|
+
heads: 16,
|
|
231
|
+
layers: 12,
|
|
232
|
+
ffDimensions: 4096,
|
|
233
|
+
vocabSize: 64000,
|
|
234
|
+
maxLength: 2048,
|
|
235
|
+
dropoutRate: 0.1,
|
|
236
|
+
useRotaryPositionalEmbedding: true,
|
|
237
|
+
},
|
|
238
|
+
training: {
|
|
239
|
+
batchSize: 8,
|
|
240
|
+
learningRate: 1e-5,
|
|
241
|
+
warmupSteps: 5000,
|
|
242
|
+
epochs: 20,
|
|
243
|
+
optimizer: 'adamw',
|
|
244
|
+
gradientAccumulation: 8,
|
|
245
|
+
},
|
|
246
|
+
performance: {
|
|
247
|
+
expectedAccuracy: '78-82%',
|
|
248
|
+
inferenceTime: '100ms',
|
|
249
|
+
memoryUsage: '3GB',
|
|
250
|
+
trainingTime: '5-7 days on GPU',
|
|
251
|
+
},
|
|
252
|
+
useCase: 'Code completion, bug fixing, code documentation',
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
// Semantic Search
|
|
256
|
+
semantic_search: {
|
|
257
|
+
name: 'Semantic Search Engine',
|
|
258
|
+
description: 'Find semantically similar content',
|
|
259
|
+
model: 'transformer',
|
|
260
|
+
config: {
|
|
261
|
+
dimensions: 768,
|
|
262
|
+
heads: 12,
|
|
263
|
+
layers: 6,
|
|
264
|
+
ffDimensions: 3072,
|
|
265
|
+
vocabSize: 30000,
|
|
266
|
+
maxLength: 512,
|
|
267
|
+
dropoutRate: 0.1,
|
|
268
|
+
poolingStrategy: 'mean',
|
|
269
|
+
},
|
|
270
|
+
training: {
|
|
271
|
+
batchSize: 32,
|
|
272
|
+
learningRate: 2e-5,
|
|
273
|
+
warmupSteps: 1000,
|
|
274
|
+
epochs: 10,
|
|
275
|
+
optimizer: 'adamw',
|
|
276
|
+
useContrastiveLoss: true,
|
|
277
|
+
},
|
|
278
|
+
performance: {
|
|
279
|
+
expectedAccuracy: '91-93%',
|
|
280
|
+
inferenceTime: '15ms',
|
|
281
|
+
memoryUsage: '800MB',
|
|
282
|
+
trainingTime: '12-16 hours on GPU',
|
|
283
|
+
},
|
|
284
|
+
useCase: 'Document retrieval, FAQ systems, knowledge bases',
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
// Grammar Correction
|
|
288
|
+
grammar_correction: {
|
|
289
|
+
name: 'Grammar and Style Corrector',
|
|
290
|
+
description: 'Detect and correct grammatical errors',
|
|
291
|
+
model: 'transformer',
|
|
292
|
+
config: {
|
|
293
|
+
dimensions: 512,
|
|
294
|
+
heads: 8,
|
|
295
|
+
layers: 6,
|
|
296
|
+
ffDimensions: 2048,
|
|
297
|
+
vocabSize: 40000,
|
|
298
|
+
maxLength: 256,
|
|
299
|
+
dropoutRate: 0.15,
|
|
300
|
+
},
|
|
301
|
+
training: {
|
|
302
|
+
batchSize: 64,
|
|
303
|
+
learningRate: 3e-5,
|
|
304
|
+
warmupSteps: 1500,
|
|
305
|
+
epochs: 15,
|
|
306
|
+
optimizer: 'adamw',
|
|
307
|
+
useDataAugmentation: true,
|
|
308
|
+
},
|
|
309
|
+
performance: {
|
|
310
|
+
expectedAccuracy: '93-95%',
|
|
311
|
+
inferenceTime: '20ms',
|
|
312
|
+
memoryUsage: '600MB',
|
|
313
|
+
trainingTime: '8-10 hours on GPU',
|
|
314
|
+
},
|
|
315
|
+
useCase: 'Writing assistants, educational tools, content editing',
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
// Export utility function to get preset by name
|
|
320
|
+
export const getNLPPreset = (presetName) => {
|
|
321
|
+
if (!nlpPresets[presetName]) {
|
|
322
|
+
throw new Error(`NLP preset '${presetName}' not found. Available presets: ${Object.keys(nlpPresets).join(', ')}`);
|
|
323
|
+
}
|
|
324
|
+
return nlpPresets[presetName];
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
// Export list of available presets
|
|
328
|
+
export const availableNLPPresets = Object.keys(nlpPresets);
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time Series Neural Network Presets
|
|
3
|
+
* Production-ready configurations for temporal data analysis and forecasting
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const timeSeriesPresets = {
|
|
7
|
+
// Stock Market Prediction
|
|
8
|
+
stock_market_prediction: {
|
|
9
|
+
name: 'Stock Market Predictor',
|
|
10
|
+
description: 'Predict stock prices and market trends',
|
|
11
|
+
model: 'lstm',
|
|
12
|
+
config: {
|
|
13
|
+
inputSize: 20, // OHLCV + technical indicators
|
|
14
|
+
hiddenSize: 256,
|
|
15
|
+
numLayers: 4,
|
|
16
|
+
outputSize: 3, // Next day: [price, low, high]
|
|
17
|
+
bidirectional: false,
|
|
18
|
+
returnSequence: false,
|
|
19
|
+
dropoutRate: 0.3,
|
|
20
|
+
attentionMechanism: true,
|
|
21
|
+
lookbackWindow: 60,
|
|
22
|
+
},
|
|
23
|
+
training: {
|
|
24
|
+
batchSize: 64,
|
|
25
|
+
learningRate: 1e-3,
|
|
26
|
+
epochs: 200,
|
|
27
|
+
optimizer: 'adam',
|
|
28
|
+
scheduler: 'exponential',
|
|
29
|
+
lossFunction: 'mse_with_direction_penalty',
|
|
30
|
+
earlyStoppingPatience: 20,
|
|
31
|
+
validationSplit: 0.2,
|
|
32
|
+
},
|
|
33
|
+
performance: {
|
|
34
|
+
expectedAccuracy: '72-75% directional accuracy',
|
|
35
|
+
inferenceTime: '5ms',
|
|
36
|
+
memoryUsage: '300MB',
|
|
37
|
+
trainingTime: '6-8 hours on GPU',
|
|
38
|
+
},
|
|
39
|
+
useCase: 'Trading systems, portfolio management, risk assessment',
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// Weather Forecasting
|
|
43
|
+
weather_forecasting: {
|
|
44
|
+
name: 'Weather Forecast Model',
|
|
45
|
+
description: 'Multi-variable weather prediction system',
|
|
46
|
+
model: 'gru',
|
|
47
|
+
config: {
|
|
48
|
+
inputSize: 15, // Temperature, humidity, pressure, wind, etc.
|
|
49
|
+
hiddenSize: 512,
|
|
50
|
+
numLayers: 3,
|
|
51
|
+
outputSize: 45, // 15 variables × 3 days forecast
|
|
52
|
+
bidirectional: true,
|
|
53
|
+
returnSequence: true,
|
|
54
|
+
dropoutRate: 0.2,
|
|
55
|
+
multiHeadAttention: 8,
|
|
56
|
+
lookbackWindow: 168, // 7 days of hourly data
|
|
57
|
+
},
|
|
58
|
+
training: {
|
|
59
|
+
batchSize: 32,
|
|
60
|
+
learningRate: 5e-4,
|
|
61
|
+
epochs: 150,
|
|
62
|
+
optimizer: 'adamw',
|
|
63
|
+
gradientClipping: 1.0,
|
|
64
|
+
lossFunction: 'weighted_mse',
|
|
65
|
+
temperatureScaling: true,
|
|
66
|
+
},
|
|
67
|
+
performance: {
|
|
68
|
+
expectedAccuracy: '88-91% within 2°C',
|
|
69
|
+
inferenceTime: '15ms',
|
|
70
|
+
memoryUsage: '600MB',
|
|
71
|
+
trainingTime: '24-36 hours on GPU',
|
|
72
|
+
},
|
|
73
|
+
useCase: 'Weather services, agriculture, event planning',
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
// Energy Consumption Prediction
|
|
77
|
+
energy_consumption: {
|
|
78
|
+
name: 'Energy Demand Forecaster',
|
|
79
|
+
description: 'Predict energy consumption patterns',
|
|
80
|
+
model: 'lstm',
|
|
81
|
+
config: {
|
|
82
|
+
inputSize: 25, // Multiple features including calendar, weather
|
|
83
|
+
hiddenSize: 384,
|
|
84
|
+
numLayers: 3,
|
|
85
|
+
outputSize: 96, // 4 days hourly forecast
|
|
86
|
+
bidirectional: true,
|
|
87
|
+
returnSequence: true,
|
|
88
|
+
dropoutRate: 0.25,
|
|
89
|
+
residualConnections: true,
|
|
90
|
+
seasonalDecomposition: true,
|
|
91
|
+
},
|
|
92
|
+
training: {
|
|
93
|
+
batchSize: 48,
|
|
94
|
+
learningRate: 2e-3,
|
|
95
|
+
epochs: 100,
|
|
96
|
+
optimizer: 'adam',
|
|
97
|
+
lossFunction: 'mape_with_peak_penalty',
|
|
98
|
+
augmentation: {
|
|
99
|
+
noiseInjection: 0.05,
|
|
100
|
+
timeShift: true,
|
|
101
|
+
scalingFactor: 0.1,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
performance: {
|
|
105
|
+
expectedAccuracy: '94-96% MAPE < 5%',
|
|
106
|
+
inferenceTime: '10ms',
|
|
107
|
+
memoryUsage: '450MB',
|
|
108
|
+
trainingTime: '12-18 hours on GPU',
|
|
109
|
+
},
|
|
110
|
+
useCase: 'Smart grid management, capacity planning, cost optimization',
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
// Predictive Maintenance
|
|
114
|
+
predictive_maintenance: {
|
|
115
|
+
name: 'Equipment Failure Predictor',
|
|
116
|
+
description: 'Predict equipment failures before they occur',
|
|
117
|
+
model: 'gru',
|
|
118
|
+
config: {
|
|
119
|
+
inputSize: 50, // Sensor readings
|
|
120
|
+
hiddenSize: 256,
|
|
121
|
+
numLayers: 3,
|
|
122
|
+
outputSize: 2, // [failure_probability, time_to_failure]
|
|
123
|
+
bidirectional: false,
|
|
124
|
+
returnSequence: false,
|
|
125
|
+
dropoutRate: 0.3,
|
|
126
|
+
convolutionalEncoder: true,
|
|
127
|
+
kernelSize: 5,
|
|
128
|
+
},
|
|
129
|
+
training: {
|
|
130
|
+
batchSize: 128,
|
|
131
|
+
learningRate: 1e-3,
|
|
132
|
+
epochs: 150,
|
|
133
|
+
optimizer: 'adam',
|
|
134
|
+
classBalancing: 'smote',
|
|
135
|
+
focalLossGamma: 2.0,
|
|
136
|
+
validationStrategy: 'time_series_split',
|
|
137
|
+
},
|
|
138
|
+
performance: {
|
|
139
|
+
expectedAccuracy: '91-93% precision',
|
|
140
|
+
inferenceTime: '3ms',
|
|
141
|
+
memoryUsage: '200MB',
|
|
142
|
+
trainingTime: '8-12 hours on GPU',
|
|
143
|
+
},
|
|
144
|
+
useCase: 'Manufacturing, aviation, industrial IoT',
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
// Anomaly Detection IoT
|
|
148
|
+
anomaly_detection_iot: {
|
|
149
|
+
name: 'IoT Anomaly Detector',
|
|
150
|
+
description: 'Detect anomalies in IoT sensor streams',
|
|
151
|
+
model: 'autoencoder',
|
|
152
|
+
config: {
|
|
153
|
+
inputSize: 100, // Multiple sensor time window
|
|
154
|
+
encoderLayers: [80, 60, 40, 20],
|
|
155
|
+
bottleneckSize: 10,
|
|
156
|
+
decoderLayers: [20, 40, 60, 80],
|
|
157
|
+
activation: 'elu',
|
|
158
|
+
outputActivation: 'linear',
|
|
159
|
+
variational: true,
|
|
160
|
+
betaKL: 0.1,
|
|
161
|
+
windowSize: 100,
|
|
162
|
+
},
|
|
163
|
+
training: {
|
|
164
|
+
batchSize: 256,
|
|
165
|
+
learningRate: 1e-3,
|
|
166
|
+
epochs: 100,
|
|
167
|
+
optimizer: 'adam',
|
|
168
|
+
reconstructionThreshold: 'dynamic_percentile_95',
|
|
169
|
+
onlineAdaptation: true,
|
|
170
|
+
adaptationRate: 0.01,
|
|
171
|
+
},
|
|
172
|
+
performance: {
|
|
173
|
+
expectedAccuracy: '96-98% detection rate',
|
|
174
|
+
inferenceTime: '1ms',
|
|
175
|
+
memoryUsage: '100MB',
|
|
176
|
+
trainingTime: '4-6 hours on GPU',
|
|
177
|
+
},
|
|
178
|
+
useCase: 'Smart home security, industrial monitoring, network intrusion',
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
// Sales Forecasting
|
|
182
|
+
sales_forecasting: {
|
|
183
|
+
name: 'Retail Sales Forecaster',
|
|
184
|
+
description: 'Predict retail sales with seasonality',
|
|
185
|
+
model: 'lstm',
|
|
186
|
+
config: {
|
|
187
|
+
inputSize: 30, // Product features, promotions, calendar
|
|
188
|
+
hiddenSize: 256,
|
|
189
|
+
numLayers: 3,
|
|
190
|
+
outputSize: 30, // 30 days forecast
|
|
191
|
+
bidirectional: true,
|
|
192
|
+
returnSequence: true,
|
|
193
|
+
dropoutRate: 0.35,
|
|
194
|
+
externalVariables: ['holidays', 'promotions', 'weather'],
|
|
195
|
+
productEmbeddingSize: 64,
|
|
196
|
+
},
|
|
197
|
+
training: {
|
|
198
|
+
batchSize: 64,
|
|
199
|
+
learningRate: 1e-3,
|
|
200
|
+
epochs: 120,
|
|
201
|
+
optimizer: 'adam',
|
|
202
|
+
lossFunction: 'quantile_loss',
|
|
203
|
+
quantiles: [0.1, 0.5, 0.9],
|
|
204
|
+
hierarchicalReconciliation: true,
|
|
205
|
+
},
|
|
206
|
+
performance: {
|
|
207
|
+
expectedAccuracy: '85-88% within confidence interval',
|
|
208
|
+
inferenceTime: '8ms',
|
|
209
|
+
memoryUsage: '350MB',
|
|
210
|
+
trainingTime: '10-15 hours on GPU',
|
|
211
|
+
},
|
|
212
|
+
useCase: 'Inventory management, supply chain, revenue planning',
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
// Network Traffic Prediction
|
|
216
|
+
network_traffic_prediction: {
|
|
217
|
+
name: 'Network Traffic Analyzer',
|
|
218
|
+
description: 'Predict network load and detect anomalies',
|
|
219
|
+
model: 'gru',
|
|
220
|
+
config: {
|
|
221
|
+
inputSize: 12, // Traffic metrics
|
|
222
|
+
hiddenSize: 192,
|
|
223
|
+
numLayers: 2,
|
|
224
|
+
outputSize: 24, // Next 24 hours
|
|
225
|
+
bidirectional: false,
|
|
226
|
+
returnSequence: true,
|
|
227
|
+
dropoutRate: 0.2,
|
|
228
|
+
waveletDecomposition: true,
|
|
229
|
+
decompositionLevels: 3,
|
|
230
|
+
},
|
|
231
|
+
training: {
|
|
232
|
+
batchSize: 128,
|
|
233
|
+
learningRate: 2e-3,
|
|
234
|
+
epochs: 80,
|
|
235
|
+
optimizer: 'adam',
|
|
236
|
+
lossFunction: 'huber',
|
|
237
|
+
deltaHuber: 1.0,
|
|
238
|
+
augmentation: {
|
|
239
|
+
syntheticSpikes: true,
|
|
240
|
+
smoothing: 0.1,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
performance: {
|
|
244
|
+
expectedAccuracy: '92-94% R-squared',
|
|
245
|
+
inferenceTime: '4ms',
|
|
246
|
+
memoryUsage: '150MB',
|
|
247
|
+
trainingTime: '6-8 hours on GPU',
|
|
248
|
+
},
|
|
249
|
+
useCase: 'Network capacity planning, DDoS detection, QoS optimization',
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
// Healthcare Monitoring
|
|
253
|
+
healthcare_monitoring: {
|
|
254
|
+
name: 'Patient Vital Signs Monitor',
|
|
255
|
+
description: 'Monitor and predict patient health events',
|
|
256
|
+
model: 'lstm',
|
|
257
|
+
config: {
|
|
258
|
+
inputSize: 8, // Heart rate, BP, SpO2, temperature, etc.
|
|
259
|
+
hiddenSize: 128,
|
|
260
|
+
numLayers: 3,
|
|
261
|
+
outputSize: 3, // Risk scores for different conditions
|
|
262
|
+
bidirectional: true,
|
|
263
|
+
returnSequence: false,
|
|
264
|
+
dropoutRate: 0.4,
|
|
265
|
+
attentionWindow: 48, // 48 hours
|
|
266
|
+
clinicalConstraints: true,
|
|
267
|
+
},
|
|
268
|
+
training: {
|
|
269
|
+
batchSize: 32,
|
|
270
|
+
learningRate: 5e-4,
|
|
271
|
+
epochs: 200,
|
|
272
|
+
optimizer: 'adamw',
|
|
273
|
+
lossFunction: 'weighted_cross_entropy',
|
|
274
|
+
classWeights: 'balanced',
|
|
275
|
+
falseNegativePenalty: 5.0,
|
|
276
|
+
},
|
|
277
|
+
performance: {
|
|
278
|
+
expectedAccuracy: '94-96% sensitivity',
|
|
279
|
+
inferenceTime: '2ms',
|
|
280
|
+
memoryUsage: '120MB',
|
|
281
|
+
trainingTime: '12-16 hours on GPU',
|
|
282
|
+
},
|
|
283
|
+
useCase: 'ICU monitoring, early warning systems, remote patient care',
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
// Cryptocurrency Prediction
|
|
287
|
+
crypto_prediction: {
|
|
288
|
+
name: 'Cryptocurrency Price Predictor',
|
|
289
|
+
description: 'Predict crypto prices with high volatility',
|
|
290
|
+
model: 'transformer',
|
|
291
|
+
config: {
|
|
292
|
+
dimensions: 256,
|
|
293
|
+
heads: 8,
|
|
294
|
+
layers: 4,
|
|
295
|
+
ffDimensions: 1024,
|
|
296
|
+
maxLength: 500,
|
|
297
|
+
features: 15, // Price, volume, social sentiment, etc.
|
|
298
|
+
outputHorizon: 24, // 24 hour prediction
|
|
299
|
+
dropoutRate: 0.3,
|
|
300
|
+
priceEmbedding: true,
|
|
301
|
+
},
|
|
302
|
+
training: {
|
|
303
|
+
batchSize: 32,
|
|
304
|
+
learningRate: 1e-4,
|
|
305
|
+
warmupSteps: 1000,
|
|
306
|
+
epochs: 150,
|
|
307
|
+
optimizer: 'adamw',
|
|
308
|
+
lossFunction: 'log_cosh',
|
|
309
|
+
volatilityWeighting: true,
|
|
310
|
+
syntheticData: 0.2,
|
|
311
|
+
},
|
|
312
|
+
performance: {
|
|
313
|
+
expectedAccuracy: '68-72% directional accuracy',
|
|
314
|
+
inferenceTime: '12ms',
|
|
315
|
+
memoryUsage: '400MB',
|
|
316
|
+
trainingTime: '18-24 hours on GPU',
|
|
317
|
+
},
|
|
318
|
+
useCase: 'Trading bots, portfolio optimization, risk management',
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
// Agricultural Yield Prediction
|
|
322
|
+
agricultural_yield: {
|
|
323
|
+
name: 'Crop Yield Predictor',
|
|
324
|
+
description: 'Predict agricultural yields based on multiple factors',
|
|
325
|
+
model: 'lstm',
|
|
326
|
+
config: {
|
|
327
|
+
inputSize: 35, // Weather, soil, satellite data
|
|
328
|
+
hiddenSize: 256,
|
|
329
|
+
numLayers: 3,
|
|
330
|
+
outputSize: 1, // Yield prediction
|
|
331
|
+
bidirectional: true,
|
|
332
|
+
returnSequence: false,
|
|
333
|
+
dropoutRate: 0.25,
|
|
334
|
+
spatialFeatures: true,
|
|
335
|
+
temporalAggregation: 'attention',
|
|
336
|
+
},
|
|
337
|
+
training: {
|
|
338
|
+
batchSize: 24,
|
|
339
|
+
learningRate: 1e-3,
|
|
340
|
+
epochs: 100,
|
|
341
|
+
optimizer: 'adam',
|
|
342
|
+
lossFunction: 'mae_with_uncertainty',
|
|
343
|
+
dataAugmentation: {
|
|
344
|
+
weatherPerturbation: 0.1,
|
|
345
|
+
soilVariation: 0.05,
|
|
346
|
+
},
|
|
347
|
+
crossValidation: 'leave_one_year_out',
|
|
348
|
+
},
|
|
349
|
+
performance: {
|
|
350
|
+
expectedAccuracy: '87-90% within 10% error',
|
|
351
|
+
inferenceTime: '6ms',
|
|
352
|
+
memoryUsage: '250MB',
|
|
353
|
+
trainingTime: '8-12 hours on GPU',
|
|
354
|
+
},
|
|
355
|
+
useCase: 'Farm management, supply chain planning, insurance',
|
|
356
|
+
},
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
// Export utility function to get preset by name
|
|
360
|
+
export const getTimeSeriesPreset = (presetName) => {
|
|
361
|
+
if (!timeSeriesPresets[presetName]) {
|
|
362
|
+
throw new Error(`Time series preset '${presetName}' not found. Available presets: ${Object.keys(timeSeriesPresets).join(', ')}`);
|
|
363
|
+
}
|
|
364
|
+
return timeSeriesPresets[presetName];
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
// Export list of available presets
|
|
368
|
+
export const availableTimeSeriesPresets = Object.keys(timeSeriesPresets);
|