Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigosnader committed Oct 7, 2022
1 parent 7e7b31b commit 2725dc3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pip install wavyts
import numpy as np
import pandas as pd
import wavy
from wavy import models

# Start with any time-series dataframe
df = pd.DataFrame({'price': np.random.randn(1000)}, index=range(1000))
Expand All @@ -60,23 +61,13 @@ print("Horizon:", y.num_timesteps)
# Set train-val-test split. Defaults to 0.7, 0.2 and 0.1, respectively.
wavy.set_training_split(x, y)

# Plot the target.
y.plot()
```

<img width="1128" alt="Screen Shot 2022-10-07 at 2 14 29 AM" src="https://user-images.githubusercontent.com/12815734/194472739-9735c301-ec1c-4ad2-9d50-04381e6d191f.png">


```python
# Convert to numpy arrays.
x_train, y_train = x.train.values, y.train.values
x_test, y_test = x.test.values, y.test.values
print(x_train.shape, y_train.shape)

# Or just instantiate a model.
from wavy import models

model = wavy.models.LinearRegression(x, y)
model = models.LinearRegression(x, y)
model.score()
```

Expand Down

0 comments on commit 2725dc3

Please sign in to comment.