Skip to content

Commit

Permalink
Add feature data to dataset overview
Browse files Browse the repository at this point in the history
  • Loading branch information
PGijsbers committed Jul 12, 2024
1 parent 8800c96 commit 38906a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import json
from collections import defaultdict
from pathlib import Path
import re

import pandas as pd
import streamlit as st
Expand Down Expand Up @@ -69,6 +70,13 @@ def load_label_data() -> dict[int, list[str]]:
with st.expander(label="description", expanded=True):
st.write(dataset["description"])


FEATURE_PATTERN = re.compile(r"\d+ : \[\d+ - ([^ ]+) \((\w+)\)]")
with st.expander(label="features", expanded=True):
features = [match.groups() for match in FEATURE_PATTERN.finditer(dataset["features"])]
st.write(pd.DataFrame(features, columns=["name", "type"]))


with st.expander(label="meta-features", expanded=True):
meta_left, meta_right = st.columns(spec=2)
feature_columns = [
Expand Down

0 comments on commit 38906a2

Please sign in to comment.