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

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

?? expression.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. *//* * Expression.java * Copyright (C) 2005 University of Waikato, Hamilton, New Zealand * */package weka.datagenerators.classifiers.regression;import weka.core.Attribute;import weka.core.FastVector;import weka.core.Instance;import weka.core.Instances;import weka.core.Option;import weka.core.Utils;import weka.filters.unsupervised.attribute.AddExpression;import java.util.Enumeration;import java.util.Random;import java.util.Vector;/** <!-- globalinfo-start --> * A data generator for generating y according to a given expression out of randomly generated x.<br/> * E.g., the mexican hat can be generated like this:<br/> *    sin(abs(a1)) / abs(a1)<br/> * In addition to this function, the amplitude can be changed and gaussian noise can be added. * <p/> <!-- globalinfo-end --> * <!-- options-start --> * Valid options are: <p/> *  * <pre> -h *  Prints this help.</pre> *  * <pre> -o &lt;file&gt; *  The name of the output file, otherwise the generated data is *  printed to stdout.</pre> *  * <pre> -r &lt;name&gt; *  The name of the relation.</pre> *  * <pre> -d *  Whether to print debug informations.</pre> *  * <pre> -S *  The seed for random function (default 1)</pre> *  * <pre> -n &lt;num&gt; *  The number of examples to generate (default 100)</pre> *  * <pre> -A &lt;num&gt; *  The amplitude multiplier (default 1.0).</pre> *  * <pre> -R &lt;num&gt;..&lt;num&gt; *  The range x is randomly drawn from (default -10.0..10.0).</pre> *  * <pre> -N &lt;num&gt; *  The noise rate (default 0.0).</pre> *  * <pre> -V &lt;num&gt; *  The noise variance (default 1.0).</pre> *  * <pre> -E &lt;expression&gt; *  The expression to use for generating y out of x  *  (default sin(abs(a1)) / abs(a1)).</pre> *  <!-- options-end --> * * @author  FracPete (fracpete at waikato dot ac dot nz) * @version $Revision: 1.4 $ * @see     AddExpression * @see     MexicanHat */public class Expression  extends MexicanHat {  /** for serialization */  static final long serialVersionUID = -4237047357682277211L;      /** the expression for computing y */  protected String m_Expression;  /** the filter for generating y out of x */  protected AddExpression m_Filter;  /** the input data structure for the filter */  protected Instances m_RawData;    /**   * initializes the generator   */  public Expression() {    super();    setExpression(defaultExpression());  }    /**   * Returns a string describing this data generator.   *   * @return a description of the data generator suitable for   * displaying in the explorer/experimenter gui   */  public String globalInfo() {    return         "A data generator for generating y according to a given expression "        + "out of randomly generated x.\n"        + "E.g., the mexican hat can be generated like this:\n"        + "   sin(abs(a1)) / abs(a1)\n"        + "In addition to this function, the amplitude can be changed and "        + "gaussian noise can be added.";  }  /**   * Returns an enumeration describing the available options.   *   * @return an enumeration of all the available options   */  public Enumeration listOptions() {    Vector result = enumToVector(super.listOptions());    result.addElement(new Option(              "\tThe expression to use for generating y out of x \n"              + "\t(default " + defaultExpression() + ").",              "E", 1, "-E <expression>"));    return result.elements();  }    /**   * Parses a list of options for this object. <p/>   *   <!-- options-start -->   * Valid options are: <p/>   *    * <pre> -h   *  Prints this help.</pre>   *    * <pre> -o &lt;file&gt;   *  The name of the output file, otherwise the generated data is   *  printed to stdout.</pre>   *    * <pre> -r &lt;name&gt;   *  The name of the relation.</pre>   *    * <pre> -d   *  Whether to print debug informations.</pre>   *    * <pre> -S   *  The seed for random function (default 1)</pre>   *    * <pre> -n &lt;num&gt;   *  The number of examples to generate (default 100)</pre>   *    * <pre> -A &lt;num&gt;   *  The amplitude multiplier (default 1.0).</pre>   *    * <pre> -R &lt;num&gt;..&lt;num&gt;   *  The range x is randomly drawn from (default -10.0..10.0).</pre>   *    * <pre> -N &lt;num&gt;   *  The noise rate (default 0.0).</pre>   *    * <pre> -V &lt;num&gt;   *  The noise variance (default 1.0).</pre>   *    * <pre> -E &lt;expression&gt;   *  The expression to use for generating y out of x    *  (default sin(abs(a1)) / abs(a1)).</pre>   *    <!-- options-end -->   *   * @param options the list of options as an array of strings   * @exception Exception if an option is not supported   */  public void setOptions(String[] options) throws Exception {    String        tmpStr;       super.setOptions(options);    tmpStr = Utils.getOption('E', options);    if (tmpStr.length() != 0)      setExpression(tmpStr);    else      setExpression(defaultExpression());  }  /**   * Gets the current settings of the datagenerator BIRCHCluster.   *   * @return an array of strings suitable for passing to setOptions   */  public String[] getOptions() {    Vector        result;    String[]      options;    int           i;        result  = new Vector();    options = super.getOptions();    for (i = 0; i < options.length; i++)      result.add(options[i]);        result.add("-E");     result.add("" + getExpression());        return (String[]) result.toArray(new String[result.size()]);  }    /**   * Returns the tip text for this property   *    * @return tip text for this property suitable for   *         displaying in the explorer/experimenter gui   */  public String amplitudeTipText() {    return "The amplitude to multiply the y value with.";  }  /**   * returns the default expression   *    * @return the default expression   */  protected String defaultExpression() {    return "sin(abs(a1)) / abs(a1)";  }  /**   * Gets the mathematical expression for generating y out of x   *   * @return the expression for computing y   */  public String getExpression() {     return m_Expression;   }    /**   * Sets the mathematical expression to generate y out of x.   *   * @param value the expression for computing y   */  public void setExpression(String value) {    if (value.length() != 0)      m_Expression = value;    else      throw new IllegalArgumentException(          "An expression has to be provided!");  }    /**   * Returns the tip text for this property   *    * @return tip text for this property suitable for   *         displaying in the explorer/experimenter gui   */  public String expressionTipText() {    return "The expression for generating y out of x.";  }  /**   * Return if single mode is set for the given data generator   * mode depends on option setting and or generator type.   *    * @return single mode flag   * @throws Exception if mode is not set yet   */  public boolean getSingleModeFlag() throws Exception {    return true;  }  /**   * Initializes the format for the dataset produced.    * Must be called before the generateExample or generateExamples   * methods are used.   * Re-initializes the random number generator with the given seed.   *   * @return the format for the dataset    * @throws Exception if the generating of the format failed   * @see  #getSeed()   */  public Instances defineDataFormat() throws Exception {    FastVector      atts;    // initialize input format    atts = new FastVector();    atts.addElement(new Attribute("x"));        m_RawData = new Instances(getRelationNameToUse(), atts, 0);    m_Filter = new AddExpression();    m_Filter.setName("y");    m_Filter.setExpression(getExpression());    m_Filter.setInputFormat(m_RawData);    return super.defineDataFormat();  }  /**   * Generates one example of the dataset.    *   * @return the generated example   * @throws Exception if the format of the dataset is not yet defined   * @throws Exception if the generator only works with generateExamples   * which means in non single mode   */  public Instance generateExample() throws Exception {    Instance    result;    Random      rand;    double      x;    double      y;    double[]    atts;    Instance    inst;    result = null;    rand   = getRandom();    if (m_DatasetFormat == null)      throw new Exception("Dataset format not defined.");    // random x    x = rand.nextDouble();    // fit into range    x = x * (getMaxRange() - getMinRange()) + getMinRange();        // generate y    atts    = new double[1];    atts[0] = x;    inst    = new Instance(1.0, atts);    m_Filter.input(inst);    m_Filter.batchFinished();    inst = m_Filter.output();        // noise    y = inst.value(1) + getAmplitude()             * m_NoiseRandom.nextGaussian()             * getNoiseRate() * getNoiseVariance();    // generate attributes    atts = new double[m_DatasetFormat.numAttributes()];        atts[0] = x;    atts[1] = y;    result = new Instance(1.0, atts);    // dataset reference    result.setDataset(m_DatasetFormat);        return result;  }  /**   * Generates all examples of the dataset. Re-initializes the random number   * generator with the given seed, before generating instances.   *   * @return the generated dataset   * @throws Exception if the format of the dataset is not yet defined   * @throws Exception if the generator only works with generateExample,   * which means in single mode   * @see   #getSeed()   */  public Instances generateExamples() throws Exception {    Instances       result;    int             i;    result   = new Instances(m_DatasetFormat, 0);    m_Random = new Random(getSeed());    for (i = 0; i < getNumExamplesAct(); i++)      result.add(generateExample());        return result;  }  /**   * Generates a comment string that documentates the data generator.   * By default this string is added at the beginning of the produced output   * as ARFF file type, next after the options.   *    * @return string contains info about the generated rules   */  public String generateStart () {    return "";  }  /**   * Generates a comment string that documentats the data generator.   * By default this string is added at the end of theproduces output   * as ARFF file type.   *    * @return string contains info about the generated rules   * @throws Exception if the generating of the documentaion fails   */  public String generateFinished() throws Exception {    return "";  }  /**   * Main method for testing this class.   *   * @param args should contain arguments for the data producer:    */  public static void main(String[] args) {    runDataGenerator(new Expression(), args);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线免费| 国产精品国产馆在线真实露脸| 经典三级在线一区| 欧美高清在线精品一区| 欧美精品免费视频| 国产精品一区二区在线看| 亚洲激情五月婷婷| 精品国产制服丝袜高跟| 91丨porny丨户外露出| 一区二区三区四区五区视频在线观看| 欧美乱妇15p| 不卡大黄网站免费看| 亚洲成人综合视频| 中文久久乱码一区二区| 欧美片网站yy| 9l国产精品久久久久麻豆| 石原莉奈在线亚洲三区| 久久综合色播五月| 欧美色国产精品| 成人avav在线| 日韩va亚洲va欧美va久久| 2023国产精品| 色欧美乱欧美15图片| 国产一区二区三区免费观看| 午夜精品久久久久久不卡8050| 日本一区二区高清| 亚洲精品在线电影| 51午夜精品国产| 色八戒一区二区三区| 国产成人精品亚洲午夜麻豆| 奇米四色…亚洲| 亚洲午夜影视影院在线观看| 亚洲欧美偷拍另类a∨色屁股| 久久久国际精品| 色老综合老女人久久久| 不卡一区二区中文字幕| 国产美女精品在线| 久久99久久精品欧美| 五月婷婷激情综合网| 亚洲精品乱码久久久久久黑人| 国产日韩欧美精品一区| 欧美tickle裸体挠脚心vk| 欧美日韩激情在线| 波多野结衣中文一区| 国产一区二区视频在线| 久色婷婷小香蕉久久| 午夜精品久久久久久| 亚洲精品videosex极品| 亚洲嫩草精品久久| 亚洲欧美日韩一区二区三区在线观看| 欧美国产在线观看| 国产精品丝袜一区| 国产精品污网站| 国产三级欧美三级| 欧美刺激脚交jootjob| 日韩欧美亚洲国产精品字幕久久久| 欧美伊人久久久久久午夜久久久久| 成人va在线观看| 国产成人免费高清| 成人av电影在线| 99v久久综合狠狠综合久久| 94色蜜桃网一区二区三区| 99精品在线观看视频| 国产精一区二区三区| 国产99一区视频免费| av毛片久久久久**hd| 99久久99久久精品免费看蜜桃| 一本到不卡精品视频在线观看| 国产宾馆实践打屁股91| 一本色道久久综合亚洲91| 色天天综合久久久久综合片| 欧美日韩精品一区二区| 日韩欧美精品在线| 久久久久九九视频| 中文字幕五月欧美| 一级日本不卡的影视| 婷婷开心激情综合| 国产自产视频一区二区三区| 国产 日韩 欧美大片| 91久久奴性调教| 91麻豆精品国产91久久久| 欧美日韩视频专区在线播放| 欧美一级精品在线| 久久久久久久久99精品| 亚洲精品网站在线观看| 丝袜美腿亚洲综合| 九九九久久久精品| 99精品视频一区| 欧美福利一区二区| 久久色在线视频| 亚洲精品少妇30p| 青青草97国产精品免费观看无弹窗版 | 国产欧美日韩另类一区| 亚洲精品免费播放| 美女视频一区在线观看| 91香蕉视频在线| 91麻豆精品国产91久久久更新时间| 久久青草欧美一区二区三区| 亚洲天天做日日做天天谢日日欢| 亚洲国产日韩精品| 国产福利91精品一区| 欧美性三三影院| 国产亚洲欧美日韩在线一区| 亚洲午夜成aⅴ人片| 国产一区二区91| 欧美丰满一区二区免费视频 | 日本久久电影网| 精品av综合导航| 一区二区三区精品视频| 国产精品一区在线观看乱码| 欧美日韩成人综合天天影院 | 国产欧美一区二区三区鸳鸯浴 | 中文字幕第一区综合| 午夜精品久久久久久久久久| 成人国产精品免费观看动漫| 8x8x8国产精品| 中文字幕亚洲一区二区av在线| 欧美bbbbb| 在线看国产一区| 国产欧美日韩精品a在线观看| 三级一区在线视频先锋 | 久久国产精品免费| 91免费在线看| 国产欧美一区二区精品忘忧草| 午夜精品福利久久久| caoporn国产精品| 2021中文字幕一区亚洲| 五月婷婷色综合| 欧美在线观看你懂的| 国产精品视频第一区| 精品中文av资源站在线观看| 欧美日韩视频在线一区二区| 国产精品久久久久久久午夜片| 精品亚洲aⅴ乱码一区二区三区| 欧美三级日本三级少妇99| 亚洲图片另类小说| 激情综合色丁香一区二区| 99国内精品久久| 一区在线观看免费| 国产成人三级在线观看| 久久久久国产成人精品亚洲午夜| 国产精品18久久久久久久久久久久 | 日韩亚洲欧美一区二区三区| 视频在线观看一区二区三区| 91精品国产高清一区二区三区| 青青草成人在线观看| 精品久久久三级丝袜| 国产一本一道久久香蕉| 国产精品美女久久久久久| 91免费在线视频观看| 亚洲妇女屁股眼交7| 欧美日韩国产精品自在自线| 天天色综合天天| 精品久久久久久久久久久院品网| 国内不卡的二区三区中文字幕| 国产日韩欧美制服另类| 94-欧美-setu| 日本中文字幕一区二区有限公司| 日韩情涩欧美日韩视频| 国产69精品久久99不卡| 亚洲乱码国产乱码精品精的特点| 精品视频123区在线观看| 蜜桃精品视频在线| 国产亚洲精品中文字幕| 91黄色免费网站| 免费高清在线一区| 国产免费成人在线视频| 91国在线观看| 久久成人免费电影| 中文字幕一区在线| 在线播放中文字幕一区| 国产精品综合一区二区三区| 亚洲欧美自拍偷拍色图| 日韩一区二区三区高清免费看看 | 国产成人午夜电影网| 一区二区三区产品免费精品久久75| 欧美日韩国产成人在线免费| 国内精品免费在线观看| 夜夜精品视频一区二区| 久久蜜臀精品av| 欧美日韩一区二区电影| 处破女av一区二区| 蜜桃视频免费观看一区| 国产精品看片你懂得 | 亚洲三级免费观看| 日韩视频在线永久播放| 99国产欧美另类久久久精品 | 奇米在线7777在线精品| 国产精品第五页| 日韩亚洲欧美在线| 在线观看视频91| 精品一区二区三区香蕉蜜桃| 亚洲精品国产精华液| 国产亚洲精品超碰| 91精品国产91热久久久做人人| 99vv1com这只有精品| 国产精品中文字幕日韩精品| 天堂久久一区二区三区| 成人欧美一区二区三区白人| 精品美女一区二区|