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

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

?? impurity.java

?? this is an weka tool source code implemented in java java impurity algorithm
?? 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. *//* *    Impurity.java *    Copyright (C) 1999 Yong Wang * */package weka.classifiers.trees.m5;import java.io.*;import java.util.*;import weka.core.*;/** * Class for handling the impurity values when spliting the instances * @author Yong Wang (yongwang@cs.waikato.ac.nz) * @version $Revision: 1.6 $ */public final class Impurity{  double n;                   // number of total instances   int attr;                   // splitting attribute   double nl;                  // number of instances in the left group   double nr;                  // number of instances in the right group   double sl;                  // sum of the left group    double sr;                  // sum of the right group   double s2l;                 // squared sum of the left group   double s2r;                 // squared sum of the right group   double sdl;                 // standard deviation of the left group   double sdr;                 // standard deviation of the right group   double vl;                  // variance of the left group   double vr;                  // variance of the right group   double sd;                  // overall standard deviation   double va;                  // overall variance   double impurity;            // impurity value;  int order;                  // order = 1, variance; order = 2, standard deviation; order = 3, the cubic root of the variance;                                // order = k, the k-th order root of the variance  /**   * Constructs an Impurity object containing the impurity values of partitioning the instances using an attribute   * @param partition the index of the last instance in the left subset   * @param attribute the attribute used in partitioning   * @param inst instances   * @param k the order of the impurity; =1, the variance; =2, the stardard deviation; =k, the k-th order root of the variance   */  public Impurity(int partition,int attribute,Instances inst,int k){    Values values = new Values(0,inst.numInstances()-1,inst.classIndex(),inst);    attr = attribute;    n   = inst.numInstances();    sd  = values.sd;     va  = values.va;    values = new Values(0,partition,inst.classIndex(),inst);    nl  = partition + 1;    sl  = values.sum;    s2l = values.sqrSum;    values = new Values(partition+1,inst.numInstances()-1,inst.classIndex(),inst);    nr  = inst.numInstances() - partition -1;    sr  = values.sum;    s2r = values.sqrSum;    order = k;    this.incremental(0,0);  }  /**   * Converts an Impurity object to a string   * @return the converted string   */  public final String  toString() {        StringBuffer text = new StringBuffer();        text.append("Print impurity values:\n");    text.append("    Number of total instances:\t" + n + "\n");    text.append("    Splitting attribute:\t\t" + attr + "\n");    text.append("    Number of the instances in the left:\t" + nl + "\n");    text.append("    Number of the instances in the right:\t" + nr + "\n");    text.append("    Sum of the left:\t\t\t" + sl + "\n");    text.append("    Sum of the right:\t\t\t" + sr + "\n");    text.append("    Squared sum of the left:\t\t" + s2l + "\n");     text.append("    Squared sum of the right:\t\t" + s2r + "\n");    text.append("    Standard deviation of the left:\t" + sdl + "\n");    text.append("    Standard deviation of the right:\t" + sdr + "\n");    text.append("    Variance of the left:\t\t" + vr + "\n");    text.append("    Variance of the right:\t\t" + vr + "\n");    text.append("    Overall standard deviation:\t\t" + sd + "\n");    text.append("    Overall variance:\t\t\t" + va + "\n");    text.append("    Impurity (order " + order + "):\t\t" + impurity + "\n");    return text.toString();  }    /**   * Incrementally computes the impurirty values   * @param value the incremental value    * @param type if type=1, value will be added to the left subset; type=-1, to the right subset; type=0, initializes   */  public final void  incremental(double value,int type){    double y=0.,yl=0.,yr=0.;    switch(type){    case 1:      nl += 1;      nr -= 1;      sl += value;      sr -= value;      s2l += value*value;      s2r -= value*value;      break;    case -1:      nl -= 1;      nr += 1;      sl -= value;      sr += value;      s2l -= value*value;      s2r += value*value;      break;    case 0:      break;    default: System.err.println("wrong type in Impurity.incremental().");    }    if(nl<=0.0){      vl=0.0;      sdl=0.0;    }    else {      vl = (nl*s2l-sl*sl)/((double)nl*((double)nl));      vl = Math.abs(vl);      sdl = Math.sqrt(vl);    }    if(nr<=0.0){      vr=0.0;      sdr=0.0;    }    else {      vr = (nr*s2r-sr*sr)/((double)nr*((double)nr));      vr = Math.abs(vr);      sdr = Math.sqrt(vr);    }    if(order <= 0)System.err.println("Impurity order less than zero in Impurity.incremental()");    else if(order == 1) {      y = va; yl = vl; yr = vr;    } else {      y  = Math.pow(va,1./order);      yl = Math.pow(vl,1./order);      yr = Math.pow(vr,1./order);    }    if(nl<=0.0 || nr<=0.0)      impurity = 0.0;    else {       impurity = y - ((double)nl/(double)n)*yl - ((double)nr/(double)n)*yr;    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品视频在线免费观看| 综合久久综合久久| 91麻豆免费看片| 麻豆精品一区二区三区| 一区视频在线播放| 国产亚洲人成网站| 欧美一级在线免费| 在线亚洲一区观看| 粉嫩av一区二区三区| 蜜臀av在线播放一区二区三区 | 欧美视频一区二区| 成人福利视频网站| 国内精品国产三级国产a久久| 亚洲精选免费视频| 国产日本亚洲高清| 日韩一级精品视频在线观看| 欧美视频在线一区二区三区 | 中文字幕av免费专区久久| 日韩亚洲欧美成人一区| 欧美日韩第一区日日骚| 色婷婷精品久久二区二区蜜臂av | 91女厕偷拍女厕偷拍高清| 国产精品一二三四五| 久久精品99久久久| 日韩av成人高清| 天天做天天摸天天爽国产一区| 亚洲美女淫视频| 亚洲欧美日韩国产另类专区| 国产精品高清亚洲| 国产精品久99| 1024精品合集| 亚洲视频一区二区在线| 国产精品国产精品国产专区不片 | 国产精品污污网站在线观看| 精品福利一区二区三区| 日韩欧美国产成人一区二区| 欧美一级久久久久久久大片| 91麻豆精品国产91| 日韩限制级电影在线观看| 欧美一区二区不卡视频| 精品国产免费一区二区三区四区 | 亚洲欧美色图小说| 亚洲免费色视频| 一区二区三区日韩欧美精品 | 蜜桃传媒麻豆第一区在线观看| 日韩高清电影一区| 卡一卡二国产精品 | 久久国产生活片100| 久久99蜜桃精品| 国产精品一区二区无线| 成人免费观看视频| 91老司机福利 在线| 91精品91久久久中77777| 欧美日韩一区久久| 91精品国产色综合久久久蜜香臀| 日韩欧美电影一二三| 久久综合狠狠综合久久综合88| 久久精品视频在线看| 亚洲欧美电影一区二区| 午夜av电影一区| 韩国女主播一区| 成人网页在线观看| 欧洲亚洲精品在线| 欧美电影免费提供在线观看| 日本一区二区三区电影| 亚洲另类在线制服丝袜| 日本va欧美va精品发布| 国产精品91一区二区| 日本久久一区二区三区| 91精品国产91久久久久久一区二区 | 在线观看一区二区视频| 欧美一区二区三区影视| 国产清纯美女被跳蛋高潮一区二区久久w| 国产精品免费久久| 五月激情综合色| 国产精品 日产精品 欧美精品| 一本色道久久综合亚洲aⅴ蜜桃| 欧美日韩一区中文字幕| 国产视频视频一区| 亚洲18影院在线观看| 国产传媒久久文化传媒| 欧美日韩精品系列| 欧美国产日韩在线观看| 婷婷综合五月天| 丰满亚洲少妇av| 欧美浪妇xxxx高跟鞋交| 亚洲国产精品传媒在线观看| 亚洲午夜精品在线| 成人综合婷婷国产精品久久免费| 欧美日韩黄色影视| 中文字幕五月欧美| 久久福利视频一区二区| 欧美在线高清视频| 国产日韩精品一区二区浪潮av| 亚洲高清在线精品| 99久久伊人精品| 欧美成人性福生活免费看| 亚洲另类春色国产| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 免费看欧美美女黄的网站| 色哟哟亚洲精品| 久久久亚洲综合| 五月天丁香久久| 色视频欧美一区二区三区| 国产亚洲va综合人人澡精品| 日本伊人午夜精品| 欧亚洲嫩模精品一区三区| 中文一区在线播放| 国产一区啦啦啦在线观看| 欧美日韩国产区一| 亚洲一区二区高清| 色综合久久久久综合体| 欧美国产精品v| 亚洲欧美另类综合偷拍| 日韩亚洲欧美在线| 九九精品视频在线看| 亚洲成在线观看| 91一区二区在线| 国产蜜臀97一区二区三区| 日韩av二区在线播放| 欧美日本一区二区三区| 亚洲黄一区二区三区| 成人av在线影院| 欧美激情一区二区三区蜜桃视频| 久草这里只有精品视频| 日韩精品在线一区二区| 久久精品久久精品| 日韩欧美国产不卡| 久久av中文字幕片| 精品美女被调教视频大全网站| 日产国产欧美视频一区精品| 欧美精品久久久久久久多人混战 | 成人伦理片在线| 国产欧美精品一区二区色综合朱莉| 激情综合色综合久久综合| 欧美zozo另类异族| 国产一区在线精品| 久久精品一区二区三区av| 国产一区二区网址| 日本一区二区免费在线观看视频 | 欧美剧情片在线观看| 亚洲国产乱码最新视频| 制服丝袜亚洲网站| 久色婷婷小香蕉久久| 久久精品这里都是精品| 成人av小说网| 亚洲日本在线天堂| 欧美视频一区在线| 免费在线成人网| 国产日韩av一区| 99精品一区二区三区| 一二三四社区欧美黄| 欧美一级淫片007| 国产九九视频一区二区三区| 中文字幕中文字幕一区二区| 色综合久久久久综合体桃花网| 亚洲成人一二三| 精品国产亚洲一区二区三区在线观看| 国产盗摄视频一区二区三区| 1024成人网色www| 制服丝袜在线91| 国产成人精品免费在线| 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩在线精品一区二区三区激情| 日本免费新一区视频| 日本一区二区三区在线不卡 | 色综合久久66| 久热成人在线视频| 国产精品久线在线观看| 欧美无砖专区一中文字| 国产一区二区在线免费观看| ...中文天堂在线一区| 在线播放中文一区| 国产成人免费9x9x人网站视频| 亚洲女同女同女同女同女同69| 欧美一卡2卡三卡4卡5免费| 国产91综合一区在线观看| 一区二区三区四区高清精品免费观看| 日韩精品中文字幕在线不卡尤物| 成人97人人超碰人人99| 日韩avvvv在线播放| 亚洲三级小视频| 精品久久久久一区二区国产| 色国产综合视频| 国产精品一二三区在线| 视频一区在线播放| 中文字幕一区二区三区不卡在线| 5566中文字幕一区二区电影| 成a人片国产精品| 激情久久五月天| 亚洲r级在线视频| 中文字幕中文字幕一区| 久久亚洲精品小早川怜子| 欧美日韩国产三级| av网站免费线看精品| 精品在线播放午夜| 视频一区免费在线观看| 中文字幕一区二区三区在线播放| 精品国产乱码久久久久久久| 在线不卡一区二区|