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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? literalset.java

?? Weka
?? JAVA
字號:
/* *    This program 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. * *    This program 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 this program; if not, write to the Free Software *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//*  *    LiteralSet.java *    Copyright (C) 2003 Peter A. Flach, Nicolas Lachiche * *    Thanks to Amelie Deltour for porting the original C code to Java *    and integrating it into Weka. */package weka.associations.tertius;import weka.core.Instances;import weka.core.Instance;import java.io.Serializable;import java.util.Enumeration;import java.util.Iterator;import java.util.ArrayList;/** * Class representing a set of literals, being either the body or the head * of a rule. * * @author <a href="mailto:adeltour@netcourrier.com">Amelie Deltour</a> * @version $Revision: 1.6 $ */public abstract class LiteralSet implements Serializable, Cloneable {    /** for serialization */  private static final long serialVersionUID = 6094536488654503152L;    /** Literals contained in this set. */  private ArrayList m_literals;  /** Last literal added to this set. */  private Literal m_lastLiteral;    /** Number of instances in the data the set deals with. */  private int m_numInstances;  /** Set of counter-instances of this part of the rule. */  private ArrayList m_counterInstances;  /* For a body, counter-instances are the instances satisfying the body.   * For a head, conter-instances are the instances satisfying the negation. */  /** Counter for the number of counter-instances. */  private int m_counter;  /**    * Type of properties expressed in this set    * (individual or parts properties).   */  private int m_type;    /**   * Constructor for a set that does not store its counter-instances.   */  public LiteralSet() {    m_literals = new ArrayList();    m_lastLiteral = null;    m_counterInstances = null;    m_type = -1;  }  /**   * Constructor initializing the set of counter-instances to all the instances.   *   * @param instances The dataset.   */  public LiteralSet(Instances instances) {    this();    m_numInstances = instances.numInstances();    m_counterInstances = new ArrayList(m_numInstances);    Enumeration enu = instances.enumerateInstances();    while (enu.hasMoreElements()) {      m_counterInstances.add(enu.nextElement());    }  }  /**   * Returns a shallow copy of this set.   * The structured is copied but the literals themselves are not copied.   *   * @return A copy of this LiteralSet.   */  public Object clone() {    Object result = null;    try {      result = super.clone();      /* Clone the set of literals, but not the literals themselves. */      ((LiteralSet) result).m_literals = (ArrayList) m_literals.clone();      if (m_counterInstances != null) {	/* Clone the set of instances, but not the instances themselves. */	((LiteralSet) result).m_counterInstances 	  = (ArrayList) m_counterInstances.clone();      }    } catch(Exception e) {      /* An exception is not supposed to happen here. */      e.printStackTrace();      System.exit(0);    }    return result;  }  /**   * Update the number of counter-instances of this set in the dataset.   * This method should be used is the set does not store its counter-instances.   *   * @param instances The dataset.   */  public void upDate(Instances instances) {    Enumeration enu = instances.enumerateInstances();    m_numInstances = instances.numInstances();    m_counter = 0;    while (enu.hasMoreElements()) {      if (this.counterInstance((Instance) enu.nextElement())) {	m_counter++;      }    }  }  /**   * Get the number of counter-instances of this LiteralSet.   *   * @return The number of counter-instances.   */  public int getCounterInstancesNumber() {    if (m_counterInstances != null) {      return m_counterInstances.size();    } else {      return m_counter;    }  }  /**   * Get the frequency of counter-instances of this LiteralSet in the data.   *   * @return The frequency of counter-instances.   */  public double getCounterInstancesFrequency() {    return (double) getCounterInstancesNumber() / (double) m_numInstances;  }  /**   * Test if this LiteralSet has more counter-instances than the threshold.   *   * @param minFrequency The frequency threshold.   * @return True if there are more counter-instances than the threshold.   */  public boolean overFrequencyThreshold(double minFrequency) {    return getCounterInstancesFrequency() >= minFrequency;  }  /**   * Test if all the intances are counter-instances.   *   * @return True if all the instances are counter-instances.   */  public boolean hasMaxCounterInstances() {    return getCounterInstancesNumber() == m_numInstances;  }  /**   * Add a Literal to this set.   *   * @param element The element to add.   */  public void addElement(Literal element) {    m_literals.add(element);    /* Update the last literal. */    m_lastLiteral = element;    /* Update the type in the case of individual-based learning. */    if (element instanceof IndividualLiteral) {      int type = ((IndividualLiteral) element).getType();      if (type > m_type) {	m_type = type;      }    }    /* Update the set of counter-instances. */    if (m_counterInstances != null) {      for (int i = m_counterInstances.size() - 1; i >= 0; i--) {	Instance current = (Instance) m_counterInstances.get(i);	if (!canKeep(current, element)) {	  m_counterInstances.remove(i);	}      }    }  }  /**   * Test if this set is empty.   *   * @return True if the set is empty.   */  public final boolean isEmpty() {    return m_literals.size() == 0;  }  /**   * Give the number of literals in this set.   *   * @return The number of literals.   */  public final int numLiterals() {    return m_literals.size();  }  /**   * Enumerate the literals contained in this set.   *   * @return An Iterator for the literals.   */  public final Iterator enumerateLiterals() {    return m_literals.iterator();  }  /**   * Give the last literal added to this set.   *   * @return The last literal added.   */  public Literal getLastLiteral() {    return m_lastLiteral;  }  /**   * Test if the negation of this LiteralSet is included in another LiteralSet.   *   * @param otherSet The other LiteralSet.   * @return True if the negation of this LiteralSet is included in    * the other LiteralSet.   */  public boolean negationIncludedIn(LiteralSet otherSet) {    Iterator iter = this.enumerateLiterals();    while (iter.hasNext()) {      Literal current = (Literal) iter.next();      if (!otherSet.contains(current.getNegation())) {	return false;      }    }          return true;  }  /**   * Test if this LiteralSet contains a given Literal.   *   * @param lit The literal that is looked for.   * @return True if this literal is contained in this LiteralSet.   */  public boolean contains(Literal lit) {    return m_literals.contains(lit);  }  /**   * Give the type of properties in this set (individual or part properties).   */  public int getType() {	    return m_type;  }  /**   * Test if an individual instance, given a part instance of this individual,   * is a counter-instance of this LiteralSet.   *   * @param individual The individual instance.   * @param part The part instance.   * @return True if the individual is a counter-instance.   */  public boolean counterInstance(Instance individual, Instance part) {    Iterator iter = this.enumerateLiterals();    while (iter.hasNext()) {      IndividualLiteral current = (IndividualLiteral) iter.next();      if (current.getType() == IndividualLiteral.INDIVIDUAL_PROPERTY	  && !canKeep(individual, current))  {	return false;      } else if (current.getType() == IndividualLiteral.PART_PROPERTY		 && !canKeep(part, current)) {	return false;      }    }    return true;  }  /**   * Test if an instance is a counter-instance of this LiteralSet.   *   * @param instance The instance to test.   * @return True if the instance is a counter-instance.   */  public boolean counterInstance(Instance instance) {    if ((instance instanceof IndividualInstance)	&& (m_type == IndividualLiteral.PART_PROPERTY)) {      /* In the case of an individual instance, all the parts of the individual       * have to be considered.       * Part properties can be found in the body only, so here we test for       * an instance satisfying the set.       * It satisfies the set if there exists a part satisfying the set.       */      Enumeration enu 	= ((IndividualInstance) instance).getParts().enumerateInstances();      while (enu.hasMoreElements()) {	if (counterInstance(instance, (Instance) enu.nextElement())) {	  return true;	}      }      return false;    } else {      /* Usual case. */      Iterator iter = this.enumerateLiterals();      while (iter.hasNext()) {	Literal current = (Literal) iter.next();	if (!canKeep(instance, current)) {	  return false;	}      }      return true;    }  }  /**   * Test if an instance can be kept as a counter-instance,   * given a new literal.   *   * @param instance The instance to test.   * @param newLit The new literal.   * @return True if the instance is still a counter-instance.   */  public abstract boolean canKeep(Instance instance, Literal newLit);  /**   * Test if this LiteralSet is included in a rule.   *   * @param otherRule The rule to test.   * @return True if this set of literals is included in the rule.   */  public abstract boolean isIncludedIn(Rule otherRule);    /**   * Gives a String representation for this set of literals.   */  public abstract String toString();  }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲一本大道中文在线| 夜夜嗨av一区二区三区中文字幕| 亚洲国产精品影院| 91老司机福利 在线| 国产精品无码永久免费888| 捆绑调教美女网站视频一区| 欧美猛男男办公室激情| 国产综合色在线视频区| 中文字幕免费不卡在线| 精品久久免费看| 在线影院国内精品| 日韩av电影免费观看高清完整版 | 最新日韩av在线| 欧美视频一区二区在线观看| 美女脱光内衣内裤视频久久网站| 国产亚洲精品免费| 欧美一卡2卡3卡4卡| 国产福利91精品| 亚洲va欧美va国产va天堂影院| 日韩欧美国产高清| 91福利精品第一导航| 亚洲成人激情综合网| 一个色在线综合| 欧美国产亚洲另类动漫| 欧美精品自拍偷拍| 91久久人澡人人添人人爽欧美| 蜜臀久久久99精品久久久久久| 综合自拍亚洲综合图不卡区| 欧美国产一区视频在线观看| 91精品国产欧美一区二区成人| 不卡视频一二三四| 精品无码三级在线观看视频| 捆绑变态av一区二区三区| 一区二区三区中文在线| 亚洲欧美成人一区二区三区| 国产欧美一区二区精品性色 | 精品国产乱码久久久久久久久 | 视频在线观看91| 亚洲国产精品成人综合| 欧美一区二区精品在线| 国产一区二区三区四区五区美女| 亚洲日本va午夜在线影院| 久久九九久久九九| 欧美精品一区二区三| 日韩精品最新网址| 欧美亚洲高清一区| 欧美性色黄大片| 欧美日韩亚州综合| 在线精品亚洲一区二区不卡| 成人性生交大合| 97se亚洲国产综合自在线不卡| 国产伦精品一区二区三区视频青涩| 美女视频一区二区三区| 日韩电影在线观看网站| 免费成人美女在线观看.| 美女在线视频一区| 国产伦精品一区二区三区视频青涩 | 欧美一级精品在线| 2022国产精品视频| 综合激情网...| 激情国产一区二区| 色噜噜狠狠一区二区三区果冻| 精品视频在线免费观看| 国产日韩欧美高清| 亚洲成人资源网| 成人av第一页| 久久午夜老司机| 亚洲一区二区在线观看视频| 91麻豆福利精品推荐| 久久精品视频免费观看| 亚洲欧美日韩人成在线播放| 精品一区二区免费在线观看| 91麻豆自制传媒国产之光| 精品动漫一区二区三区在线观看| 亚洲另类色综合网站| 国产一区二区在线观看视频| 欧美男人的天堂一二区| 亚洲国产精品麻豆| 9i看片成人免费高清| 26uuu久久综合| 日韩精品亚洲专区| 欧美日韩国产天堂| 亚洲资源在线观看| 粉嫩高潮美女一区二区三区| 久久欧美中文字幕| 国产美女一区二区| 久久―日本道色综合久久| 日韩成人精品在线| 精品美女一区二区| 久久激情综合网| 精品久久久久久最新网址| 亚洲二区在线观看| 欧美三级三级三级爽爽爽| 一区二区在线免费| 91麻豆swag| 天天亚洲美女在线视频| 欧美精品一区二区不卡| 欧美精品一区在线观看| 中文字幕日本不卡| 7777精品伊人久久久大香线蕉超级流畅| 亚洲一区二区三区四区中文字幕| 欧美日韩国产电影| 国产一区不卡在线| 亚洲精品日韩一| 久久久久久夜精品精品免费| 91久久精品午夜一区二区| 国产美女在线精品| 日韩av在线免费观看不卡| 国产精品久久久久三级| 国产一区二区三区av电影| 亚洲高清久久久| 成人免费视频视频在线观看免费| 一区二区中文字幕在线| 久久免费视频一区| 狠狠色丁香婷婷综合久久片| 美女在线视频一区| 亚洲美女区一区| 国产亚洲欧美中文| 在线一区二区三区做爰视频网站| 国产综合色在线视频区| 午夜影院在线观看欧美| 综合久久国产九一剧情麻豆| 欧美电影免费提供在线观看| 欧美制服丝袜第一页| 东方aⅴ免费观看久久av| 亚洲激情av在线| 国产精品久久久久四虎| 国产肉丝袜一区二区| 欧美精品一区二区三| 欧美二区在线观看| 91精品国产一区二区三区香蕉| 不卡的看片网站| 不卡一卡二卡三乱码免费网站| av亚洲精华国产精华精华| 粉嫩绯色av一区二区在线观看| 成人性生交大片免费看视频在线 | 欧美日韩夫妻久久| 在线观看免费亚洲| 在线亚洲免费视频| 91美女在线观看| 91免费观看国产| 欧美唯美清纯偷拍| 7777精品伊人久久久大香线蕉完整版 | 欧美日韩精品一区二区| 欧美日韩你懂的| 欧美妇女性影城| 精品国产sm最大网站| 久久精品亚洲麻豆av一区二区| 国产欧美日韩麻豆91| 一区二区视频在线| 蜜臀av国产精品久久久久| 成人一区二区三区在线观看| 91免费小视频| 日韩精品一区二区三区老鸭窝| 国产日韩三级在线| 亚洲午夜在线电影| 国产成人在线色| 91精品欧美综合在线观看最新| 国产精品天美传媒沈樵| 看国产成人h片视频| 欧美婷婷六月丁香综合色| 国产女同性恋一区二区| 美女mm1313爽爽久久久蜜臀| 欧美性高清videossexo| 久久精品视频在线免费观看| 精品在线免费视频| av一区二区三区| 欧美一区二区在线免费播放| 久久理论电影网| 亚洲一二三区在线观看| 国产经典欧美精品| 91精品国产综合久久小美女| 成人免费在线播放视频| 久久国产精品免费| 在线视频你懂得一区| 欧美国产一区在线| 久久国产人妖系列| 6080午夜不卡| 一区二区三区鲁丝不卡| 成人aa视频在线观看| 国产视频一区在线观看 | 久久亚洲综合色一区二区三区 | 中文字幕一区av| bt欧美亚洲午夜电影天堂| 国产亚洲一本大道中文在线| 久草在线在线精品观看| 欧美一区二区三区视频在线 | 日韩一级在线观看| 青青草原综合久久大伊人精品| 欧美人与z0zoxxxx视频| 天天操天天色综合| 欧美电影一区二区| 三级影片在线观看欧美日韩一区二区 | 久久综合国产精品| 国产高清在线精品| 国产精品拍天天在线| 91在线你懂得| 亚洲一级片在线观看| 欧美天天综合网| 免费欧美日韩国产三级电影|