For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Bike Rides and the Poisson Model

2/17/23, 3:13 PM Bike Rides and the Poisson Model — Data Mining
https://pantelis.github.io/data-mining/aiml-common/assignments/mle/poisson-regression-1/index.html 1/1
Bike Rides and the Poisson Model
Contents
Maximum Likelihood I
Maximum Likelihood II
To help the urban planners, you are called to model the daily bike rides in NYC using this
dataset
. The dataset contains date, day of the week, high and low temp, precipitation and bike
ride couunts as columns.
Maximum Likelihood I
The obvious choice in distributions is the Poisson distribution which depends only on one
parameter, λ, which is the average number of occurrences per interval. We want to estimate this
parameter using Maximum Likelihood Estimation.
Implement a Gradient Descent algorithm from scratch that will estimate the Poisson distribution
according to the Maximum Likelihood criterion. Plot the estimated mean vs iterations to
showcase convergence towards the true mean.
References:
1.
This blog post.
2.
This blog post and note the negative log likelihood function.
Maximum Likelihood II
A colleague of yours suggest that the parameter must be itself dependent on the weather and
other factors since people bike when its not raining. Assume that you model as

where
is one of the example features and
is a set of parameters.

xi
w

Train the model with SGD with this assumption and compare the MSE of the predictions with the
Maximum Likelihood I approach.
You may want to use
this partial derivative of the log likelihood function
# Code here
λ
λ
λ
i = exp(wTxi)
#
By Pantelis Monogioudis, Ph.D
© Copyright 2023.

Generated by Feedzy

CLAIM YOUR 25% OFF TODAY

X
IntaSend Secure Payments (PCI-DSS Compliant) Secured by IntaSend Payments
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?