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

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

?? abstracttimebasedmodel.java

?? 搞算法預測的可以來看。有移動平均法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
////  OpenForecast - open source, general-purpose forecasting package.//  Copyright (C) 2002-2004  Steven R. Gould////  This library is free software; you can redistribute it and/or//  modify it under the terms of the GNU Lesser General Public//  License as published by the Free Software Foundation; either//  version 2.1 of the License, or (at your option) any later version.////  This library 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//  Lesser General Public License for more details.////  You should have received a copy of the GNU Lesser General Public//  License along with this library; if not, write to the Free Software//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//package net.sourceforge.openforecast.models;import java.util.Comparator;import java.util.Iterator;import java.util.SortedMap;import java.util.TreeMap;import net.sourceforge.openforecast.ForecastingModel;import net.sourceforge.openforecast.DataPoint;import net.sourceforge.openforecast.DataSet;import net.sourceforge.openforecast.Observation;/** * A time based forecasting model is the base class that implements much of * the common code for models based on a time series. In particular, it was * designed to support the needs of the Weighted Moving Average, as well as * the Single, Double and Triple Exponential Smoothing models. * * <p>These models have an advantage over other forecasting models in that * they smooth out peaks and troughs (or valleys) in a set of observations. * However, they also have several disadvantages. In particular these models * do not produce an actual equation. Therefore, they often are not all that * useful as medium-long range forecasting tools. They can only reliably be * used to forecast a few periods into the future. * @author Steven R. Gould * @since 0.4 */public abstract class AbstractTimeBasedModel extends AbstractForecastingModel{    /**     * The name of the independent (time) variable used in this model.     */    private String timeVariable = null;        /**     * Initialized to the time difference (in whatever units time is reported     * in) between two consecutive data points. You could also think of this     * as the "delta time" between data points.     */    private double timeDiff = 0.0;        /**     * Stores the minimum number of prior periods of data required to produce a     * forecast. Since this varies depending on the details of the model, any     * subclass must call setMinimumNumberOfPeriods - usually from the     * constructor - before init is invoked to provide the correct information.     */    private int minPeriods = 0;        /**     * The observed values are stored for future reference. In this model,     * unlike most others, we store all observed values. This is because these     * models don't derive any formula from the data, so the values may be     * needed later in order to derive future forecasts.     */    private DataSet observedValues;        /**     * The forecast values are stored to save recalculation. In this model,     * unlike most others, we store all forecast values. This is because these     * models don't derive any formula from the data.     */    private DataSet forecastValues;        /**     * The minimum value of the independent variable supported by this     * forecasting model. This is dependent on the data set used to     * initialize the model.     * @see #maxIndependentValue     */    private double minTimeValue;        /**     * The maximum value of the independent variable supported by this     * forecasting model. This is dependent on the data set used to     * initialize the model.     * @see #minTimeValue     */    private double maxTimeValue;        /**     * Constructs a new time based forecasting model. For a valid model to be     * constructed, you should call init and pass in a data set containing a     * series of data points. The data set should also have the time variable     * initialized to the independent time variable name.     */    public AbstractTimeBasedModel()    {    }        /**     * Constructs a new time based forecasting model, using the named variable     * as the independent (time) variable.     * @param timeVariable the name of the independent variable to use as the     * time variable in this model.     * @deprecated As of 0.4, replaced by {@link #AbstractTimeBasedModel}.     */    public AbstractTimeBasedModel( String timeVariable )    {        this.timeVariable = timeVariable;    }        /**     * Returns the current number of periods used in this model. This is also     * the minimum number of periods required in order to produce a valid     * forecast. Since this varies depending on the details of the model, any     * subclass must override this to provide the correct information.     * @return the minimum number of periods used in this model.     */    protected abstract int getNumberOfPeriods();        /**     * Used to initialize the time based model. This method must be called     * before any other method in the class. Since the time based model does     * not derive any equation for forecasting, this method uses the input     * DataSet to calculate forecast values for all values of the independent     * time variable within the initial data set.     * @param dataSet a data set of observations that can be used to initialize     *        the forecasting parameters of the forecasting model.     */    public void init( DataSet dataSet )    {        initTimeVariable( dataSet );        if ( dataSet == null  || dataSet.size() == 0 )            throw new IllegalArgumentException("Data set cannot be empty in call to init.");                int minPeriods = getNumberOfPeriods();                if ( dataSet.size() < minPeriods )            throw new IllegalArgumentException("Data set too small. Need "                                               +minPeriods                                               +" data points, but only "                                               +dataSet.size()                                               +" passed to init.");                observedValues = new DataSet( dataSet );        observedValues.sort( timeVariable );                // Check that intervals between data points are consistent        //  i.e. check for complete data set        Iterator it = observedValues.iterator();                DataPoint dp = (DataPoint)it.next();  // first data point        double lastValue = dp.getIndependentValue(timeVariable);                dp = (DataPoint)it.next();  // second data point        double currentValue = dp.getIndependentValue(timeVariable);                // Create data set in which to save new forecast values        forecastValues = new DataSet();                // Determine "standard"/expected time difference between observations        timeDiff = currentValue - lastValue;                // Min. time value is first observation time        minTimeValue = lastValue;                while ( it.hasNext() )            {                lastValue = currentValue;                                // Get next data point                dp = (DataPoint)it.next();                currentValue = dp.getIndependentValue(timeVariable);                double diff = currentValue - lastValue;                if ( Math.abs(timeDiff - diff) > TOLERANCE )                    throw new IllegalArgumentException( "Inconsistent intervals found in time series, using variable '"+timeVariable+"'" );                                try                    {                        initForecastValue( currentValue );                    }                catch (IllegalArgumentException ex)                    {                        // We can ignore these during initialization                    }            }                // Create test data set for determining accuracy indicators        //  - same as input data set, but without the first n data points        DataSet testDataSet = new DataSet( observedValues );        int count = 0;        while ( count++ < minPeriods )            testDataSet.remove( (testDataSet.iterator()).next() );                // Calculate accuracy        calculateAccuracyIndicators( testDataSet );    }    /**     * Initializes the time variable from the given data set. If the data set     * does not have a time variable explicitly defined, then provided there     * is only one independent variable defined for the data set that is used     * as the time variable. If more than one independent variable is defined     * for the data set, then it is not possible to take an educated guess at     * which one is the time variable. In this case, an     * IllegalArgumentException will be thrown.     * @param dataSet the data set to use to initialize the time variable.     * @throws IllegalArgumentException If more than one independent variable     * is defined for the data set and no time variable has been specified. To     * correct this, be sure to explicitly specify the time variable in the     * data set passed to {@link #init}.     */    protected void initTimeVariable( DataSet dataSet )        throws IllegalArgumentException    {        if ( timeVariable == null )            {                // Time variable not set, so look at independent variables                timeVariable = dataSet.getTimeVariable();                if ( timeVariable == null )                    {                        String[] independentVars                            = dataSet.getIndependentVariables();                        if ( independentVars.length != 1 )                            throw new IllegalArgumentException("Unable to determine the independent time variable for the data set passed to init for "+toString()+". Please use DataSet.setTimeVariable before invoking model.init.");                        timeVariable = independentVars[0];                    }            }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合天天狠狠| 精品国产a毛片| 国产欧美精品一区aⅴ影院| 亚洲精品视频免费观看| 国产一区欧美日韩| 日韩一区二区免费在线电影 | 国精品**一区二区三区在线蜜桃| av欧美精品.com| 欧美成人三级在线| 亚洲国产日日夜夜| 91色|porny| 国产精品女人毛片| 国产精品一区一区| 日韩亚洲欧美中文三级| 亚洲国产裸拍裸体视频在线观看乱了| 国产精品一区二区在线看| 51精品国自产在线| 午夜免费久久看| 在线日韩国产精品| 亚洲精品国产高清久久伦理二区| 国产成人在线电影| 精品久久久久香蕉网| 青青草97国产精品免费观看| 欧美色国产精品| 一区二区国产盗摄色噜噜| 成人免费高清视频在线观看| 久久久不卡网国产精品二区| 精品一区二区三区免费| 91精品国产综合久久久久久久| 亚洲大片在线观看| 精品视频1区2区3区| 亚洲午夜一区二区| 精品视频1区2区| 午夜久久久久久久久| 欧美优质美女网站| 亚洲国产精品一区二区www在线| 一道本成人在线| 亚洲成人激情自拍| 欧美日韩成人高清| 捆绑紧缚一区二区三区视频| 精品久久一区二区三区| 国产呦精品一区二区三区网站| 国产亚洲精品aa| 99久久综合色| 夜色激情一区二区| 欧美日韩精品一区视频| 日韩精品乱码免费| 欧美大白屁股肥臀xxxxxx| 国产在线精品一区二区不卡了| 日韩亚洲欧美综合| 国产成人日日夜夜| 国产精品白丝在线| 日本高清不卡aⅴ免费网站| 伊人一区二区三区| 69p69国产精品| 国产精品系列在线观看| 国产精品国产三级国产aⅴ中文| 色综合久久综合中文综合网| 视频一区在线视频| 精品欧美黑人一区二区三区| 成人激情视频网站| 偷拍一区二区三区| 久久九九全国免费| 欧美中文字幕久久| 久久国产精品99精品国产| 中文文精品字幕一区二区| 欧美在线观看视频在线| 国产在线播放一区三区四| 成人欧美一区二区三区| 欧美一区二区三区婷婷月色| 国产精品12区| 亚洲国产一区视频| 欧美国产在线观看| 欧美精品色综合| 成人黄色一级视频| 美女性感视频久久| 亚洲激情网站免费观看| 亚洲精品在线三区| 91电影在线观看| 国产一区二区美女诱惑| 亚洲第一成人在线| 中文字幕一区二区三区精华液| 欧美一区二区国产| 色哟哟一区二区在线观看| 国产在线播放一区三区四| 亚洲成人精品一区| 一区在线播放视频| 亚洲精品在线观看视频| 91精品午夜视频| 欧美综合视频在线观看| 国产福利一区二区三区视频在线| 亚洲高清免费一级二级三级| 国产精品成人一区二区三区夜夜夜| 欧美另类变人与禽xxxxx| 成人sese在线| 国产经典欧美精品| 六月婷婷色综合| 热久久一区二区| 午夜欧美视频在线观看| 一区二区三区国产豹纹内裤在线| 日本一区二区成人在线| 精品美女被调教视频大全网站| 欧美精品在线观看播放| 在线亚洲免费视频| 97精品视频在线观看自产线路二| 国产福利一区二区| 国产成人在线视频播放| 精品一区二区三区免费播放| 久久精品噜噜噜成人av农村| 亚洲1区2区3区4区| 亚洲一二三四在线| 亚洲资源中文字幕| 亚洲一区二区三区四区在线观看| 亚洲乱码国产乱码精品精可以看| 中日韩免费视频中文字幕| 国产午夜三级一区二区三| 久久婷婷国产综合国色天香| 精品人在线二区三区| 日韩精品专区在线影院观看| 日韩欧美国产一区二区三区| 日韩美女主播在线视频一区二区三区| 91麻豆精品国产91久久久久| 91精品视频网| 久久麻豆一区二区| 国产精品污网站| 国产精品国产三级国产aⅴ无密码| 国产精品久久久久久久久久久免费看| 国产精品伦一区二区三级视频| 久久精品亚洲精品国产欧美| 欧美国产精品中文字幕| 亚洲视频一二三区| 亚洲国产va精品久久久不卡综合| 视频一区中文字幕| 国产乱妇无码大片在线观看| 粉嫩一区二区三区性色av| 99久久精品免费精品国产| 欧美吞精做爰啪啪高潮| 91麻豆精品国产91| 欧美激情一区二区三区全黄| 亚洲视频精选在线| 日韩不卡一二三区| 国产精品亚洲视频| 在线观看av一区| 久久影院电视剧免费观看| 国产精品国产自产拍在线| 亚洲高清在线视频| 国产成人福利片| 日本韩国视频一区二区| 欧美一区二区三区不卡| 久久久久久久久一| 亚洲一区欧美一区| 久久精品99久久久| av福利精品导航| 欧美精品三级日韩久久| 国产农村妇女毛片精品久久麻豆| 亚洲女人小视频在线观看| 日本午夜精品一区二区三区电影| 成人免费视频一区二区| 欧美色视频一区| 中文字幕免费不卡| 日韩国产高清影视| 99精品久久免费看蜜臀剧情介绍| 91精品久久久久久久久99蜜臂| 国产婷婷色一区二区三区在线| 亚洲欧美日韩综合aⅴ视频| 看国产成人h片视频| 欧美无砖专区一中文字| 日本一区二区三区在线不卡| 日本一区中文字幕| 一本大道综合伊人精品热热| 久久一夜天堂av一区二区三区 | 成人精品视频一区二区三区尤物| 欧美军同video69gay| 欧美国产日韩在线观看| 七七婷婷婷婷精品国产| 欧美中文字幕久久| 亚洲欧美精品午睡沙发| 粉嫩13p一区二区三区| 日韩女优电影在线观看| 亚洲影院理伦片| 97久久超碰精品国产| 国产女人aaa级久久久级| 国内偷窥港台综合视频在线播放| 欧美久久一二三四区| 亚洲人成精品久久久久| 高清成人免费视频| 国产欧美一区二区三区网站| 成人激情校园春色| 26uuu久久天堂性欧美| 日本午夜一本久久久综合| 欧美日韩中文另类| 亚洲欧美经典视频| 97久久精品人人做人人爽50路| 国产片一区二区| 国产精品18久久久久久久网站| 亚洲精品一线二线三线无人区| 美美哒免费高清在线观看视频一区二区| 精品视频全国免费看| 亚洲h在线观看| 91.xcao|