cfdf515228
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| estimate_hawkes | function | py | datascience | 1.0.0 | pure | def estimate_hawkes(arrivals: list[int], max_lag: int = 30) -> dict | Estima parámetros de un proceso Hawkes (alpha, beta, branching_ratio) desde la autocorrelación de arrivals ajustando una exponencial decreciente sobre la ACF. |
|
false |
|
|
dict con {alpha, beta, branching_ratio, acf} estimados parametros del proceso Hawkes | false | python/functions/datascience/datascience.py |
Ejemplo
arrivals = [0, 1, 3, 2, 0, 1, 4, 2, 1, 0] * 10
result = estimate_hawkes(arrivals, max_lag=10)
# {'alpha': 0.312, 'beta': 0.874, 'branching_ratio': 0.357, 'acf': [...]}
Notas
Ajusta la función a * exp(-b * lag) sobre los lags 1..max_lag de la ACF usando curve_fit de scipy.
Si el primer lag de la ACF es <= 0.01 (sin autocorrelación), retorna alpha=0, beta=1, branching_ratio=0.
El branching_ratio = alpha/beta; si se acerca a 1, el proceso es explosivo.
Función pura: requiere numpy y scipy instalados.