confidence interval

This commit is contained in:
Joey Eamigh
2024-04-18 17:09:06 -04:00
parent dcc96e130d
commit 45f293f75c

View File

@@ -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())