class_docstr: Here we collect all the methods needed for generating NPTS Forecasts.
class_docstr_tok: ["Here","we","collect","all","the","methods","needed","for","generating","NPTS","Forecasts","."]
code: def log_distance_kernel(
      alpha: float,
  ) -> Callable[[np.ndarray, np.ndarray], float]:
      return lambda x, y: cast(float, -alpha * np.sum(np.abs(x - y)))
  
file_path: gluonts/src/gluonts/model/npts/_model.py
imports: from typing import Any, Callable, Iterator, List, Optional, cast
  import numpy
  import pandas
  from gluonts.model.forecast import SampleForecast
  from ._weighted_sampler import WeightedSampler
label_desc: Use image node_id 3 for calling the NPTS obj's underlying member method code with example usage: obj.log_distance_kernel(alpha) and returns: function