# identity_kernel

From localModel v0.3.11
by Mateusz Staniak

##### LIME kernel that treats all observations as equally similar to the observation of interest.

Kernels are meant to be used as an argument to individual_surrogate_model function. Other custom functions can be used. Such functions take two vectors and return a single number.

##### Usage

`identity_kernel(explained_instance, simulated_instance)`

##### Arguments

- explained_instance
explained instance

- simulated_instance
new observation

##### Value

numeric

##### Examples

```
# NOT RUN {
library(DALEX)
library(randomForest)
library(localModel)
data('apartments')
mrf <- randomForest(m2.price ~., data = apartments, ntree = 50)
explainer <- explain(model = mrf,
data = apartments[, -1])
model_lok <- individual_surrogate_model(explainer, apartments[5, -1],
size = 500, seed = 17,
kernel = identity_kernel)
# In this case each simulated observation has equal weight
# when explanation model (LASSO) is fitted.
model_lok
plot(model_lok)
# }
```

*Documentation reproduced from package localModel, version 0.3.11, License: GPL*

### Community examples

Looks like there are no examples yet.