quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

Intro to Data Science : Problem Set 3

Intro to Data Science Online Course - Udacity

Analyzing Subway Data

    plt.figure()
    turnstile_weather['ENTRIESn_hourly'][turnstile_weather['rain']==1].hist(bins=20, alpha = 0.8) # your code here to plot a historgram for hourly entries when it is raining
    turnstile_weather['ENTRIESn_hourly'][turnstile_weather['rain']==0].hist(bins=20, alpha = 0.3) # your code here to plot a historgram for hourly entries when it is not raining
    return plt

ここでクレジットカードの登録をさせられる
Free期間は2週間後 188$/month ?

    with_rain = turnstile_weather['ENTRIESn_hourly'][turnstile_weather['rain'] == 1]
    without_rain = turnstile_weather['ENTRIESn_hourly'][turnstile_weather['rain'] == 0]
    
    with_rain_mean = np.mean(with_rain)
    without_rain_mean = np.mean(without_rain)
    U, p = scipy.stats.mannwhitneyu(with_rain, without_rain)

Output

Here's your output:
(1105.4463767458733, 1090.278780151855, 1924409167.0, 0.024999912793489721)

f:id:quattro_4:20150115233450p:plain

r_squared = 1 - ( np.sum(np.square(data - predictions)) )/( np.sum(np.square(data - np.mean(data))) )

Your calculated R2 value is: 0.318137233709


1.5h