q1.java

来自「销售预测的实现,包括移动平均,指数平滑,时间序列分解,自回归」· Java 代码 · 共 69 行

JAVA
69
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package forcast;/** * * @author Administrator *//*public class q1 {	public static void main(String[] args) {		double x[][]=new double[2][];		x[0]=new double[]{-0.5,-0.5,0.3,0.1,-0.1,0.8,0.2,0.3};		x[1]=new double[]{0.3,-0.2,-0.6,0.1,-0.5,1.0,0.3,0.9};		int t[]={1,0,0,1,0,1,1,1};		double y[]=new double[2];		double tt[]=new double[1];		Util_xxz.init();		double temp1[]=new double[8];		double temp2[]=new double[8];	    for(int k=0;k<10000000;k++)	    {	    	for(int i=0;i<8;i++)	    	{			y[0]= x[0][i];y[1]= x[1][i];			tt[0]=t[i];			Util_xxz.bp(y,tt);			}	    	double s=0;	    	for(int l=0;l<8;l++)	    	{			y[0]= x[0][l];y[1]= x[1][l];			double temp=Util_xxz.result(y);			s=s+(temp-t[l])*(temp-t[l]);			temp1[l]=temp;			temp2[l]=temp;		    }	    	s=s/2;	    	if(s<0.001){	    		 for(int m=0;m<8;m++)	    		System.out.println("("+temp1[m]+":"+temp2[m]+")");	    		break;}	    }	  System.out.print("______________");	   for(int l=0;l<8;l++)    	{		y[0]= x[0][l];y[1]= x[1][l];		System.out.println(Util_xxz.result(y));	    }	   System.out.println("_____________");	   Util_xxz.showW();	}}*/

⌨️ 快捷键说明

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