2017-02-18 南非德本站 Durban, South Africa Station 空氣2號 Air 2 (Arduino Uno + LF298N) - Analysis |
程式碼如下(相關程式碼和數據集,都放在https://github.com/dysonlin1/Quake-Forecast):
# coding: utf-8
# Machine Learning: Quake Forecast
import pandas as pd
from sklearn.linear_model import LinearRegression
train = pd.read_csv('quake_signals.csv')
print(train)
features = ['Duration', 'Height']
data = train[features]
print(data)
target = train['Time']
print(target)
model = LinearRegression()
model.fit(data, target)
quake_time = model.predict([[2, 4]])
print(quake_time)
台灣地震預測研究所 所長
林湧森
2017-02-20 18:08 UTC+8
沒有留言:
張貼留言