Skip to content

Commit

Permalink
Add fake df and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
teobucci committed Mar 25, 2024
1 parent 74385a9 commit 1752479
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions hawk/processes/simulation_interactive.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
import numpy as np
import pandas as pd
from birdy import WPSClient
#from keras import models

# from keras import models

url = "http://localhost:5000/wps"
wps = WPSClient(url, verify=False)
help(wps)

np.random.seed(0)
n = 1000 # number of samples
m = 15 # number of features

resp = wps.hello(name="Pluto")
print(resp)
resp.get()
data = {}
for i in range(1, m + 1):
data[f"x{i}"] = np.random.normal(size=n)

data["y"] = sum(data.values()) + np.random.normal(size=n)

data = pd.DataFrame(data)

n_test = int(0.20 * n)
n_train = n - n_test
data_test = data[n_train:]
data = data[:n_train]

data.head()

target_name = "y"

url = "http://localhost:5000/wps"
wps = WPSClient(url, verify=False)
help(wps)

resp = wps.cyclone(start_day="2019-01-04", end_day="2019-01-06", area="Sindian")
resp = wps.causal()
print(resp)
resp.get()

0 comments on commit 1752479

Please sign in to comment.