confidence interval
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user