📄 main.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package forcast;/** * * @author Administrator */public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { method fm=new method(); int number=5; //double[] real = {1141,1306,2796,3669,5372,6293,8262,11056,11660,21526,26141,32003,31291,33123,19114,7399,12028,15982,21054,40648,44965};//输入实际值 double[] real={1141,1306,2796,3669,5372,6293,8262,11056,11660,21526,26141,32003,31291,33123,19114,7399,12028,12682,15557,16648,22265}; //double[] real={784.9,773.4,1624.7,1595.7,2281.5,1139,914.8,1249.1,1480.6,1351.2,1604,1183.3,266.2,897,1821.7,4316.9,1636.4,1377,1188.5,1737.8,2522.2,1262.8,2862.6,1165.2,728.5,597.6,3504.7,2707.8,2366.4,1820.9,5451.6,1773.6,1773.6,15621.4,2161.2,2141,830.6,1463,3831.7,2422.7,10457,1397.7,2016.2,5636.3,10371.5,2957.1,1715.8,1865.7,5673.5,1354,5426.7,3807.7,2462.3,16309.5,3284.7,5670.1,8673.5,11886.4,3065.6,10703}; //double[] real={784.9,773.4,1624.7,915.7,1161.5,1139,914.8,822.1,1480.6,1351.2,847,867.3,266.2,897,1821.7,2103.9,1636.4,1280,1188.5,1251.8,1541.2,1262.8,1142.6,1165.2,728.5,597.6,1118.2,2707.8,1226.2,833.8,1594.6,1773.6,1773.6,2061.4,1175.2,1057.8,830.6,1463,3831.7,2422.7,2207.8,1397.7,2015.9,1979.8,1261.5,1272.9,1715.8,1865.7,1366.1,1353.5,3964.2,3807.7,2462.3,2261.6,2208.9,304.3,6633.4,1209.5,3065.6,2092.9}; //double[] real={15,15,15,15,15,15,15,15}; double[] forcast=new double[real.length+number]; //double ftrend[]=new double[real.length+number];//预测趋势项 //double seasonindexc[]=new double[12]; //fm.movingaverage(real,forcast,number);//调用移动平均模型进行预测 //fm.autoregression(real);//调用自回归模型进行预测 //fm.exponentialSmoothing(real);//调用指数平滑模型进行预测 //fm.arma(real);//调用自回归移动平均模型进行预测 //fm.ar3(real); //fm.timeseries(real,ftrend,seasonindexc,forcast,number);//调用时间序列模型 //bp test=new bp(real); //System.out.println("bp"); //test.bp_main(); bptest test=new bptest(real,forcast,number); System.out.println("bptest"); test.bp_main(); //test.bpamend(784.9,773.4,1624.7,1595.7); }//}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -