forked from markdregan/FreqAI-Marcos-Lopez-De-Prado
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
664f7bd
commit c4aed2c
Showing
24 changed files
with
9,521 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import streamlit as st | ||
import sqlite3 | ||
import pandas as pd | ||
import seaborn as sns | ||
import matplotlib.pyplot as plt | ||
|
||
# Connect to the SQLite database | ||
conn = sqlite3.connect("litmus.sqlite") | ||
# Query the data | ||
data = pd.read_sql_query("SELECT * FROM feature_importance_history", conn) | ||
# Disconnect from the database | ||
conn.close() | ||
|
||
|
||
st.dataframe(data) | ||
|
||
# Boxplot | ||
data = data[data["pair"] == "SOL/USDT:USDT"] | ||
ranks = data.groupby("feature_id")["importance"].mean().sort_values()[::-1].index | ||
|
||
sns.set_theme(style="ticks") | ||
|
||
fig, ax = plt.subplots(figsize=(7, 200)) | ||
sns.boxplot(x="importance", y="feature_id", data=data, | ||
whis=[0, 100], width=.6, palette="vlag", order=ranks) | ||
ax.xaxis.grid(True) | ||
ax.set(ylabel="") | ||
sns.despine(trim=True, left=True) | ||
st.pyplot(fig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import streamlit as st | ||
import numpy as np | ||
import pandas as pd | ||
|
||
st.write("# Litmus Dashboard") | ||
st.write("Here's our first attempt at using data to create a table:") | ||
st.write(pd.DataFrame({ | ||
'first column': [1, 2, 3, 4], | ||
'second column': [10, 20, 30, 40] | ||
})) | ||
|
||
st.write("### Line chart") | ||
chart_data = pd.DataFrame( | ||
np.random.randn(20, 3), | ||
columns=['a', 'b', 'c']) | ||
st.line_chart(chart_data) | ||
|
||
st.write("### Map demo") | ||
map_data = pd.DataFrame( | ||
np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4], | ||
columns=['lat', 'lon']) | ||
st.map(map_data) | ||
|
||
st.write("### Slider") | ||
x = st.slider('x') # 👈 this is a widget | ||
st.write(x, 'squared is', x * x) | ||
|
||
st.text_input("Your name", key="name") | ||
st.session_state.name | ||
|
||
if st.checkbox('Show dataframe'): | ||
chart_data = pd.DataFrame( | ||
np.random.randn(20, 3), | ||
columns=['a', 'b', 'c']) | ||
|
||
chart_data |
Oops, something went wrong.