code: protected static double calculateLof(LofPoint basePoint, LofDataSet dataSet)
      {
          int countedData = 0;
          double totalAmount = 0.0d;
          for (String targetDataId : basePoint.getkDistanceNeighbor())
          {
              LofPoint targetPoint = dataSet.getDataMap().get(targetDataId);
  
              totalAmount = totalAmount + (targetPoint.getLrd() / basePoint.getLrd());
              countedData++;
          }
  
          if (countedData == 0)
          {
              return totalAmount;
          }
  
          return totalAmount / (countedData);
      }
docs: basePointの局所外れ係数(Local outlier factor)を算出する。
  
  @param basePoint 算出元対象点
  @param dataSet 全体データ
  @return 局所外れ係数