<jupyter_start><jupyter_text>Set record number<jupyter_code>k = 100000<jupyter_output><empty_output><jupyter_text>Create noise array<jupyter_code>import numpy as np
np.set_printoptions(suppress=True)
noise = np.random.normal(0,1,k)
noise
noise.size<jupyter_output><empty_output><jupyter_text>Create first variable (source1) through autoregression: S1(n)=0.95*√2*S1(n-1) - 0.90*S1(n-2) + ε1<jupyter_code>source1 = np.zeros((k))
import math
source1[1] = noise[1] + 10
source1[2] = noise[2] + 10
for x in range(3,k):
  source1[x] = 0.95*math.sqrt(2)*source1[x-1] - 0.90*source1[x-2] + noise[x]


source1
np.savetxt("source1.csv", source1, delimiter=",")
#def oneTimeSeries(x0, x1, noise, 100):
#  noise[] = 0.95*x0 - 0.92*x0

from google.colab import files
files.download( "source1.csv" ) 


#import matplotlib.pylab as plt
import matplotlib.pyplot as plt
# plot the line
from matplotlib.pyplot import figure
figure(num=None, figsize=(20, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.figure(figsize=(20,10))
plt.plot(source1)

#from matplotlib.pyplot import figure
#figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.set_size_inches(11,8)
#plot.show()
plt.show()<jupyter_output><empty_output><jupyter_text>Create variable source2 through autoregressionS2(n)=0.5*S2(n-1) + ε2<jupyter_code>source2 = np.zeros((k))
np.set_printoptions(suppress=True)
noise2 = np.random.normal(0,1,k)
noise2
import math
source2[1] = noise2[1]
source2[2] = noise2[2]
for x in range(3,k):
  source2[x] = 0.5*source2[x-2] + noise2[x]


source2
np.savetxt("source2.csv", source2, delimiter=",")
#def oneTimeSeries(x0, x1, noise, 100):
#  noise[] = 0.95*x0 - 0.92*x0

from google.colab import files
files.download( "source2.csv" )

import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
figure(num=None, figsize=(20, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.figure(figsize=(20,10))
plt.plot(source2)

#from matplotlib.pyplot import figure
#figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.set_size_inches(11,8)
#plot.show()
plt.show()<jupyter_output><empty_output><jupyter_text>Create variable source3 based on autoregression source1 and source2S3(n)= -0.5*S1(n-1) + 0.25 * √2  * S3(n-1) + 0.25 * √2  * S2(n-1) + ε3<jupyter_code>source3 = np.zeros((k))
np.set_printoptions(suppress=True)
noise3 = np.random.normal(0,1,k)
noise3
import math
source3[1] = noise3[1]
source3[2] = noise3[2]
for x in range(3,k):
  source3[x] = -0.5*source1[x-1] + 0.25*math.sqrt(2)*source3[x-1] +0.25*math.sqrt(2)*source2[x-1] + noise3[x]


source2
np.savetxt("source3.csv", source3, delimiter=",")
#def oneTimeSeries(x0, x1, noise, 100):
#  noise[] = 0.95*x0 - 0.92*x0

from google.colab import files
files.download( "source3.csv" )

import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
figure(num=None, figsize=(20, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.figure(figsize=(20,10))
plt.plot(source3)

#from matplotlib.pyplot import figure
#figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.set_size_inches(11,8)
#plot.show()
plt.show()<jupyter_output><empty_output><jupyter_text>Create variable source4 based on autoregression, and source3S4(n)= 0.95*S4(n-1) - 0.25 * √2  * S3(n-1) + ε4<jupyter_code>source4 = np.zeros((k))
np.set_printoptions(suppress=True)
noise4 = np.random.normal(0,1,k)
import math
source4[1] = noise4[1] + 10
source4[2] = noise4[2] + 10
for x in range(3,k):
  source4[x] = 0.95*source4[x-1] - 0.25*math.sqrt(2)*source3[x-1] + noise4[x]


source4
np.savetxt("source4.csv", source4, delimiter=",")
#def oneTimeSeries(x0, x1, noise, 100):
#  noise[] = 0.95*x0 - 0.92*x0

from google.colab import files
files.download( "source4.csv" ) 

import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
figure(num=None, figsize=(20, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.figure(figsize=(20,10))
plt.plot(source4)

#from matplotlib.pyplot import figure
#figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
#plt.set_size_inches(11,8)
#plot.show()
plt.show()
combined = np.vstack((source1, source2, source3, source4)).T
np.savetxt("combined.csv", combined, delimiter=",", fmt='%f')
from google.colab import files
files.download( "combined.csv" ) 
combined<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.179135687732342, 'fraction_numerical': 0.07225836431226766, 'mean_word_length': 6.473958333333333, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '342786', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1974, 'n_tokens_neox': 1835, 'n_words': 341, 'path': 'Synthetic_Data_Generation/synthetic-data-generation-linear.ipynb', 'repo_name': 'big-data-lab-umbc/Big-Data-Climate-Causality-Analytics', 'size': '4304'}