smousavi05 / MagNet

A Machine-Learning Approach for Earthquake Magnitude Estimation
27 stars 13 forks source link

Using MagNet on regional and Teleseismic Earthquakes #1

Closed rcabdia closed 2 years ago

rcabdia commented 2 years ago

Dear Mostafa; I have some problems trying to find our how is is the entry of the MagNet prediction method.

Reading the file MagNet.py kdp = KerasDropoutPrediction(model) predic, al_unc, ep_unc, comb = kdp.predict(x_train, monte_carlo_sampling)

is it model file "mag_regressionLSTM_ML_multiobservations_1000_067.h5" ? is x_train the raw data of one of the components of a seismogram? it seems that x_train is the output of datat_reader(file_name, file_list) and inside the method is filled X = np.zeros([len(file_list), 3000, 3]) Could let me know if x_train must be a numpy array or a list and very important the dimensions. why is monte_carlo_sampling = 50

Roberto Cabieces

smousavi05 commented 2 years ago

@rcabdia Hi Roberto,

is it model file "mag_regressionLSTM_ML_multiobservations_1000_067.h5" ? Yes, .h5 files are the trained models

is x_train the raw data of one of the components of a seismogram? it seems that x_train is the output of datat_reader(file_name, file_list) and inside the method is filled the input should be 3-component data.

X = np.zeros([len(file_list), 3000, 3]) this is just to first prepare empty place for 30 second traces that will be filled by the data. Yes, the x_train needs to be a numpy array (number of seismograms)X(number of sample points in each trace of seismograms, ie 3000)X(number of components i.e. 3) You can change the monte carlo sampling, .5 is a commonly used value for the dropout