# Predicting rankings using the nearest neighbor algorithm

### Description

This function makes prediction of rankings based on the nearest neighbor

### Usage

1 |

### Arguments

`train.x` |
is matrix of numeric attributes in training sample |

`y` |
is matrix of training rankings |

`test.x` |
is a vector of new numeric attributes for which to predict rankings |

`n` |
is a parameter of 'memory' of how fast the past rankings gets forgotten. (see details of time_weights). By default, |

`k` |
is the number of the nearest neighbors to consider (default k=3) |

### Details

A function predicts the rankings based on the euclidean distance between train and test attributes.

### Value

a vector of predicted ranking for attribute `test.x`

### Examples

1 2 3 |