亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? attribute.java

?? 決策樹的源代碼。需要的自己下阿。不多說了
?? JAVA
字號:
package ai.decision.algorithm;

import java.util.*;

/**
 * This class provides a representation of one attribute in
 * a decision tree dataset.
 *
 * <p>
 * There are two types of attributes, target attributes and
 * general attributes.  Both types are respresented by the
 * Attribute class.
 *
 * <p>
 * An Attribute objects stores an attribute name and a list of
 * the values that the given attribute takes on.  Additionally,
 * each attribute can store statistics about examples in the
 * training dataset.  Stats are stored in a 2-D array, where the
 * first dimension corresponds to the number of values for the
 * attribute, and the second dimension corresponds to the number
 * of possible values for the target attribute.  Using this
 * format, the array can be populated with information used
 * to 'split' the dataset.
 *
 * <p>
 * <b>Change History:</b>
 *
 * <p><pre>
 * Name:            Date:            Change:
 * =============================================================
 * J. Kelly         May-03-2000      Created.
 * J. Kelly         May-18-2000      Added support for statistics
 *                                   within the Attribute class.
 * J. Kelly         Aug-23-2000      Added utility method to clear
 *                                   stats array.
 * </pre>
 *
 * Copyright 2000 University of Alberta.
 *
 * <!--
 * This file is part of the Decision Tree Applet.
 *
 * The Decision Tree Applet is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * Foobar is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the Decision Tree Applet; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * -->
 */
public class Attribute
{
  // Instance data members

  String m_name;      // Name of this attribute.
  Vector m_values;    // Vector containing the name of each
                      // attribute value.
  int[][] m_stats;    // 2-D array of stats for this
                      // attribute - this can be filled in
                      // as needed.

  // Constructors

  /**
   * Initializes the attribute with the supplied name and
   * list of values.
   *
   * <p>
   * The method also builds a new internal statistics array.
   *
   * @param attributeName The name of this attribute.
   *
   * @param values A Vector that contains the names of the
   *        values for this attribute.
   *
   * @param numTargetValues The number of target attribute
   *        values in the dataset.  This determines the
   *        dimensions of the statistics array.  If this
   *        attribute is the target attribute, the value
   *        should be set to 1.
   *
   * @throws NullPointerException If the supplied name
   *         is null or the values Vector is null.
   *
   * @throws IllegalArgumentException If the number of
   *         attribute values in the vector is 0, or the
   *         number of target attribute values is less than 1.
   */
  public Attribute( String attributeName, Vector values, int numTargetValues )
  {
    if( attributeName == null || values == null )
      throw new
        NullPointerException( "Attribute name or values is null." );

    if( values.size() == 0 )
      throw new
        IllegalArgumentException( "Vector of attribute values is empty." );

    if( numTargetValues < 1 )
      throw new
        IllegalArgumentException( "Number of target " +
          "attribute values specified is less than 1." );

    m_name   = attributeName;
    m_values = values;
    m_stats = new int[ values.size() ][ numTargetValues ];
  }

  // Public methods

  /**
   * Returns the number of possible values for this attribute.
   *
   * @return The size of the set of values available for
   *         this attribute.
   */
  public int getNumValues()
  {
    return m_values.size();
  }

  /**
   * Returns the name of this attribute.
   *
   * @return The name of this attribute.
   */
  public String getName()
  {
    return m_name;
  }

  /**
   * Finds and returns the position of a particular
   * attribute value in the internal storage Vector.
   *
   * @return The position of the attribute value in the attribute's
   *         internal storage Vector.
   *
   * @throws NonexistentAttributeValueException if a value with
   *         the supplied name does not exist.
   */
  public int getAttributeValuePosition( String valName )
    throws NonexistentAttributeValueException
  {
    // Inefficient linear search of the vector
    for( int i = 0; i < m_values.size(); i++ ) {
      String val = (String)m_values.elementAt(i);

      if( val.equals( valName ) ) return i;
    }

    throw new
      NonexistentAttributeValueException( "Attribute" +
        " value " + this.m_name + "." + valName + " does not exist." );
  }

  /**
   * Returns the name of a particular value in this attribute's
   * internal storage Vector.
   *
   * @return The name of the value located at the specified position
   *         in the internal storage Vector.
   *
   * @throws NonexistentAttributeValueException If no value exists
   *         at the specified position.
   */
  public String getAttributeValueByNum( int valNum )
    throws NonexistentAttributeValueException
  {
    if( valNum < 0 || valNum >= m_values.size() )
      throw new
        NonexistentAttributeValueException( "Attribute" +
          " value at location " + valNum + " does not exist." );

    return (String)m_values.elementAt( valNum );
  }

  /**
   * Creates and returns a vector with the names of all
   * values for this attribute.
   *
   * @return A vector containing Strings which are the
   *         names of all the attribute values (in the order
   *         that they were added to the Attribute object).
   */
  public Vector getValueNames()
  {
    // Return the vector of names.
    return new Vector( m_values );
  }

  /**
   * Provides direct access to the internal statistics
   * array.  This avoids the overhead of method calls,
   * but assumes that the caller understands the structure
   * of the array and can manipulate it accordingly.
   *
   * @return The Attribute's 2-D statistics array.
   */
  public int[][] getStatsArray()
  {
    return m_stats;
  }

  /**
   * A utility method that clears the internal statistics
   * array.
   */
  public void clearStatsArray()
  {
    for( int i = 0; i < m_stats.length; i++ )
      for( int j = 0; j < m_stats[i].length; j++ )
        m_stats[i][j] = 0;
  }
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美另类在线| 国产一区二区三区不卡在线观看 | 91麻豆精品国产| 91麻豆精品秘密| 成人av在线资源| av电影在线观看一区| 北岛玲一区二区三区四区| 国v精品久久久网| 国产成人综合在线播放| 国产精品中文字幕日韩精品| 狠狠色伊人亚洲综合成人| 亚洲电影一区二区| 国产欧美综合在线| 欧美激情一区二区在线| 国产偷国产偷精品高清尤物| 国产亚洲精品bt天堂精选| 午夜欧美大尺度福利影院在线看| 亚洲丝袜另类动漫二区| 亚洲欧美日韩一区二区 | 日韩一级在线观看| 欧美一区二区三区电影| 欧美成人三级电影在线| 欧美精品一区二区三区高清aⅴ| 亚洲精品一区二区在线观看| 久久婷婷久久一区二区三区| 亚洲国产精品成人综合色在线婷婷| 国产清纯白嫩初高生在线观看91 | 喷水一区二区三区| 韩国一区二区视频| 成人午夜电影小说| 91视频观看视频| 欧美日韩在线不卡| 日韩亚洲欧美综合| 亚洲一区在线视频观看| 久久久777精品电影网影网 | 99re热视频这里只精品| 91久久精品一区二区| 欧美日韩电影在线播放| 日韩三级高清在线| 国产欧美精品区一区二区三区| 国产精品日产欧美久久久久| 亚洲精品免费视频| 免费看日韩a级影片| 国产成人夜色高潮福利影视| 色婷婷精品大视频在线蜜桃视频| 欧美日韩一区二区欧美激情 | 日韩精品一级二级| 国内精品嫩模私拍在线| 不卡电影免费在线播放一区| 欧美日韩一级二级| 久久久精品国产99久久精品芒果| 99在线热播精品免费| 丁香激情综合国产| 欧美午夜片在线看| 精品播放一区二区| 亚洲一区二区三区四区五区黄| 美女mm1313爽爽久久久蜜臀| av激情亚洲男人天堂| 在线不卡欧美精品一区二区三区| 国产午夜精品一区二区三区四区| 亚洲最新视频在线观看| 国产精品一级片在线观看| 在线视频你懂得一区| 久久久99免费| 午夜欧美大尺度福利影院在线看| 国产成人av一区二区三区在线| 欧美色大人视频| 国产精品私人自拍| 麻豆91在线播放| 欧美性大战久久久久久久蜜臀| 久久精品视频在线免费观看| 午夜精品久久久久久久久久| 成人看片黄a免费看在线| 日韩欧美电影一区| 亚洲综合色丁香婷婷六月图片| 国产成人亚洲综合a∨猫咪| 欧美日韩另类一区| 亚洲欧美一区二区在线观看| 黄色成人免费在线| 欧美电影在哪看比较好| 日韩欧美资源站| 中文一区二区完整视频在线观看| 日韩精品1区2区3区| 91色.com| 国产欧美日韩在线| 精品综合久久久久久8888| 亚洲国产经典视频| 国产一区二区三区av电影 | 日韩一区二区免费视频| 亚洲综合免费观看高清完整版在线| 国产成人亚洲精品青草天美| 精品久久久久久久久久久院品网| 亚洲成av人在线观看| 色综合久久综合网97色综合| 中文字幕不卡在线播放| 国产美女一区二区三区| 欧美大片一区二区| 日本午夜精品一区二区三区电影| 色视频一区二区| 日韩毛片高清在线播放| 成人午夜短视频| 亚洲国产精品t66y| 国产a视频精品免费观看| 精品国精品国产尤物美女| 秋霞国产午夜精品免费视频| 欧美丰满少妇xxxxx高潮对白| 亚洲1区2区3区视频| 精品视频一区 二区 三区| 亚洲一区二区综合| 欧美日韩中文另类| 亚洲aⅴ怡春院| 88在线观看91蜜桃国自产| 婷婷丁香激情综合| 宅男在线国产精品| 日本中文一区二区三区| 日韩午夜激情av| 久久99国产精品久久| 久久女同精品一区二区| 国产精品自产自拍| 国产精品麻豆一区二区| av在线这里只有精品| 亚洲欧美另类小说| 91高清视频在线| 日本人妖一区二区| 精品国产一区二区在线观看| 国产乱码字幕精品高清av| 国产精品无遮挡| 91麻豆免费看片| 五月天欧美精品| 精品国产乱码久久久久久久久 | 91精品欧美一区二区三区综合在| 日本在线不卡一区| 精品国产青草久久久久福利| 国产成人精品1024| 亚洲欧美激情在线| 欧美精品v日韩精品v韩国精品v| 日本欧美韩国一区三区| 久久影院午夜论| k8久久久一区二区三区 | 免费在线观看视频一区| 精品国产91乱码一区二区三区 | 高清不卡一区二区在线| 亚洲欧美韩国综合色| 91精品国产日韩91久久久久久| 激情深爱一区二区| 国产一区二区三区免费观看| www..com久久爱| 一区二区三区蜜桃| 日韩欧美黄色影院| 成人黄色a**站在线观看| 亚洲午夜在线观看视频在线| 欧美大片拔萝卜| 91小视频在线观看| 青青草97国产精品免费观看 | 国产精品视频免费| 欧美精选一区二区| 国产电影一区二区三区| 亚洲国产精品久久久久婷婷884| 日韩精品中午字幕| 日本高清免费不卡视频| 久久国产精品99精品国产| 亚洲欧美日韩国产成人精品影院| 欧美一区二视频| 91丨porny丨国产| 精品一区二区三区香蕉蜜桃| 亚洲欧美激情一区二区| 久久久久久夜精品精品免费| 国产精品理伦片| 制服丝袜国产精品| 色哟哟一区二区| 国产在线精品免费| 亚洲第一久久影院| 中文字幕一区二区在线观看 | 国产精品福利影院| 日韩精品一区国产麻豆| 亚洲人精品午夜| 欧美xfplay| 欧美天堂一区二区三区| 成人亚洲一区二区一| 久久99久久久久| 亚洲第一主播视频| 亚洲天堂a在线| 国产亚洲视频系列| 日韩欧美在线网站| 欧美三级电影网| 一道本成人在线| 成人高清av在线| 国产精品综合一区二区| 六月丁香婷婷色狠狠久久| 亚洲成av人片一区二区梦乃| 国产精品国产三级国产aⅴ入口| 精品久久久久久久久久久久久久久| 欧美日韩aaa| 91国产免费看| 91久久精品一区二区| 99久久精品免费看国产| 成人免费视频一区| 风流少妇一区二区| 国产高清精品网站| 国产精品中文字幕一区二区三区|