confidence interval
This commit is contained in:
@@ -18,15 +18,15 @@ else:
|
|||||||
|
|
||||||
target = "Gross"
|
target = "Gross"
|
||||||
drivers = [
|
drivers = [
|
||||||
"Release Year",
|
# "Release Year",
|
||||||
"Duration",
|
# "Duration",
|
||||||
"IMDB Rating",
|
# "IMDB Rating",
|
||||||
"Metascore",
|
# "Metascore",
|
||||||
"Votes",
|
# "Votes",
|
||||||
"Genre 1",
|
# "Genre 1",
|
||||||
"Genre 2",
|
# "Genre 2",
|
||||||
"Genre 3",
|
# "Genre 3",
|
||||||
"Director",
|
# "Director",
|
||||||
"Cast",
|
"Cast",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -38,8 +38,11 @@ y, X = dmatrices(description_string, data=df, return_type="dataframe")
|
|||||||
|
|
||||||
model = sm.OLS(y, X)
|
model = sm.OLS(y, X)
|
||||||
results = model.fit()
|
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