Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Generate bootstrap replicate of 1D data that return a particular operation on a range

def draw_bs_reps(data, func, size=1):
    """Draw bootstrap replicates."""

    # Initialize array of replicates: bs_replicates
    bs_replicates = np.empty(size)

    # Generate replicates
    for i in range(size):
        bs_replicates[i] = bootstrap_replicate_1d(data, func)

    return bs_replicates
Source by campus.datacamp.com #
 
PREVIOUS NEXT
Tagged: #Generate #bootstrap #replicate #data #return #operation #range
ADD COMMENT
Topic
Name
9+1 =