jalilian / etas Goto Github PK
View Code? Open in Web Editor NEWModeling Earthquake Data Using the ETAS Model
Modeling Earthquake Data Using the ETAS Model
I'm trying to run ETAS on a catalog of earthquakes in Southern California. However the algorithm doesn't work with my data. I use the following parameters:
k0 <- 0.00005
c <- 0.0028
p <- 1.01
D <- 0.02
q <- 2
A <- pi * k0 / ((p - 1) * c^(p - 1) * (q - 1) * D^(q - 1))
param0 <- c(mu = 1, A, c, alpha = 1.05, p, D, q, gamma = 0.6)
ss.fit1 <- etas(ss.cat, param0)
The outputs look like this:
estimating:
start Davidon-Fletcher-Powell procedure ...
Function Value = -17285.5468
Gradient[1] = -2554.87 theta[1] = 1.000000
Gradient[2] = -1969.85 theta[2] = 0.912660
Gradient[3] = 13271.52 theta[3] = 0.052915
Gradient[4] = -1465.09 theta[4] = 1.024695
Gradient[5] = -178005.86 theta[5] = 1.004988
Gradient[6] = 13354.36 theta[6] = 0.141421
Gradient[7] = -2645.43 theta[7] = 1.414214
Gradient[8] = 1161.61 theta[8] = 0.774597
line search along the specified direction ... zeta = 0.000001
Function Value = -21686.6312
Gradient[1] = -350.92 theta[1] = 1.003357
Gradient[2] = -1438.55 theta[2] = 0.915249
Gradient[3] = -11564.45 theta[3] = 0.035475
Gradient[4] = -837.99 theta[4] = 1.026620
Gradient[5] = 825.48 theta[5] = 1.238903
Gradient[6] = 20688.64 theta[6] = 0.123873
Gradient[7] = -3136.34 theta[7] = 1.417690
Gradient[8] = 1308.65 theta[8] = 0.773070
estimating:
start Davidon-Fletcher-Powell procedure ...
Function Value = -31246.7664
Gradient[1] = -205.09 theta[1] = 1.005600
Gradient[2] = 6149.78 theta[2] = 0.923565
Gradient[3] = -4690.21 theta[3] = 0.099324
Gradient[4] = 6023.87 theta[4] = 1.031497
Gradient[5] = 10782.04 theta[5] = 1.252598
Gradient[6] = 535267.97 theta[6] = 0.005823
Gradient[7] = -3618.18 theta[7] = 1.435650
Gradient[8] = 1842.42 theta[8] = 0.765570
line search along the specified direction ... zeta = 0.000000
Function Value = -33939.8095
Gradient[1] = -701.25 theta[1] = 1.005605
Gradient[2] = 7192.30 theta[2] = 0.923508
Gradient[3] = -3180.30 theta[3] = 0.099326
Gradient[4] = 6548.52 theta[4] = 1.031442
Gradient[5] = 12231.81 theta[5] = 1.252803
Gradient[6] = -851458.89 theta[6] = 0.000828
Gradient[7] = 3949.25 theta[7] = 1.435683
Gradient[8] = -415.18 theta[8] = 0.765553
line search along the specified direction ... zeta = 0.000022
Function Value = -34783.5057
Gradient[1] = -770.29 theta[1] = 1.017540
Gradient[2] = 1159.01 theta[2] = 0.779718
Gradient[3] = 3107.21 theta[3] = 0.154042
Gradient[4] = 655.09 theta[4] = 0.894975
Gradient[5] = 7711.84 theta[5] = 1.261217
Gradient[6] = -830967.80 theta[6] = 0.000847
Gradient[7] = 3705.75 theta[7] = 1.450414
Gradient[8] = -355.34 theta[8] = 0.744325
line search along the specified direction ... zeta = 0.000021
Function Value = -34918.1667
Gradient[1] = -923.38 theta[1] = 1.029005
Gradient[2] = 459.87 theta[2] = 0.753359
Gradient[3] = -894.60 theta[3] = 0.104152
Gradient[4] = 236.86 theta[4] = 0.873069
Gradient[5] = 9938.23 theta[5] = 1.254364
Gradient[6] = -779912.16 theta[6] = 0.000877
Gradient[7] = 3508.03 theta[7] = 1.466960
Gradient[8] = -331.04 theta[8] = 0.723733
line search along the specified direction ... zeta = 0.000058
Function Value = -34964.5586
Gradient[1] = -845.81 theta[1] = 1.071375
Gradient[2] = 407.43 theta[2] = 0.753222
Gradient[3] = -908.41 theta[3] = 0.103961
Gradient[4] = 234.77 theta[4] = 0.871549
Gradient[5] = 9794.52 theta[5] = 1.253970
Gradient[6] = -205919.06 theta[6] = 0.001185
Gradient[7] = 2304.40 theta[7] = 1.509885
Gradient[8] = -90.70 theta[8] = 0.668916
line search along the specified direction ... zeta = 0.001407
Function Value = -35896.6479
Gradient[1] = -228.90 theta[1] = 2.207657
Gradient[2] = 126.70 theta[2] = 0.713447
Gradient[3] = -9964.34 theta[3] = 0.059034
Gradient[4] = 141.04 theta[4] = 0.865387
Gradient[5] = 8513.95 theta[5] = 1.233995
Gradient[6] = 395794.96 theta[6] = 0.000943
Gradient[7] = 184.84 theta[7] = 1.298719
Gradient[8] = -34.30 theta[8] = -0.201174
line search along the specified direction ... zeta = 0.000229
Function Value = -35916.1317
Gradient[1] = -226.35 theta[1] = 2.207922
Gradient[2] = -554.93 theta[2] = 0.664381
Gradient[3] = -7809.10 theta[3] = 0.062555
Gradient[4] = -47.04 theta[4] = 0.919123
Gradient[5] = 7864.29 theta[5] = 1.234435
Gradient[6] = 500249.80 theta[6] = 0.000925
Gradient[7] = -285.99 theta[7] = 1.281018
Gradient[8] = -59.09 theta[8] = -0.256890
line search along the specified direction ... zeta = 0.000456
Function Value = -35917.1786
Gradient[1] = -224.04 theta[1] = 2.194821
Gradient[2] = -474.25 theta[2] = 0.672521
Gradient[3] = -7818.94 theta[3] = 0.062822
Gradient[4] = -30.41 theta[4] = 0.911202
Gradient[5] = 7917.74 theta[5] = 1.234628
Gradient[6] = 545899.91 theta[6] = 0.000917
Gradient[7] = -482.80 theta[7] = 1.272549
Gradient[8] = -73.02 theta[8] = -0.275213
line search along the specified direction ... zeta = 0.466827
Function Value = -36189.0391
Gradient[1] = 31.47 theta[1] = 2.604020
Gradient[2] = 399.93 theta[2] = 0.743952
Gradient[3] = 317.40 theta[3] = 0.081777
Gradient[4] = 228.75 theta[4] = 0.844786
Gradient[5] = 5368.48 theta[5] = 1.229801
Gradient[6] = 5741.07 theta[6] = 0.000515
Gradient[7] = 353.53 theta[7] = 1.193300
Gradient[8] = 9.61 theta[8] = -0.102509
line search along the specified direction ... zeta = 0.466827
Function Value = -36210.0831
Gradient[1] = 45.74 theta[1] = 2.639691
Gradient[2] = 103.10 theta[2] = 0.731564
Gradient[3] = -287.56 theta[3] = 0.077703
Gradient[4] = 122.70 theta[4] = 0.854383
Gradient[5] = 5395.09 theta[5] = 1.225387
Gradient[6] = -227668.11 theta[6] = 0.000406
Gradient[7] = 112.19 theta[7] = 1.160853
Gradient[8] = 16.06 theta[8] = -0.103497
line search along the specified direction ... zeta = 5.435898
Function Value = -36346.4710
Gradient[1] = 196.47 theta[1] = 2.963628
Gradient[2] = -905.36 theta[2] = 0.687658
Gradient[3] = -4637.53 theta[3] = 0.053168
Gradient[4] = -328.63 theta[4] = 0.859538
Gradient[5] = 5881.39 theta[5] = 1.181311
Gradient[6] = 492103.20 theta[6] = 0.000517
Gradient[7] = -1742.03 theta[7] = 1.174922
Gradient[8] = -36.04 theta[8] = -0.350039
line search along the specified direction ... zeta = 10.871797
Function Value = -36677.1540
Gradient[1] = 343.93 theta[1] = 3.009744
Gradient[2] = -1498.83 theta[2] = 0.734135
Gradient[3] = -7391.36 theta[3] = 0.030318
Gradient[4] = -655.49 theta[4] = 0.776358
Gradient[5] = 3256.86 theta[5] = 1.094024
Gradient[6] = 540931.43 theta[6] = 0.000588
Gradient[7] = -1526.81 theta[7] = 1.204544
Gradient[8] = -72.29 theta[8] = -0.424028
MLE:
mu A c alpha p D q
5.197594e+00 2.119344e+00 3.975777e-02 9.331742e-02 5.771308e-03 1.785490e-06 2.237662e+00
gamma
7.527419e-01
======================================================**
iteration 2
4.139869 6167.769806 13.090705
The gradients become very weird starting from iteration 2.
I don't have any experiences with ETAS, could you let me know if there are anything wrong with my data or parameter setups?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.