Skip to content

Commit

Permalink
Add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelZe committed Nov 26, 2023
1 parent 1f8c20b commit 7c0d2d2
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,25 @@

## Usage

Documentation is available [here](https://KarelZe.github.io/tclf/).
```python
>>> X = pd.DataFrame(
... [
... [1.5, 1, 3],
... [2.5, 1, 3],
... [1.5, 3, 1],
... [2.5, 3, 1],
... [1, np.nan, 1],
... [3, np.nan, np.nan],
... ],
... columns=["trade_price", "bid_ex", "ask_ex"],
... )
>>> y = pd.Series([-1, 1, 1, -1, -1, 1])
>>> clf = ClassicalClassifier(layers=[("quote", "ex")], strategy="const")
>>> clf.fit(X, y)
ClassicalClassifier(layers=[('quote', 'ex')], strategy='const')
>>> pred = clf.predict_proba(X)
```
A detailled documentation is available [here](https://KarelZe.github.io/tclf/).

## References

Expand Down

0 comments on commit 7c0d2d2

Please sign in to comment.