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

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

?? noise_filter.java

?? java的小波分析程序
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:


package wavelet_util;

import java.util.Vector;
import sort.*;
import wavelets.*;
import java.io.*;

/**
  <p>
  The objective in filtering is to remove noise while keeping the
  features that are interesting.
  </p>

  <p> 
  Wavelets allow a time series to be examined at various
  resolutions.  This can be a powerful tool in filtering out noise.
  This class supports the subtraction of gaussian noise from
  the time series.
  </p>

  <p>
  The identification of noise is complex and I have not found any
  material that I could understand which discussed noise
  identification in the context of wavelets.  I did find some material
  that has been difficult and frustrating.  In particular
  <i>Image Processing and Data Analysis: the multiscale approach</i>
  by Starck, Murtagh and Bijaoui.
  </p>
  
  <p>
  If the price of a stock follows a random walk, its price will be
  distributed in a bell (gaussian) curve.  This is one way of stating
  the concept from financial theory that the daily return is normally
  distributed (here daily return is defined as the difference between
  yesterdays close price and today's close price).  Movement outside
  the bounds of the curve may represent something other than a random walk
  and so, in theory, might be interesting.
  </p>

  <p> 
  At least in the case of the single test case used in developing this
  code (Applied Materials, symbol: AMAT), the coefficient distribution
  in the highest frequency is almost a perfect normal curve.  That is,
  the mean is close to zero and the standard deviation is close to
  one.  The area under this curve is very close to one.  This
  resolution approximates the daily return.  At lower frequencies the
  mean moves away from zero and the standard deviation increases.
  This results is a flattened curve, whose area in the coefficient
  range is increasingly less than one.
  </p>

  <p> 
  The code in this class subtracts the normal curve from the
  coefficients at each frequency up to some minimum.  This leaves only
  the coefficients above the curve which are used to regenerate the
  time series (without the noise, in theory).  This filter removes 50
  to 60 percent of the coefficients.
  </p>

  <p>
  Its probably worth mentioning that there are other kinds of
  noise, most notably Poisson noise.  In theory daily data
  tends to show gaussian noise, while intraday data would
  should Poisson noise.  Intraday Poisson noise would result
  from the random arrival and size of orders.
  </p>

  <p>
  This function has two public methods:
  </p>
  <ol>
  <li>
  <p>n
  <i>filter_time_series</i>, which is passed a file name and a time series
  </p>
  </li>
  <li>
  <p>
  <i>gaussian_filter</i> which is passed a set of Haar coefficient
  spectrum and an array allocated for the noise values.  The
  noise array will be the same size as the coefficient array.
  </p>
  </li>
  <ol>
    
  </p>

 */
public class noise_filter extends plot {

String class_name() { return "noise_filter"; }

  /**
    <p>
    The point class represents a coefficient value so that it can be
    sorted for histogramming and then resorted back into the orignal
    ordering (e.g., sorted by value and then sorted by index)
    </p>
   */
  private class point {
    point(int i, double v)
    {
      index = i;
      val = v;
    }
    public int index;  // index in original array
    public double val; // coefficient value
  } // point


  /**
    <p>
    A histogram bin
    </p>
    <p>
    For a histogram bin b<sub>i</sub>, the range of
    values is b<sub>i</sub>.start to b<sub>i+1</sub>.start.
    </p>
    <p>
    The vector object <i>vals</i> stores references to 
    the point objects which fall in the bin range.
    </p>
    <p>
    The number of values in the bin is <i>vals.size()</i>
    </p>
   */
  private class bin {
    bin( double s ) { start = s; }
    public double start;
    public Vector vals = new Vector();
  } // bin

   /**
      Bell curve info: mean, sigma (the standard deviation)
    */
   private class bell_info {
     public bell_info() {}
     public bell_info(double m, double s)
     {
       mean = m;
       sigma = s;
     }
     public double mean;
     public double sigma;
   } // bell_info



  /**

    <p>
    Build a histogram from the sorted data in the pointz
    array.  The histogram is constructed by appending a
    point object to the the bin <i>vals</i> Vector if the value
    of the point is between b[i].start and b[i].start + step.
    </p>

   */
  private void histogram( bin binz[], point pointz[] )
  {
    double step = binz[1].start - binz[0].start;
    double start = binz[0].start;
    double end = binz[1].start;
    int len = pointz.length;
    double max = binz[ binz.length-1 ].start + step;

    int i = 0;
    int ix = 0;
    while (i < len && ix < binz.length) {
      if (pointz[i].val >= start && pointz[i].val < end) {
	binz[ix].vals.addElement( pointz[i] );
	i++;
      }
      else {
	ix++;
	start = end;
	end = end + step;
      }
    } // while
  } // histogram


  
  /**
    Sort an array of <i>point</i> objects by the
    index field.
   */
  private class sort_by_index extends generic_sort {
    
    /**

      if (a.index == b.index) return 0
      if (a.index < b.index) return -1
      if (a.index > b.index) return 1;

     */
    protected int compare( Object a, Object b )
    {
      int rslt = 0;
      point t_a = (point)a;
      point t_b = (point)b;

      if (t_a.index < t_b.index)
	rslt = -1;
      else if (t_a.index > t_b.index)
	rslt = 1;

      return rslt;
    } // compare

  } // sort_by_index


  /**
    Sort an array of <i>point</i> objects by the
    val filed.
   */
  private class sort_by_val extends generic_sort {

    /**

      if (a.val == b.val) return 0
      if (a.val < b.val) return -1
      if (a.val > b.val) return 1;

     */
    protected int compare( Object a, Object b )
    {
      int rslt = 0;
      point t_a = (point)a;
      point t_b = (point)b;

      if (t_a.val < t_b.val)
	rslt = -1;
      else if (t_a.val > t_b.val)
	rslt = 1;

      return rslt;
    } // compare

  } // sort_by_val


  /**
    Allocate an array of histogram bins that is <i>num_bins</i> in
    length.  Initialize the start value of each bin with
    a start value calculated from <i>low</i> and <i>high</i>.
   */
  private bin[] alloc_bins( int num_bins, double low, double high )
  {
    double range = high - low;
    double step = range / (double)num_bins;
    double start = low;

    bin binz[] = new bin[ num_bins ];
    for (int i = 0; i < num_bins; i++) {
      binz[i] = new bin( start );
      start = start + step;
    }

    return binz;
  } // alloc_bins


  /**
    <p>
    Calculate the histogram of the coefficients using 
    <i>num_bins</i> histogram bins
    </p>
    <p>
    The Haar coefficients are stored in point objects
    which consist of the coefficient value and the
    index in the point array.
    </p>
    <p>
    To calculate the histogram, the pointz array is
    sorted by value.  After it is histogrammed it
    is resorted by index to return the original ordering.
    </p>
   */
  private bin[] calc_histo( point pointz[], int num_bins )
  {
    // sort by value
    sort_by_val by_val = new sort_by_val();
    by_val.sort( pointz );

    int len = pointz.length;
    double low = pointz[0].val;
    double high = pointz[len-1].val;

    bin binz[] = alloc_bins( num_bins, low, high );
    histogram( binz, pointz );

    // return the array to its original order by sorting by index
    sort_by_index by_index = new sort_by_index();
    by_index.sort( pointz );
    
    return binz;
  } // calc_histo


  /**
    <p>
    Allocate and initialize an array of <i>point</i> objects.
    The size of the array is <tt><i>end</i> - <i>start</i></tt>.
    Each point object in the array is initialized with its
    index and a Haar coefficient (from the <i>coef</i> array).
    </p>
    <p>
    Since the allocation code has to iterate through the 
    coefficient spectrum the mean and standard deviation
    are also calculated to avoid an extra iteration.  These
    values are returned in the <i>bell_info</i> object.
    </p>
   */
  private point[] alloc_points( double coef[], 
				int start, 
				int end,
				bell_info info )
  {
    int size = end - start;
    point pointz[] = new point[ size ];

    double sum = 0;
    int ix = start;
    for (int i = 0; i < size; i++) {
      pointz[i] = new point( i, coef[ix] );
      sum = sum + coef[ix];
      ix++;
    }
    double mean = sum / (double)size;
    
    // now calculate the standard deviation
    double stdDevSum = 0;
    double x;
    for (int i = 0; i < size; i++) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线亚洲高清视频| 91视频www| 久久久久国产精品厨房| 亚洲欧洲另类国产综合| 国产精品1区二区.| 亚洲伊人色欲综合网| 欧美视频在线一区| 国产精品一区二区三区99| 国产精品久线观看视频| 欧美三级在线视频| 国产一区二区三区香蕉| 亚洲九九爱视频| 日韩一区二区三区电影在线观看 | 国产不卡一区视频| 一区二区三区 在线观看视频| 精品视频1区2区| 国产成人一级电影| 视频一区在线播放| 中文字幕在线一区| 日韩一二三区视频| 色婷婷综合久久久中文字幕| 久久精品国产久精国产| 综合电影一区二区三区 | 国产精品一区在线观看乱码 | 欧美主播一区二区三区美女| 日本亚洲一区二区| 首页综合国产亚洲丝袜| 亚洲女同一区二区| 中文字幕永久在线不卡| 久久先锋影音av鲁色资源| 欧美色男人天堂| 在线视频国内自拍亚洲视频| 福利91精品一区二区三区| 国产一区二区三区免费观看| 亚洲成人av福利| 日韩电影在线免费| 九色综合狠狠综合久久| 久久99久久久久| 国产一区二区美女诱惑| 国产九色sp调教91| 色吊一区二区三区| 欧美色图在线观看| 日韩欧美亚洲一区二区| 久久久噜噜噜久久中文字幕色伊伊| 欧美一区中文字幕| 精品国产91亚洲一区二区三区婷婷 | 成人福利在线看| 91久久国产最好的精华液| 欧美精品在线一区二区| 在线观看www91| 日韩区在线观看| 亚洲人成在线播放网站岛国| 亚洲国产成人av网| 国产高清久久久| 欧美三级蜜桃2在线观看| 国产午夜精品一区二区| 久久电影网站中文字幕| 国产亚洲成aⅴ人片在线观看| 欧美久久久久久久久中文字幕| 亚洲精品一区二区在线观看| 国产精品高潮呻吟| 精品一区二区三区在线观看| 色8久久人人97超碰香蕉987| 91精品国产日韩91久久久久久| 中文字幕免费一区| 国产美女在线观看一区| 日韩欧美一级在线播放| 亚洲第一久久影院| 色www精品视频在线观看| 精品国产污污免费网站入口| 婷婷开心激情综合| 欧美性xxxxxxxx| 婷婷久久综合九色综合绿巨人| 成人免费黄色大片| 国产日产精品一区| 成人丝袜高跟foot| 国产午夜精品一区二区三区视频 | 精品亚洲免费视频| 欧美一区二区三区的| 亚洲国产精品久久人人爱| 成人免费黄色大片| 亚洲一区视频在线| 日韩一区二区电影| 久久99精品国产麻豆不卡| 26uuu亚洲婷婷狠狠天堂| 国产原创一区二区| 国产精品丝袜一区| 欧美日韩一本到| 国内精品国产成人| 亚洲女人的天堂| 91精品国产aⅴ一区二区| 国产精品1区2区| 亚洲黄色在线视频| 日韩欧美亚洲国产另类| 成人在线视频首页| 亚洲国产综合色| 国产亚洲综合在线| 欧美精品亚洲一区二区在线播放| 久久疯狂做爰流白浆xx| 综合欧美一区二区三区| 日韩欧美成人激情| 欧美日韩一区久久| 在线日韩一区二区| 99久久国产免费看| 91高清在线观看| 国产精品18久久久久久vr| 亚洲自拍欧美精品| 亚洲男女一区二区三区| 国产午夜精品在线观看| 3d动漫精品啪啪1区2区免费| 99re视频这里只有精品| 国产一二精品视频| 毛片一区二区三区| 精品在线视频一区| 国产一区二区看久久| 国产在线观看免费一区| 九色|91porny| 国产91精品露脸国语对白| 激情图区综合网| 国产综合色在线| 国产精品伊人色| 成人av网址在线观看| 91在线精品一区二区| av激情综合网| 在线观看日韩毛片| 欧美一区二区视频在线观看2022 | 福利一区二区在线观看| 91丨九色丨蝌蚪富婆spa| 色综合色综合色综合色综合色综合| 97久久久精品综合88久久| 色就色 综合激情| 欧美一级国产精品| 国产精品久久99| 午夜久久电影网| 99久久国产免费看| 欧美一级日韩不卡播放免费| 欧美激情在线一区二区三区| 亚洲图片激情小说| 久久精品久久久精品美女| 高清不卡在线观看av| 欧美一区二区三区在线视频| 国产欧美日韩卡一| 美女网站一区二区| 欧美色偷偷大香| 国产精品久久三| 美女视频第一区二区三区免费观看网站| 国产精品18久久久久久久久| 欧美日韩国产首页在线观看| 国产精品天美传媒沈樵| 久久不见久久见中文字幕免费| 欧美成人a在线| 一区二区三区中文字幕精品精品| 国产一区二区剧情av在线| 在线成人午夜影院| 婷婷久久综合九色国产成人| 日本精品视频一区二区| 亚洲精品日韩一| 91小宝寻花一区二区三区| 亚洲欧洲三级电影| 99热在这里有精品免费| 亚洲欧美一区二区久久| 国产精品888| 亚洲精品久久7777| 在线日韩一区二区| 奇米综合一区二区三区精品视频 | 91美女片黄在线| 性做久久久久久久久| 欧美一卡二卡在线| 狠狠色丁香婷婷综合| 成人手机在线视频| 精品国产青草久久久久福利| 最好看的中文字幕久久| 色噜噜狠狠成人网p站| 亚洲高清视频的网址| 欧美丰满少妇xxxxx高潮对白| 午夜精品一区二区三区三上悠亚| 日韩一区二区精品| av一区二区不卡| 亚洲va在线va天堂| 国产精品久久久久婷婷| 欧美午夜电影网| 成人精品免费网站| 五月天一区二区三区| 国产精品三级电影| 欧美电影免费观看高清完整版 | 日韩一级黄色片| 色综合中文综合网| 日韩伦理电影网| 久久久久成人黄色影片| 欧美日韩免费一区二区三区| 成人免费视频视频| 国产精品小仙女| 美女一区二区三区| 亚洲6080在线| 最新国产精品久久精品| 久久天天做天天爱综合色| 国产视频一区在线观看| 日韩欧美精品在线| 欧美一级免费观看| 欧美日韩一区视频|