⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 binner.java

📁 用于multivariate时间序列分类
💻 JAVA
字号:
/**  * What this class does goes here  *  *   * @author Waleed Kadous  * @version $Id: Binner.java,v 1.1.1.1 2002/06/28 07:36:16 waleed Exp $  */package tclass.learnalg;   import tclass.*; import tclass.util.*; // Messiness note. To make four bins, i need 3 values. So ten bins needs nine values. public class Binner {    float[] boundaries;    Binner(int numBins){	boundaries = new float[numBins-1];     }    void setBound(int num, float val){	boundaries[num] = val; 	if(num > 0){	    Debug.myassert(boundaries[num-1] < boundaries[num], 			 "DANGER!!! Bin boundaries are not sequential!!"			 + boundaries[num-1] + " > " + boundaries[num]); 	    	}	    }    int findBin(float value){	for(int i=0; i < boundaries.length; i++){	    if(value < boundaries[i]){		return i; 	    }	}	return boundaries.length;     }        public String toString(){	return "Discretisation boundaries are: " + EqualFreqDiscretiser.d2str(boundaries);     }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -