From 45f293f75cc95e10c6fc7bf02030c39358e4d583 Mon Sep 17 00:00:00 2001 From: Joey Eamigh <55670930+JoeyEamigh@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:09:06 -0400 Subject: [PATCH] confidence interval --- busi410project/fit.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/busi410project/fit.py b/busi410project/fit.py index 0ac03c1..9ff1594 100644 --- a/busi410project/fit.py +++ b/busi410project/fit.py @@ -18,15 +18,15 @@ else: target = "Gross" drivers = [ - "Release Year", - "Duration", - "IMDB Rating", - "Metascore", - "Votes", - "Genre 1", - "Genre 2", - "Genre 3", - "Director", + # "Release Year", + # "Duration", + # "IMDB Rating", + # "Metascore", + # "Votes", + # "Genre 1", + # "Genre 2", + # "Genre 3", + # "Director", "Cast", ] @@ -38,8 +38,11 @@ y, X = dmatrices(description_string, data=df, return_type="dataframe") model = sm.OLS(y, X) results = model.fit() +summary = results.summary() -print(results.summary()) +# print(results.pvalue) +print(results.conf_int_el(0)) -with open("./out/model_summary.csv", "w") as f: - f.write(results.summary().as_csv()) + +with open("./out/model_summary_cast.csv", "w") as f: + f.write(summary.as_csv())