I have started learning classification techniques and trying to solve the problems from the book Introduction to Statistical Learning.
While currently working on the which is based on Curse of dimensionality and how Nearest neighbours averaging tends to perform poorly when the dimensions become large. The first part of the problem is below and similarly I have to find for p = 2, p= 100:
(a) Suppose that we have a set of observations, each with measurements on p = 1 feature, X. We assume that X is uniformly (evenly) distributed on [0, 1]. Associated with each observation is a response value. Suppose that we wish to predict a test observation’s response using only observations that are within 10% of the range of X closest to that test observation. For instance, in order to predict the response for a test observation with X = 0.6, we will use observations in the range [0.55, 0.65]. On average, what fraction of the available observations will we use to make the prediction?
After reading scikit The way I have approached this problem is : Assume that 100 observations are given and p = 1 , d = 10% , we require 1/d^p points. So for p = 1 , its 10/100 For p = 2, its 1/(0.1)^2
But I am not sure if that is correct.Can someone guide me ?