Here's how I classify NFS Canon:
Classic Canon:
NFS 1, 2, 3: Hot Pursuit, High Stakes, Porsche Unleashed, and Hot Pursuit 2 are set in the same universe.
Black Box/Underground Canon:
Underground, Underground 2, Most Wanted 2005, and Carbon are all related thanks to the stories telling the player about the situation.
Undercover could also possibly fit into this as well.
ProStreet Canon:
ProStreet is unrelated to the previously mentioned games, and it's set in it's own canon.
Shift Canon:
The NFS Shift Series is also set within it's own canon. Some NFS fans consider it "non-canon".
Hot Pursuit/Most Wanted 2012/Rivals Canon:
Different Canon than the previously mentioned ones above. All of these games relate to each other.
The Run Canon:
Even though it's a Black Box games, it's set in real cities, and no references of Olympic, Bayview, Rockport or Palmont are made, thus making it separate canon.
Non-Canon:
All of the Game Boy, Nintendo DS ones (Most Wanted 5-1-0, Underground Rivals, Carbon: Own the City) and Need for Speed: Nitro are Non-Canon, and are spin-offs to the main series.
Need for Speed 2015/Ghost Canon:
It's a reboot, meaning this game does not share the same stories or canon with any previous NFS game.
That sums it up.