資源簡介
指數平滑算法

代碼片段和文件信息
package?Predict;
import?java.text.DecimalFormat;
import?java.util.Vector;
public?class?Bean?implements?java.io.SerializableComparable{
????private?Double?param;//參數a
????private?Double[]?values;//輸入數據
private?Double[]?one;//一次平滑數據
private?Double[]?two;//二次平滑數據
private?Double[]?three;//三次平滑數據
private?Double?a;//計算表達式
private?Double?b;//計算表達式
private?Double?c;
private?Double[]?yuce;//預測數據
private?Double?wucha;//誤差
public?Bean()?{
super();
}
public?static?Double?format(Double?number){
DecimalFormat?format=new?DecimalFormat(“0.00“);
return?Double.valueOf(format.format(number));//format轉換
}
public?Bean(Double?param?Double[]?values?Double[]?one?Double[]?twoDouble[]?three
)?{
super();
this.param?=?param;
this.values?=?values;
this.one?=?one;
this.two?=?two;
this.three=three;
}
public?Double[]?getValues()?{
return?values;
}
public?void?setValues(Double[]?values)?{
this.values?=?values;
}
public?Double[]?getOne()?{
return?one;
}
public?void?setOne(Double[]?one)?{
this.one?=?one;
}
public?Double[]?getTwo()?{
return?two;
}
public?void?setTwo(Double[]?two)?{
this.two?=?two;
}
public?Double[]?getThree()?{
return?three;
}
public?void?setThree(Double[]?three)?{
this.three?=?three;
}
public?Double?getWucha()?{
return?wucha;
}
public?void?setWucha(Double?wucha)?{
this.wucha?=?wucha;
}
@Override
public?String?toString()?{
DecimalFormat?df=new?DecimalFormat(“0.00“);
StringBuffer?buffer=new?StringBuffer();
for?(int?i?=?0;?i? buffer.append(df.format(yuce[i]));
}
return?buffer.toString();
}
public?Double[]?getYuce()?{
return?yuce;
}
public?void?setYuce(Double[]?yuce)?{
this.yuce?=?yuce;
}
public?Double?getParam()?{
return?param;
}
public?void?setParam(Double?param)?{
this.param?=?param;
}
public?Double?getA()?{
return?a;
}
public?void?setA(Double?a)?{
this.a?=?a;
}
public?Double?getB()?{
return?b;
}
public?void?setB(Double?b)?{
this.b?=?b;
}
public?Double?getC()?{
return?c;
}
public?void?setC(Double?c)?{
this.c?=?c;
}
public?int?compareTo(Bean?o)?{
return?this.getWucha().compareTo(o.getWucha());//按wucha進行排序??
}
public?Bean?get(int?i)?{
//?TODO?Auto-generated?method?stub
return?null;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2526??2014-04-07?08:19??指數平滑算法\Bean.java
?????文件???????2530??2014-04-07?08:04??指數平滑算法\Bean.java.bak
?????文件???????5166??2014-04-07?08:10??指數平滑算法\cubicExponentialSmoothingMethod.java
?????文件???????4223??2017-06-25?07:53??指數平滑算法\PredictByYear.java
?????目錄??????????0??2017-06-24?21:54??指數平滑算法
-----------?---------??----------?-----??----
????????????????14445????????????????????5
- 上一篇:c實現pop3接收郵件
- 下一篇:大數據工程師自學到精通最佳學習路線
評論
共有 條評論