add confusion_matrix

This commit is contained in:
bastien ollier
2024-06-26 10:45:50 +02:00
parent 4054395641
commit 27e69b2af8
2 changed files with 12 additions and 16 deletions

View File

@@ -2,7 +2,6 @@ import streamlit as st
from sklearn.linear_model import LinearRegression
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
st.header("Prediction: Regression")
@@ -31,6 +30,7 @@ if "data" in st.session_state:
fig = plt.figure()
dataframe_sorted = pd.concat([X, y], axis=1).sort_values(by=data_name)
if len(data_name) == 1:
X = dataframe_sorted[data_name[0]]
y = dataframe_sorted[target_name]