<jupyter_start><jupyter_text>震源深さ<jupyter_code>RR=np.arange(30,300,0.01)
RRR=np.arange(100,300,0.1)
pgv8H=10**(0.69*7+0.0042*8-1.75-np.log10(RR+0.0033*10**(0.5*7))-0.002*RR)
pgv100H=10**(0.69*7+0.0042*100-1.75-np.log10(RRR+0.0033*10**(0.5*7))-0.002*RRR)
plt.plot(RR,pgv8H, label='D=8',color='blue')
plt.loglog(RR,pgv8H,color='blue')

plt.plot(RRR,pgv100H, label='D=200',color='green')
plt.loglog(RRR,pgv100H,color='green')

plt.xlim(10,1000)
plt.ylim(0.5,100)

plt.xlabel('Fault distance km')
plt.ylabel('PGV cm/s')

plt.title('The effects of depth on PGV')

plt.legend()
plt.show()<jupyter_output><empty_output><jupyter_text>hikaku<jupyter_code>pgvSM=10**(0.58*7+0.0038*8+0-1.29-np.log10(r+0.0028*10**3.5)-0.002*r)
pgvJB=10**(0.489*7+0-0.67+0.17*0+0.22*1-np.log10(r+0)-0.00256*r)
pgvTHIS=10**(0.69*7+0.0042*8-1.75-np.log10(r+0.0033*10**(0.5*7))-0.002*r)
plt.plot(r,pgvSM, label='Si and Midorikawa, Crustal',linestyle='--',color='black')
plt.loglog(r,pgvSM,linestyle='--',color='black')

plt.plot(r,pgvJB,label='<NAME>, Rock, 84',linestyle='-.',color='black')
plt.loglog(r,pgvJB,linestyle='-.',color='black')

plt.plot(r,pgvTHIS,label='This study',linestyle='-',color='black')
plt.loglog(r,pgvTHIS,linestyle='-',color='black')

plt.xlim(1,100)
plt.ylim(1,200)

plt.title('Mw=7.0,Depth=8km')

plt.xlabel('Fault distance km')
plt.ylabel('PGV cm/s')

plt.legend()
plt.show()<jupyter_output><empty_output><jupyter_text>test  kumamoto0414<jupyter_code>import pandas as pd
kumamoto0414=pd.read_csv('kumamoto.csv')
kumamoto0414.head()
M=kumamoto0414.iloc[:,0].values
Rkumamoto0414=kumamoto0414.iloc[:,1].values
D=kumamoto0414.iloc[:,2].values
Ypgvkumamoto0414=10**(0.69*M+0.0042*D-1.75-np.log10(Rkumamoto0414+0.0033*10**(0.5*M))-0.002*Rkumamoto0414)
YYpgvkumamoto0414=10**(0.58*M+0.0038*D-1.29-np.log10(Rkumamoto0414+0.0028*10**(0.5*M))-0.002*Rkumamoto0414)
Kpgvkumamoto0414=pd.read_csv('pgvkumamoto.csv')
plt.title('kumamoto0414') 
plt.scatter(Rkumamoto0414,Kpgvkumamoto0414,s=13,color='green',label='kansoku',alpha=1) 
plt.scatter(Rkumamoto0414,Ypgvkumamoto0414,s=13,color='red',label='yosoku',alpha=1)
plt.scatter(Rkumamoto0414,YYpgvkumamoto0414,s=13,color='gray',label='SM',alpha=1)

plt.xlim(10,500) 
plt.ylim(0.1,10000) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
from sklearn import metrics
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvkumamoto0414,Ypgvkumamoto0414))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvkumamoto0414,Ypgvkumamoto0414))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvkumamoto0414, Ypgvkumamoto0414)))
from sklearn import metrics
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvkumamoto0414,YYpgvkumamoto0414))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvkumamoto0414,YYpgvkumamoto0414))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvkumamoto0414, YYpgvkumamoto0414)))<jupyter_output>Mean Absolute Error 1.0388263921833645
Mean Squared Error: 13.9936132194352
Root Mean Squared Error: 3.740803819961052<jupyter_text>kumamoto0416<jupyter_code>kumamoto0416=pd.read_csv('kumamoto416.csv')
M0416=kumamoto0416.iloc[:,0].values
Rkumamoto0416=kumamoto0416.iloc[:,1].values
D0416=kumamoto0416.iloc[:,2].values
Ypgvkumamoto0416=10**(0.69*M0416+0.0042*D0416-1.75-np.log10(Rkumamoto0416+0.0033*10**(0.5*M0416))-0.002*Rkumamoto0416)
YYpgvkumamoto0416=10**(0.58*M0416+0.0038*D0416-1.29-np.log10(Rkumamoto0416+0.0028*10**(0.5*M0416))-0.002*Rkumamoto0416)
Kpgvkumamoto0416=pd.read_csv('pgvkumamoto416.csv')
plt.title('kumamoto0416') 
plt.scatter(Rkumamoto0416,Kpgvkumamoto0416, s=13,color='green', label='kansoku',alpha=1) 
plt.scatter(Rkumamoto0416,Ypgvkumamoto0416, s=13,color='red', label='yosoku',alpha=1)
plt.scatter(Rkumamoto0416,YYpgvkumamoto0416, s=13,color='gray', label='SM',alpha=1)

plt.xlim(10,500) 
plt.ylim(0.1,10000) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvkumamoto0416,Ypgvkumamoto0416))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvkumamoto0416,Ypgvkumamoto0416))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvkumamoto0416, Ypgvkumamoto0416)))
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvkumamoto0416,YYpgvkumamoto0416))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvkumamoto0416,YYpgvkumamoto0416))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvkumamoto0416, YYpgvkumamoto0416)))<jupyter_output>Mean Absolute Error 2.471527065154672
Mean Squared Error: 34.71658838041814
Root Mean Squared Error: 5.892078443165717<jupyter_text>osaka0618<jupyter_code>osaka0618=pd.read_csv('osaka0618.csv')
M0618=osaka0618.iloc[:,0].values
Rosaka0618=osaka0618.iloc[:,1].values
D0618=osaka0618.iloc[:,2].values
Ypgvosaka0618=10**(0.69*M0618+0.0042*D0618-1.75-np.log10(Rosaka0618+0.0033*10**(0.5*M0618))-0.002*Rosaka0618)
YYpgvosaka0618=10**(0.58*M0618+0.0038*D0618-1.29-np.log10(Rosaka0618+0.0028*10**(0.5*M0618))-0.002*Rosaka0618)
Kpgvosaka0618=pd.read_csv('pgvosaka0618.csv')
plt.title('osaka0618') 
plt.scatter(Rosaka0618,Kpgvosaka0618,s=13, color='green', label='kansoku',alpha=1) 
plt.scatter(Rosaka0618,Ypgvosaka0618,s=13, color='red', label='yosoku',alpha=1)
plt.scatter(Rosaka0618,YYpgvosaka0618,s=13, color='gray', label='SM',alpha=1)

plt.xlim(10,500) 
plt.ylim(0.1,10000) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvosaka0618,Ypgvosaka0618))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvosaka0618,Ypgvosaka0618))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvosaka0618, Ypgvosaka0618)))
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvosaka0618,YYpgvosaka0618))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvosaka0618,YYpgvosaka0618))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvosaka0618, YYpgvosaka0618)))<jupyter_output>Mean Absolute Error 0.6735692339472611
Mean Squared Error: 6.60754338981827
Root Mean Squared Error: 2.5705142267294048<jupyter_text>hokkaido0906<jupyter_code>hokkaido0906=pd.read_csv('hokkaido0906.csv')
M0906=hokkaido0906.iloc[:,0].values
Rhokkaido0906=hokkaido0906.iloc[:,1].values
D0906=hokkaido0906.iloc[:,2].values
Ypgvhokkaido0906=10**(0.69*M0906+0.0042*D0906-1.75-np.log10(Rhokkaido0906+0.0033*10**(0.5*M0906))-0.002*Rhokkaido0906)
YYpgvhokkaido0906=10**(0.58*M0906+0.0038*D0906-1.29-np.log10(Rhokkaido0906+0.0028*10**(0.5*M0906))-0.002*Rhokkaido0906)
Kpgvhokkaido0906=pd.read_csv('pgvhokkaido0906.csv')
plt.title('hokkaido0906') 
plt.scatter(Rhokkaido0906,Kpgvhokkaido0906,s=13, color='green', label='kansoku',alpha=1) 
plt.scatter(Rhokkaido0906,Ypgvhokkaido0906, s=13,color='red', label='yosoku',alpha=1)
plt.scatter(Rhokkaido0906,YYpgvhokkaido0906, s=13,color='gray', label='SM',alpha=1)

plt.xlim(10,500) 
plt.ylim(0.1,10000) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvhokkaido0906,Ypgvhokkaido0906))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvhokkaido0906,Ypgvhokkaido0906))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvhokkaido0906, Ypgvhokkaido0906)))
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvhokkaido0906,YYpgvhokkaido0906))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvhokkaido0906,YYpgvhokkaido0906))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvhokkaido0906, YYpgvhokkaido0906)))<jupyter_output>Mean Absolute Error 2.5262485810911315
Mean Squared Error: 122.96339266402015
Root Mean Squared Error: 11.088885997430948<jupyter_text>100㎞以下のテスト  hokkaido<jupyter_code>hokkaido100=pd.read_csv('h100.csv')
Mh100=hokkaido100.iloc[:,0].values
Rh100=hokkaido100.iloc[:,1].values
Dh100=hokkaido100.iloc[:,2].values
Ypgvh100=10**(0.69*Mh100+0.0042*Dh100-1.75-np.log10(Rh100+0.0033*10**(0.5*Mh100))-0.002*Rh100)
Kpgvh100=pd.read_csv('ph100.csv')
plt.title('hokkaido100') 
plt.scatter(Rh100,Kpgvh100,s=13, color='green', label='kansoku',alpha=1) 
plt.scatter(Rh100,Ypgvh100, s=13,color='red', label='yosoku',alpha=1)

plt.xlim(10,100) 
plt.ylim(1,300) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvh100,Ypgvh100))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvh100,Ypgvh100))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvh100,Ypgvh100)))<jupyter_output>Mean Absolute Error 10.866402195493446
Mean Squared Error: 567.587646480942
Root Mean Squared Error: 23.824098020301673<jupyter_text>osaka<jupyter_code>osaka100=pd.read_csv('o100.csv')
Mo100=osaka100.iloc[:,0].values
Ro100=osaka100.iloc[:,1].values
Do100=osaka100.iloc[:,2].values
Ypgvo100=10**(0.69*Mo100+0.0042*Do100-1.75-np.log10(Ro100+0.0033*10**(0.5*Mo100))-0.002*Ro100)
Kpgvo100=pd.read_csv('po100.csv')
plt.title('osaka100') 
plt.scatter(Ro100,Kpgvo100,s=13, color='green', label='kansoku',alpha=1) 
plt.scatter(Ro100,Ypgvo100, s=13,color='red', label='yosoku',alpha=1)

plt.xlim(10,100) 
plt.ylim(1,100) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvo100,Ypgvo100))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvo100,Ypgvo100))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvo100,Ypgvo100)))<jupyter_output>Mean Absolute Error 2.693888788179525
Mean Squared Error: 20.842254197300466
Root Mean Squared Error: 4.565331772971212<jupyter_text>kumamoto0416<jupyter_code>kh100=pd.read_csv('kh100.csv')
Mkh100=kh100.iloc[:,0].values
Rkh100=kh100.iloc[:,1].values
Dkh100=kh100.iloc[:,2].values
Ypgvkh100=10**(0.69*Mkh100+0.0042*Dkh100-1.75-np.log10(Rkh100+0.0033*10**(0.5*Mkh100))-0.002*Rkh100)
Kpgvkh100=pd.read_csv('pkh100.csv')
plt.title('kumamoto(0416)100') 
plt.scatter(Rkh100,Kpgvkh100,s=13, color='green', label='kansoku',alpha=1) 
plt.scatter(Rkh100,Ypgvkh100, s=13,color='red', label='yosoku',alpha=1)

plt.xlim(10,100) 
plt.ylim(1,200) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvkh100,Ypgvkh100))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvkh100,Ypgvkh100))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvkh100,Ypgvkh100)))<jupyter_output>Mean Absolute Error 13.557945845474563
Mean Squared Error: 266.94433818310256
Root Mean Squared Error: 16.338431325653712<jupyter_text>kumamoto0414<jupyter_code>kz100=pd.read_csv('kz100.csv')
Mkz100=kz100.iloc[:,0].values
Rkz100=kz100.iloc[:,1].values
Dkz100=kz100.iloc[:,2].values
Ypgvkz100=10**(0.69*Mkz100+0.0042*Dkz100-1.75-np.log10(Rkz100+0.0033*10**(0.5*Mkz100))-0.002*Rkz100)
Kpgvkz100=pd.read_csv('pkz100.csv')
plt.title('kumamoto(0414)100') 
plt.scatter(Rkz100,Kpgvkz100,s=13, color='green', label='kansoku',alpha=1) 
plt.scatter(Rkz100,Ypgvkz100, s=13,color='red', label='yosoku',alpha=1)

plt.xlim(10,100) 
plt.ylim(1,100) 
plt.xlabel('distance(km)') 
plt.ylabel('pgv(cm/s)') 
plt.yscale('log') 
plt.xscale('log') 
plt.legend() 
plt.grid(True) 
plt.show
print('Mean Absolute Error',metrics.mean_absolute_error(Kpgvkz100,Ypgvkz100))
print('Mean Squared Error:', metrics.mean_squared_error(Kpgvkz100,Ypgvkz100))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(Kpgvkz100,Ypgvkz100)))<jupyter_output>Mean Absolute Error 4.492051036955756
Mean Squared Error: 32.94941128561028
Root Mean Squared Error: 5.740157775323801
{'fraction_non_alphanumeric': 0.17773372976544433, 'fraction_numerical': 0.1721176081929303, 'mean_word_length': 10.338014981273409, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '303964', 'license': 'MIT', 'n_tokens_mistral': 7094, 'n_tokens_neox': 5535, 'n_words': 491, 'path': 'attenuation graph.ipynb', 'repo_name': 'chiba1sonny/Pgv_attenuation_of_traditional_equation_and_machine_learning_methods', 'size': '12118'}