मॉडल अनिश्चितता और सैंपल वितरण

Python में Linear Modeling परिचय

Jason Vestuto

Data Scientist

जनसंख्या उपलब्ध नहीं

दिनों की गिनती बनाम तापमान बिन का हिस्टोग्राम प्लॉट, अगस्त में दैनिक उच्च तापमान

Python में Linear Modeling परिचय

पॉपुलेशन मॉडल के रूप में सैंपल

2 हिस्टोग्राम: एक सैंपल के लिए, एक पॉपुलेशन के लिए; दोनों में नार्मलाइज़्ड दिन-गिनती बनाम तापमान बिन, सैंपल की बारें पॉपुलेशन जैसी ऊँचाई की

Python में Linear Modeling परिचय

सैंपल सांख्यिकीय मान

एक सैंपल का हिस्टोग्राम प्लॉट, दिनों की गिनती बनाम तापमान बिन

Python में Linear Modeling परिचय

बूटस्ट्रैप रिसैंपलिंग

3 हिस्टोग्राम का प्लॉट: तीन अलग सैंपल के लिए, जिनके केंद्र एक-दूसरे से खिसके हुए हैं; अक्ष: दिन-गिनती बनाम तापमान बिन

Python में Linear Modeling परिचय

रिसैंपल वितरण

मीन का हिस्टोग्राम प्लॉट, अक्ष: सैंपल काउंट्स बनाम औसत तापमान बिन

Python में Linear Modeling परिचय

कोड में बूटस्ट्रैप

# Use sample as model for population
population_model = august_daily_highs_for_2017
# Simulate repeated data acquisitions by resampling the "model"
for nr in range(num_resamples):
    bootstrap_sample = np.random.choice(population_model, size=resample_size, replace=True)
    bootstrap_means[nr] = np.mean(bootstrap_sample)
# Compute the mean of the bootstrap resample distribution
estimate_temperature = np.mean(bootstrap_means)
# Compute standard deviation of the bootstrap resample distribution
estimate_uncertainty = np.std(bootstrap_means)
Python में Linear Modeling परिचय

रिप्लेसमेंट

# Define the sample of notes
sample = ['A', 'B', 'C', 'D', 'E', 'F', 'G']
# Replace = True, repeats are allowed
bootstrap_sample = np.random.choice(sample, size=4, replace=True)
print(bootstrap_sample)
C C F G
Python में Linear Modeling परिचय

रिप्लेसमेंट

# Replace = False
bootstrap_sample = np.random.choice(sample, size=4, replace=False)
print(bootstrap_sample)
C G A F
# Replace = True, more lengths are allowed
bootstrap_sample = np.random.choice(sample, size=16, replace=True)
print(bootstrap_sample)
C C F G C G A E F D G B B A E C
Python में Linear Modeling परिचय

अभ्यास करते हैं!

Python में Linear Modeling परिचय

Preparing Video For Download...