Question: from sklearn.linear _ model import LinearRegression regr = LinearRegression ( ) regr.fit ( genre _ dummies, gross [ ' inflation _ adjusted _ gross' ]
from sklearn.linearmodel import LinearRegression
regr LinearRegression
regr.fitgenredummies, grossinflationadjustedgross'
action regr.intercept
adventure regr.coef
printaction adventure
Next, we will compute confidence intervals for the intercept and coefficients. The confidence intervals for the intercept and coefficient means that the intervals have a probability of to contain the true value and coefficient respectively. If there is a significant relationship between a given genre and the adjusted gross, the confidence interval of its coefficient should exclude We will calculate the confidence intervals using the pairs bootstrap method.
# Import a module
import numpy as np
# Create an array of indices to sample from
inds #CODE HERE
# Initialize replicate arrays
size
bsactionreps #CODE HERE
bsadventurereps #CODE HERE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
