My problem: I own warning system where I collect data from institutions and send them over through various ways to users. I would like to hear your advice on what approach I can use for solving my problem with earthquake intensity far from epicenter. Since seismogical institutions mostly issue info about intenstiy of an earthquake for the epicenter, I would need to predict and classify what intensity the earthquake can have for places distant of several km/miles from the epicenter.

As an input/training set, I can use data of historical earthquakes and their magnitudes in an epicenter. Then I would need to fill mostly "by hand" an information about intensity based on seismological records, historical testimonies, chronicles atc.

What I need from AI: I need "something" that would predict earthquake intensity based on dataset of historical earthquakes.

Example/TLDR: There is an earthquake with magnitude 3.8, distant 80 km with depth 6 km. Based on dataset of historical earthquakes (with same type of information + witnessed and collected intensity), and output, I would need prediction of intensity of an eartquake 80 km from the epicenter.


You can do prediction like this with regression. Take a look at scikit-learn models for regression: https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model

Here's an example:

# This is made up data!
#        epicenter magnitude, depth_m, distance_km, local_magnitude
data = [[3.5,                 6000,    61.3,        2.1],
        [9.1,                 16000,   261.0,       6.0],
        [9.1,                 16000,   96.5,        8.2],
        [3.8,                 6000,    80.0,        2.6],
        [2.5,                 4000,    101.3,       0.4],
        [7.0,                 9000,    81.9,        6.1],
        [5.1,                 7000,    21.3,        4.1]]

from sklearn.linear_model import LinearRegression
import numpy as np

data = np.asarray(data) # to numpy array
X=data[:,:3] # the input variables
y=data[:,3] # the output variable (local magnitude)
reg = LinearRegression().fit(X, y) # fit the model based on the data
reg.predict(np.array([[6.6, 8000, 27]])) # Get a prediction based on new inputs

>>> 6.1511027

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.