0
$\begingroup$

Questions:

  1. How can I implement univariate Nadaraya–Watson regression for prediction?
  2. What is the $x ,x_i$, and $y_i$? How can I select the $x ,x_i$, and $y_i$?

The sample for prediction and the shape of sample is like $[12,34,5,23]$. It is a list.

$$\hat{m}_n(x) = \sum_{i=1}^n \frac{K\left( \frac{x-x_i}{h}\right)Y_i}{\sum_{j=1}^n K \left( \frac{x-x_j}{h}\right)}$$

$\endgroup$
1
  • $\begingroup$ You can check out this Jupyter notebook for a Python implementation. $\endgroup$ Commented Aug 17, 2020 at 10:12

1 Answer 1

1
$\begingroup$

$(x_i,y_i)$ are the training data set.

$x$ is the new point that you want to make prediction at that value. In your case, $x$ takes value from $[12, 34, 5, 23]$.

$\endgroup$
4
  • $\begingroup$ Can you recommend me the relevant code to see it? Thanks! $\endgroup$ Commented Nov 17, 2018 at 12:51
  • $\begingroup$ is this a homework assignment? $\endgroup$ Commented Nov 17, 2018 at 12:55
  • $\begingroup$ no ,this is the first autoregressive algorithm I have encountered and I want to implement it. I am curious about its predictions work on univariate datasets, especially time series issues. $\endgroup$ Commented Nov 17, 2018 at 13:00
  • $\begingroup$ here is a relevant discussion. $\endgroup$ Commented Nov 17, 2018 at 13:06

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.