Answers.Body: <p>You can do prediction like this with regression. Take a look at scikit-learn models for regression: <a href="https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model" rel="nofollow noreferrer">https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model</a></p>
  <p>Here's an example:</p>
  <pre><code># 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
  
  &gt;&gt;&gt; 6.1511027
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-25T19:56:04.780Z
Answers.LastActivityDate: 2021-05-25T19:56:04.780Z
Answers.UserDisplayName: thayne
Body: <p><strong>My problem</strong>: 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.</p>
  <p>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 &quot;by hand&quot; an information about intensity based on seismological records, historical testimonies, chronicles atc.</p>
  <p><strong>What I need from AI:</strong> I need <em>&quot;something&quot;</em> that would predict earthquake intensity based on dataset of historical earthquakes.</p>
  <p><strong>Example/TLDR:</strong> 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.</p>
  
Tags: <neural-networks><classification><evolutionary-algorithms><fuzzy-logic><random-forests>
Title: What approach would work well for predicting earthquake intensity based on historical data?
UserDisplayName: BanikPyco
ThreadText: # What approach would work well for predicting earthquake intensity based on historical data?
  
  (Asked by: username_0 on 2021-05-24)
  
  **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.
  
  **Tags:** neural-networks, classification, evolutionary-algorithms, fuzzy-logic, random-forests
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-05-25. Score: 0 | Accepted answer
  
  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
  
  
  ---
  
  