Spaces:
Sleeping
Sleeping
File size: 517 Bytes
dee4d19 92461c6 dee4d19 233fa77 dee4d19 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from pycaret.classification import *
import streamlit as st
@st.experimental_memo
def prep_and_train(targ, data, models=None):
s = setup(data, target = targ, session_id = 12)
s_df = pull()
best = compare_models(include=models)
best_df = pull()
return best, s_df, best_df
@st.experimental_memo
def tuning(_model, n_iters, search_lib):
tuned_dt = tune_model(estimator=_model, n_iter=n_iters, search_library=search_lib, choose_better=True)
info_df = pull()
return tuned_dt, info_df
|