source: src/main/java/weka/clusterers/DensityBasedClusterer.java @ 17

Last change on this file since 17 was 4, checked in by gnappo, 14 years ago

Import di weka.

File size: 2.4 KB
RevLine 
[4]1/*
2 *    This program is free software; you can redistribute it and/or modify
3 *    it under the terms of the GNU General Public License as published by
4 *    the Free Software Foundation; either version 2 of the License, or
5 *    (at your option) any later version.
6 *
7 *    This program is distributed in the hope that it will be useful,
8 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
9 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 *    GNU General Public License for more details.
11 *
12 *    You should have received a copy of the GNU General Public License
13 *    along with this program; if not, write to the Free Software
14 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */
16
17/*
18 *    DensityBasedClusterer.java
19 *    Copyright (C) 1999 University of Waikato, Hamilton, New Zealand
20 *
21 */
22
23package weka.clusterers;
24
25import weka.core.Instance;
26
27/**
28 * Interface for clusterers that can estimate the density for a given instance.
29 * Implementations will typically extend AbstractDensityBasedClusterer.
30 *
31 * @author   Mark Hall (mhall@cs.waikato.ac.nz)
32 * @author Eibe Frank (eibe@cs.waikato.ac.nz)
33 * @version  $Revision: 5987 $
34 */
35public interface DensityBasedClusterer extends Clusterer {
36
37  /**
38   * Returns the prior probability of each cluster.
39   *
40   * @return the prior probability for each cluster
41   * @exception Exception if priors could not be
42   * returned successfully
43   */
44  double[] clusterPriors() throws Exception;
45
46  /**
47   * Computes the log of the conditional density (per cluster) for a given instance.
48   *
49   * @param instance the instance to compute the density for
50   * @return an array containing the estimated densities
51   * @exception Exception if the density could not be computed
52   * successfully
53   */
54  double[] logDensityPerClusterForInstance(Instance instance) throws Exception;
55
56  /**
57   * Computes the density for a given instance.
58   *
59   * @param instance the instance to compute the density for
60   * @return the density.
61   * @exception Exception if the density could not be computed successfully
62   */
63  double logDensityForInstance(Instance instance) throws Exception;
64
65  /**
66   * Returns the logs of the joint densities for a given instance.
67   *
68   * @param inst the instance
69   * @return the array of values
70   * @exception Exception if values could not be computed
71   */
72  double[] logJointDensitiesForInstance(Instance inst) throws Exception;
73}
Note: See TracBrowser for help on using the repository browser.