Git Product home page Git Product logo

etas's People

Contributors

jalilian avatar rubak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

etas's Issues

Algorithm don't work with my data

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:

**iteration: 1

background seismicity rate:
Min. 1st Qu. Median Mean 3rd Qu. Max.
39.32 70.91 84.54 78.32 87.99 89.45
probability of being a background event:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1299 0.5499 0.8477 0.7427 0.9627 1.0000
integral of background seismicity rate: 1734.9

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

line search along the specified direction ... zeta = 0.000006
Function Value = -30900.3767
Gradient[1] = 1909.88 theta[1] = 1.005600
Gradient[2] = 7351.26 theta[2] = 0.923565
Gradient[3] = 1389.83 theta[3] = 0.099324
Gradient[4] = 6786.89 theta[4] = 1.031497
Gradient[5] = 4019.51 theta[5] = 1.252598
Gradient[6] = 555793.79 theta[6] = 0.005823
Gradient[7] = -3975.21 theta[7] = 1.435650
Gradient[8] = 1889.39 theta[8] = 0.765570
loglikelihood = 30900.37667 AIC = -61784.75334
theta[1] = 1.01123077 gradient[1] = 1909.8786
theta[2] = 0.85297156 gradient[2] = 7351.2569
theta[3] = 0.00986534 gradient[3] = 1389.8338
theta[4] = 1.06398642 gradient[4] = 6786.8922
theta[5] = 1.56900078 gradient[5] = 4019.5075
theta[6] = 0.00003390 gradient[6] = 555793.7851
theta[7] = 2.06109067 gradient[7] = -3975.2062
theta[8] = 0.58609799 gradient[8] = 1889.3896

MLE:
mu A c alpha p D q
1.0112307720 0.8529715561 0.0098653378 1.0639864159 1.5690007803 0.0000339046 2.0610906678
gamma
0.5860979896

declustering:
|=========================================================================================| 100%
iteration: 2

background seismicity rate:
Min. 1st Qu. Median Mean 3rd Qu. Max.
2.939 5.331 6.152 5.826 6.401 6.586
probability of being a background event:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0000009 0.0000099 0.0001572 0.0593858 0.0371901 1.0000000
integral of background seismicity rate: 134.643

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

line search along the specified direction ... zeta = 27.847886
Function Value = -190617310.5890
Gradient[1] = 633.01 theta[1] = 2.279823
Gradient[2] = -262437462.89 theta[2] = 1.455797
Gradient[3] = -1905035007.98 theta[3] = -0.199393
Gradient[4] = 61455087.78 theta[4] = -0.305479
Gradient[5] = 296851699.35 theta[5] = 0.075969
Gradient[6] = 406710395.75 theta[6] = 0.001336
Gradient[7] = -1803192.96 theta[7] = 1.495882
Gradient[8] = -402295.05 theta[8] = -0.867607
loglikelihood = 190617310.58900 AIC = -381234605.17800
theta[1] = 5.19759408 gradient[1] = 633.0150
theta[2] = 2.11934388 gradient[2] = -262437462.8900
theta[3] = 0.03975777 gradient[3] = -1905035007.9807
theta[4] = 0.09331742 gradient[4] = 61455087.7832
theta[5] = 0.00577131 gradient[5] = 296851699.3526
theta[6] = 0.00000179 gradient[6] = 406710395.7512
theta[7] = 2.23766220 gradient[7] = -1803192.9586
theta[8] = 0.75274188 gradient[8] = -402295.0513

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

declustering:
|=========================================================================================| 100%
iteration: 3

background seismicity rate:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.003349 0.012811 0.026546 0.022740 0.028906 0.034312
probability of being a background event:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-0.0255558 0.0000000 0.0000000 0.0002389 0.0000000 1.0000000
integral of background seismicity rate: 0.4531991

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?

Screen Shot 2020-01-16 at 12 13 17 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.