How to Beat the Golden State Warriors

By: Dr. Ikjyot Singh Kohli

The Golden State Warriors have posed quite the conundrum for opposing teams. They are quick, have a spectacular ability to move the ball, and play suffocating defense. Given their play in the playoffs thus far, all of these points have been exemplified even more to the point where it seems that they are unbeatable.

I wanted to take somewhat of a simplified approach and see if opposing teams are missing something. That is, is their some weakness in their play that opposing teams can exploit, a “weakness in Helm’s deep”?

“Helm’s Deep has but one weakness”– (Sorry, couldn’t resist!)
The most obvious place to start from a data science point-of-view seemed to me to look at every single shot the Warriors took as a team this season in each game and compile a grand ensemble shot chart. Using the data from and some data scraping scripts I wrote in R, I obtained the following:

Red circles denote missed shots, black circles denote made shots. Note that in this diagram and what follows, we have defined coordinates such that the origin of the x-y plane here denotes the far left and far bottom of an NBA court such that the basket itself is approximately at (x,y) = (25,0).
Certainly, on the surface, it seems that there is no discernible pattern between made shots and missed shots. This is where the machine learning comes in!

From here, I now extracted the x and y coordinates of each shot and recorded a response variable of “made” or “missed” in a table, such that the coordinates were now predictor variables and the shot classification (made/missed) was the response variable. Altogether, we had 7104 observations. Splitting this dataset up into a 70% training dataset and a 30% test data set, I tried the following algorithms, recording the % of correctly classified observations:

Algorithm % of Correctly Predicted Observations
Logistic Regression


Gradient Boosted Decision Trees


Random Forests


Neural Networks with Entropy Fitting


Naive Bayes Classification with Kernel Density Estimation


One sees that that gradient boosted decision trees had the best performance correctly classifying 62.62% of the test observations. Given how noisy the data is, this is not bad, and much better than expected. I should also mention that these numbers were obtained after tuning these models using cross-validation for optimal parameters.

Using the gradient boosted decision tree model, we made a set of predictions for a vast number of (x,y)-coordinates for basketball court. We obtained the following contour plot:


Overlaying this on top of the basketball court diagram, we got:


The contour plot levels denote the probabilities that the GSW will make a shot from a given (x,y) location on the court. As a sanity check, the lowest probabilities seem to be close to the 1/2-court line and beyond the three-point line. The highest probabilities are surprisingly along very specific areas on the court: very close the basket, the line from the basket to the left corner, extending up slightly, and a very narrow line extending from the basket to the right corner. Interestingly, the probabilities are low on the right side of the basket, specifically:


A map showing the probabilities more explicitly is as follows (although, upon uploading it, I realized it is a bit harder to read, I will re-upload a clearer version soon!)

In conclusion, it seems that, at least according to a first look at the data, the Warriors do indeed have several “weak spots” in their offense that opponents should certainly look to exploit by designing defensive schemes that force them to take shots in the aforementioned low-probability zones. As for future improvements, I think it would be interesting to add as predictor variables things like geographic location, crowd sizes, team opponent strengths, etc… I will look into making these improvements in the near future.

On The Science of Interstellar

I greatly debated with myself on whether to write this posting. I have seen Interstellar twice now including the special 70 mm IMAX screening, and am seeing it a third time later today. Simply put, the movie is fascinating. It combines, (yes) accurate science and real depictions of general relativistic effects with a great story as is to be expected from Christopher Nolan.

It was pointed out to me recently that some people have taken to the internet to write extensive articles criticizing the science in the movie, which is very strange. First, I didn’t think too much of it, as Kip Thorne was not only an executive producer, but also a consultant on the film, and has also seen the film. Surely, if there was something wrong from a GR-point-of-view, he would point it out. After all, he did manage to get two original scientific papers out of working on this movie.

The two reviews criticizing the science that I have seen, so far, stem from:

1. Phil Plait’s article:


2. Roberto Trotta’s article:

They seem to be keen on really nitpicking certain things, which is certainly in their prerogative to do so, but I will just discuss in this article a major flaw in both of their reviews, in which they claim part of the science of Interstellar is wrong. They seem to both have an issue with the time dilation effect as described in the movie of the water planet close to the Black Hole, where it is claimed in the movie that 1 hour in the planet’s reference frame corresponds to 7 years in an observer’s reference frame far from the black hole. The two reviewers then go on to say that this is impossible as:

1. One would have to essentially be a “pinch” from the event horizon of the black hole.

2. The planet would not be in a stable orbit, and would spiral and crash into the black hole’s singularity point.

These are their two grand assumptions, but simply put, these assumptions are very, very wrong! They are basing their assumptions on the Schwarzschild solution of General Relativity:


This metric tensor describes the local geometry of the spacetime outside the region of a static, non-rotating, and spherically symmetric black hole/astrophysical body.

Notice how I emphasized non-rotating. If one uses this geometry as Plait and Trotta have, one will deduce all sorts of wrong conclusions. In truth, as has been said by both Thorne and Nolan during the special features videos posted on YouTube and I believe by the characters in the film, the black hole in the movie is spinning very, very fast and therefore, its angular momentum cannot be neglected. One therefore needs to at minimum use the Kerr metric:




J denotes the angular momentum and is absolutely key to understanding that the effect depicted in the movie is indeed very plausible.

Now we deal with the claimed time dilation effect of 1 hour = 7 years as described earlier. It can be shown that the time dilation equation derived from the Kerr metric takes the form:

latex-image-4Substituting for d\tau = 1 hour, and dt = 7 years, one obtains the following relation:


This equation fully describes a black hole of mass M, rotating with angular momentum J, as observed by an observer at radial coordinate r, and angular coordinate theta. The fraction on the right-hand-side of the equation fully depicts the 1 hour = 7 years dilation effect. For the Kerr metric, unlike the Schwarzschild metric, there are several stable orbits that can occur. Plait’s article took issue with the fact that for a stable orbit, the orbital radius should be 3 times the Schwarzschild radius, but as I said, it is due to him assuming the incorrect geometry. In actuality, the Kerr metric allows for three possible stable orbits, which were derived in the paper by Bardeen, Press, Teukolsky: Astrophysical Journal, Vol. 178, pp. 347-370 (1972):

1. For zero angular momentum: innermost stable orbit = 3 x Schwarzschild radius

2. For angular momentum a = M, corresponding to corotational behaviour: innermost stable orbit = 0.5 * Schwarzschild radius

3. For angular momentum a = M, corresponding to retrograde motion: innermost stable orbit = 9/2 * Schwarzschild radius

It turns out that the only way to satisfy the equation above is by considering case #2 here: One obtains two solutions:



Therefore, as this shows, it is completely possible to have a rotating black hole with an observer outside of it that experiences such time dilation effects while still exhibiting a stable orbit, that is, it never crashes into the black hole!

Just for fun, let’s plug in some numbers. Let us consider a very massive black hole that has a mass of 2000 Solar Masses, applying the above formulas we see that:


I chose to fix the angular coordinate for demonstration purposes only.

Therefore, this calculation shows that the time dilation effect in the movie is perfectly reasonable and accurate. I will write more about the other aspects of people’s reviews later which on a first reading seem to also be based on incorrect assumptions, but at the present moment, I don’t have the time!

Update: So, an article was just released detailing the science of Interstellar: 

In it, it is said that the mass of the black hole is 100 million solar masses. With this now, I can properly work out the example above, I made up numbers before, because I did not have this information before today! So, here it is re-worked:

For a very massive black hole, in the movie it is stated that M = 100 million times the mass of the sun. With this information, substituting into the equation above, we get:


This will no doubt please anyone who noticed the orbit in the first example seemed too small!

Update: A Comment on Tidal Forces

Also, by popular request, some have claimed that the planet close to the black hole should be completely destroyed by tidal forces, since it is so close to the black hole. This is not so. For this discussion, I will revert back to the Schwarzschild metric, since the mathematics is simpler, but the discussion can of course be extended to the Kerr metric. Consider the planet in question (the water planet) at a radial position r. The tidal forces felt by the planetary body are measured by the orthonormal components of the Riemann curvature tensor. If we consider a static orthonormal frame as is done in Misner, Thorne and Wheeler, we have:

latex-image-20At this radial position, we obtain for the Riemann curvature tensor components:


Now, we can transform over to the planet’s frame by applying a Lorentz boost in the radial direction with velocity:


One sees that all components of the the curvature tensor are completely unaffected by this boost! One therefore sees that none of the components of the curvature tensor in the planet’s reference frame become infinite at the gravitational radius. Moreover, as the planet/observer approaches the horizon, as can be seen from the Riemann components, the tidal forces are finite, and do not tear anything apart, at least when the mass M is very large (as is the case in the film). However, let us see the curvature invariants, for a Schwarzschild metric we have:


This is invariant, and so is a singularity in every reference frame. Indeed, as r -> 0, the tidal forces become infinite. So, only past the horizon, very close to the singularity, do we have to worry about tidal forces from the black hole breaking anything up!

Now, the astro community are largely mistaken on this whole tidal force ripping up the planet. All the papers they use are citing the whole idea of using the Roche limit. This can’t be done for several reasons. As I outlined for another astronomer (who will remain unnamed for this posting), the problem is as follows:

I am a stickler for mathematical form, and I refuse to acknowledge the validity of the Roche limit in General Relativity. Here are my reasons:

1. Even if I was to conclude that a spherical body orbiting a Kerr black hole will break up because of the tidal forces as described by the Roche limit, this conclusion is highly questionable without a 2-body GR approach because: you are assuming from the onset that the Kerr black hole remains spherical, and the mass in question has no effect on the Kerr black hole, so you are implicitly using a far-field approximation from the onset.

2. Newtonian gravity is linear, GR is not. Since there’s no 2-body problem analytic solution in GR, there is simply NO GR equivalent of the Roche limit.

3. The Roche limit is simply a result of Lagrange points in 2-body orbital Newtonian mechanics, and I prefer to leave it there. Adding GR corrections is not good enough.

4. In the Roche limit and the governing Newtonian regime, pressure does not generate any gravitational field, but, as you well know, in GR, pressure does contribute to the En.Mom tenor, and as a result the gravitational attraction. In fact, if collapse happen sufficiently far, the pressure growth goes exponentially and it is far more important than the rest-mass density.

5. The real way to do this problem aside from considering a 2-body problem in GR, and getting an analytic solution, is to consider an internal Schwarzschild geometry in an external Kerr geometry background. But, because of the cross-term in the Kerr metric that one cannot transform away because of any coordinate transformation, the matching conditions are impossible to derive. If I on the other hand assume an external Schwarzschild geometry (which is not relevant for this problem, but…) then one obtains the well-known TOV equation. The TOV equation is essentially how one obtains the collapse conditions properly.

6. The Roche limit is a Newtonian result, and because of the linearity of Newtonian gravity, and the lack of pressure contributing to gravity, prevent any such effect in Newtonian physics.

7. The Roche limit arguments are always weak-field effects, which will not give you an accurate answer especially in this regard.

It does raise an interesting question though. Why do you insist on using the Roche limit if the pressure influencing spacetime curvature (which would be significant because of the magnitude of the tidal forces) cannot be accounted for in this approach? It is in fact worse than this. If I have a significant pressure as implied by the Roche limit, then the En-Mom tensor is no longer non-zero, and one does not even have a Schwarzschild/Kerr or any other vacuum solution. This now goes into the domain of cosmology, which makes this problem, much, more difficult.

Finally, there are also issues having to do with causality, the fact that the governing structural equations in the Roche limit approach are elliptic PDEs (the Poisson equation) and the heat equation, which is a parabolic PDE. Both are acausal, in the case of elliptic PDEs, all solutions are spacelike, and no physical body would move along spacelike hypersurfaces.

Therefore, for all these mathematical points, I refuse to acknowledge the validity of the Roche limit in this situation, and prefer a non-Newtonian GR approach, and it is the only correct way to do this problem. But, like I said, we’re approaching this from different points-of-view, Phil and the astro community seem to be satisfied with approximate solutions! -:) (Thanks to GFE and CCD for pointing some of these points out in an interesting discussion on the mathematical formulation of Einstein’s equations!)

Update: On the whole issue of those giant waves in the movie

A lot of folks have been asking whether the situation of those giant waves that are observed on the water planet near the black hole are feasible in the movie. My honest answer is that I have to solve some equations to find out, but ironically those equations are not astrophysical or general relativistic in nature, they are purely dependent on standard Navier-Stokes theory. If you noticed from the film, the wavelength of the water waves was much, much greater than the depth of the water itself, this situation is ripe for the shallow-water equations, which are obtained by applying the Navier-Stokes equations to such a problem. For those who are interested, any reasonably advanced-level fluid mechanics textbook discusses these equations at length. In any event, these equations are three coupled, nonlinear partial differential equations, and have no analytic solution in general, they look like:


where u is the x-direction velocity, v is the y-direction velocity, h is the height deviation of the pressure surface from the mean height H (i.e., how high the wave will be), H is the height of the pressure surface, g is the local acceleration due to gravity, f is the Coriolis coefficient that is determined from the rotation of the planet, and b denotes viscous drag forces. For the situation in the movie, we are told that the acceleration due to gravity on the planet is 130% that of Earth’s, which means that g = 9.81 x 1.30 = 12.753 m/s^2, f will be reasonably influenced by internal forces in planet’s structure, combined with interestingly enough the Lens-Thirring effect/frame dragging from the rotating black hole which will also cause the planet to precess. Solving these equations must be done numerically, and has been well-studied in the scientific literature, indeed, many simulations have been done. Here are some examples:

Update: A Comment on Hawking Radiation

Some have also claimed that the radiation emitted, namely, Hawking radiation from the massive black hole should be enough to kill the nearby observers. This is also a misconception of what Hawking radiation is. Hawking radiation is a quantum effect, and is given by the equation:


That is, this gives you the temperature of the electromagnetic radiation emitted from a black hole. Let us do some calculations for the black hole in question. For a Kerr black hole, we have that the surface gravity is (see the discussion in Hervik and Gron):


The other constants in the temperature formula above are the well-known Planck’s constant, Boltzmann’s constant, and speed of light. Putting these two equations together and substituting the numbers that we derived in the previous section, we see that the temperature of EM radiation emitted from the giant black hole in the movie is approximately:


which is extremely, extremely negligible! Therefore, no one will die from the EM radiation emitted from the massive spinning black hole!



So, I have received some requests to discuss the scientific accuracy of the last part of the film, where the main character, Cooper travels through the black hole and reaches a five-dimensional universe.

The key point of understanding why this is possible is to recall once again, that we are using the Kerr metric that depicts spinning black holes, that is everything. In a non-rotating black hole, once someone passes the event horizon, he will have no choice but to continue towards the singularity meeting his eventual death. This is not so for a Kerr black hole. Let us see why:

Much of my discussion is based on the great G.R. books from Hawking and Ellis, Misner, Thorne, Wheeler, Gron and Hervik, and Wald.

Let me write the Kerr metric in a slightly more different form that will be practical for this discussion:


where we have defined per the conventions in Gron and Hervik,

latex-image-13Recall that this metric describes the spacetime outside a rotating black hole with mass M and angular momentum J = Ma. Notice that in this form the singularities of the metric are easily observable. Namely, where \Delta = 0 and \Sigma = 0. The \Delta = 0 equation describes the horizon, and folks familiar with general relativity know that this is coordinate singularity. By a suitable coordinate transformation, one can ‘transform away’ this singularity. However, the \Sigma = 0 denotes in fact a real physical singularity, given by the set of points that satisfy


As can be confirmed the solution to this equation is a two-dimensional ring:


Therefore, while the singularity for a regular Schwarzschild metric is a point singularity from which nothing can escape, the singularity for a Kerr rotating black hole is a ring, which in fact, is avoidable!

To see this, let us dive a bit further into the structure of the Kerr metric. Following Hawking and Ellis’ remarkable text,

kerrmaxextensionFrom this figure, we note the following remarkable property of the Kerr metric. One passes through the ring singularity in the rotating Black Hole by going from the (x,z) plane on the left to the (x’,z’) plane on the right of the diagram. It can be shown that, because of this complicated topology, closed timelike curves exist in the neighbourhood of the ring singularity. (For those that are interested, a complete discussion involving Killing vectors are detailed in Wald’s GR text). The significance of the existence of closed timelike curves is an observer traversing along these curves can violate causality, and thus go backwards in time by an arbitrary amount. Note that there are some issues regarding stability that I have not detailed here as they are much more technical than what is covered in this posting.

Now, connecting all of this to the movie. The structure above allows one (as has been reported in the literature) to use the Kerr black hole as a wormhole itself. It is therefore plausible that Cooper’s character avoids the singularity of the rotating black hole and transports to another region of the universe. In the movie it is depicted that he ends up in a 5-D universe, 4 spatial dimensions and 1 time. Again, this is perfectly theoretically possible. Purists might argue against it, but like I said, it is theoretically possible. For example, the wormhole could transport you to a region of spacetime where the geometry locally is 5-D Minkowskian and has the metric:

latex-image-16However, as human beings can only perceive of 3 spatial dimensions and 1 time dimension, these four-dimensional spatial sections have to be embedded in a 3-dimensional setting for us to visualize them. These four-dimensional spatial sections are completely Euclidean, and one can think of a tesseract with the following domain:

latex-image-17In fact, in relativity theory, time flows “upwards”. One can foliate the above metric tensor into a 1+4 split, and obtain the following dynamical picture of how an observer “moves through” such a five-dimensional spacetime. Each spatial slice is taken to be 4-D, but since we can’t perceive of 4 spatial dimensions, this 4-D surface is embedded into three-dimensional space to produce the tesseract as in the film:

Presentation 15.001

These are both depicted in the movie. So, once again, anyone saying these are pure fiction/fantasy out of Nolan’s mind are mistaken. There are technical arguments involved giving mathematical conditions showing where these conditions would fail to work, but that is becoming too technical for a science fiction movie. The point is that in large, the theory of General Relativity supports these ideas, and it is all based on the idea of using a rotating black hole in the movie, it is the true centre of the plot!

Update: The cool part of all this is that I obtained this image from the Interstellar website showing Dr. Brand’s blackboard:

IMG_0322Note that the metric tensor on the bottom left-hand-corner is exactly the Kerr metric I described earlier. It seems that indeed the “quantum data” that is to be obtained from the black hole singularity actually is obtained from when TARS falls into the black hole and goes through the ring singularity. What’s interesting is that Thorne’s depiction here (which he drew according to the special features of the movie) actually show you where the quantum data would be with respect  to the singularity in the above Penrose diagram.