1 /* 2 * This file is part of ELKI: 3 * Environment for Developing KDD-Applications Supported by Index-Structures 4 * 5 * Copyright (C) 2018 6 * ELKI Development Team 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Affero General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU Affero General Public License for more details. 17 * 18 * You should have received a copy of the GNU Affero General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 package de.lmu.ifi.dbs.elki.utilities.scaling.outlier; 22 23 import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult; 24 import de.lmu.ifi.dbs.elki.utilities.datastructures.arraylike.NumberArrayAdapter; 25 import de.lmu.ifi.dbs.elki.utilities.scaling.ScalingFunction; 26 27 /** 28 * Interface for scaling functions used by Outlier evaluation such as Histograms 29 * and visualization. Make sure to invoke {@link #prepare} prior to applying the 30 * scaling function. 31 * 32 * @author Erich Schubert 33 * @since 0.3 34 */ 35 public interface OutlierScaling extends ScalingFunction { 36 /** 37 * Prepare is called once for each data set, before getScaled() will be 38 * called. This function can be used to extract global parameters such as 39 * means, minimums or maximums from the outlier scores. 40 * 41 * @param or Outlier result to use 42 */ prepare(OutlierResult or)43 void prepare(OutlierResult or); 44 45 /** 46 * Prepare is called once for each data set, before getScaled() will be 47 * called. This function can be used to extract global parameters such as 48 * means, minimums or maximums from the score array. 49 * 50 * The method using a full {@link OutlierResult} is preferred, as it will 51 * allow access to the metadata. 52 * 53 * @param array Data to process 54 * @param adapter Array adapter 55 */ prepare(A array, NumberArrayAdapter<?, A> adapter)56 <A> void prepare(A array, NumberArrayAdapter<?, A> adapter); 57 } 58