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

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

?? jsommath.java

?? Kohonen網絡的學習過程可描述為:對于每一個網絡的輸入
?? JAVA
字號:
package fi.javasom.jsom;
/**
 * This is JSomMath class that contains mathematical functions for cooperative and adaptive processes.
 *
 *  Copyright (C) 2001  Tomi Suuronen
 *
 *  @version 1.0
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

public class JSomMath
{
	private double[] cacheVector; //cache vector for temporary storage.
	private int sizeVector; //size of the cache vector.
	private double distCache; //distance cache.
	private double gaussianCache; //double cache for gaussian neighbourhood function operations.
	private int distCacheSize; //cache for the length of the two vectors.

	/**
	 * Constructor.
	 *
	 * @param int vectorSize - Size of a weight/input vector.
	*/
	public JSomMath(int vectorSize)
	{
		cacheVector = new double[vectorSize];
		for(int i=0;i<vectorSize;i++)
		{
			cacheVector[i] = 0.0;
		}
		sizeVector = cacheVector.length;
	}

	/**
	 * Calculates the Euclidean distance between two vectors.
	 *
	 * @param double[] x - 1st vector.
	 * @param double[] y - 2nd vector.
	 * @return double - returns the distance between two vectors, x and y
	*/
	public double getDistance(double[] x, double[] y)
	{
		distCache = 0.0;
		distCacheSize = x.length;
		for(int i=0;i<distCacheSize;i++)
		{
			distCache += Math.pow((x[i]-y[i]),2.0);
		}
		return Math.sqrt(distCache);
	}

	/**
	 * Calculates the exponential learning-rate parameter value.
	 *
	 * @param int n - current step (time).
	 * @param double a - initial value for learning-rate parameter (should be close to 0.1).
	 * @param int A - time constant (usually the number of iterations in the learning process).
	 * @return double - exponential learning-rate parameter value.
	*/
	public double expLRP(int n,double a,int A)
	{
		return (a * Math.exp(-1.0 * ((double)n) / ((double)A)));
	}

	/**
	 * Calculates the linear learning-rate parameter value.
	 *
	 * @param int n - current step (time).
	 * @param double a - initial value for learning-rate parameter (should be close to 0.1).
	 * @param int A - another constant (usually the number of iterations in the learning process).
	 * @return double - linear learning-rate parameter value.
	*/
	public double linLRP(int n,double a,int A)
	{
		return (a * (1 - ((double)n) / ((double)A)));
	}

	/**
	 * Calculates the inverse time learning-rate parameter value.
	 *
	 * @param int n - current step (time).
	 * @param double a - initial value for learning-rate parameter (should be close to 0.1).
	 * @param double A - another constant.
	 * @param double B - another constant.
	 * @return double - inverse time learning-rate parameter value.
	*/
	public double invLRP(int n,double a,double A,double B)
	{
		return (a * (A / (B + n)));
	}


	/**
	 * Calculates the gaussian neighbourhood width value.
	 *
	 * @param double g - initial width value of the neighbourhood.
	 * @param int n - current step (time).
	 * @param int t - time constant (usually the number of iterations in the learning process).
	 * @return double - adapted gaussian neighbourhood function value.
	*/
	public double gaussianWidth(double g,int n,int t)
	{
		return (g * Math.exp(-1.0 * ((double)n) / ((double)t)));
	}

	/**
	 * Calculates the Gaussian neighbourhood value.
	 *
	 * @param double[] i - winning neuron location in the lattice.
	 * @param double[] j - excited neuron location in the lattice.
	 * @param double width - width value of the neighbourhood.
	 * @return double - Gaussian neighbourhood value.
	*/
	private double gaussianNF(double[] i,double[] j, double width)
	{
		gaussianCache = getDistance(i,j);
		return (Math.exp(-1.0 * gaussianCache * gaussianCache / (2.0 * width * width)));
	}

	/**
	 * Calculates whether the excited neuron is in the Bubble neighbourhood set.
	 *
	 * @param double[] i - winning neuron location in the lattice.
	 * @param double[] j - excited neuron location in the lattice.
	 * @param double g - width value of the neighbourhood.
	 * @return boolean - true if located in the Bubble neighbourhood set.
	*/
	private boolean bubbleNF(double[] i,double[] j, double g)
	{
		if(getDistance(i,j) <= g)
		{
			return true;
		}
		return false;
	}

	/**
	 * Calculates the new adapted values for a weight vector, based on Bubble neighbourhood.
	 *
	 * @param double[] x - input vector.
	 * @param double[] w - weight vector.
	 * @param double[] i - winning neuron location in the lattice.
	 * @param double[] j - excited neuron location in the lattice.
	 * @param double g - adapted width value of the neighbourhood.
	 * @param double lrp - adapted learning-rate parameter value.
	 * @return double[] - Returns the adapted neuron values.
	*/
	public double[] bubbleAdaptation(double[] x,double[] w,double[] i,double[] j,double g,double lrp)
	{
		if(bubbleNF(i,j,g))
		{
			for(int k=0;k<sizeVector;k++)
			{
				cacheVector[k] = w[k] + lrp * (x[k] - w[k]);
			}
		}
		else
		{
			return w;
		}
		return cacheVector;
	}


	/**
	 * Calculates the new adapted values for a weight vector, based on Gaussian neighbourhood.
	 *
	 * @param double[] x - input vector.
	 * @param double[] w - weight vector.
	 * @param double[] i - winning neuron location in the lattice.
	 * @param double[] j - excited neuron location in the lattice.
	 * @param double width - adapted width value of the neighbourhood.
	 * @param double lrp - adapted learning-rate parameter value.
	 * @return double[] - Returns the adapted neuron values.
	*/
	public double[] gaussianAdaptation(double[] x,double[] w,double[] i,double[] j,double width,double lrp)
	{
		gaussianCache = gaussianNF(i,j,width);
		for(int k=0;k<sizeVector;k++)
		{
			cacheVector[k] = w[k] + lrp * gaussianCache * (x[k] - w[k]);
		}
		return cacheVector;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人h动漫精品| 欧美一区二区三区在线电影| 色94色欧美sute亚洲线路一ni| 欧美日韩在线播| 中文字幕成人网| 日本不卡一区二区三区| 91一区二区在线| 久久综合99re88久久爱| 午夜国产不卡在线观看视频| 成人深夜视频在线观看| 欧美一区二区三区精品| 亚洲福利一二三区| 91欧美一区二区| 国产精品国产馆在线真实露脸| 精品午夜一区二区三区在线观看| 91黄色小视频| 亚洲欧美日韩在线| av在线不卡电影| 国产精品天美传媒沈樵| 国产原创一区二区| 欧美本精品男人aⅴ天堂| 日韩不卡在线观看日韩不卡视频| 日本电影欧美片| 自拍偷拍亚洲综合| aaa国产一区| 亚洲欧美怡红院| 成人国产免费视频| 国产精品麻豆网站| 丁香六月久久综合狠狠色| 久久精品亚洲精品国产欧美| 久久99热这里只有精品| 欧美电影免费观看高清完整版在| 日韩精品亚洲专区| 91精品国产麻豆| 全国精品久久少妇| 欧美白人最猛性xxxxx69交| 全部av―极品视觉盛宴亚洲| 日韩一级黄色大片| 极品少妇xxxx精品少妇| 日韩一区二区精品葵司在线| 捆绑调教美女网站视频一区| 日韩欧美自拍偷拍| 国产麻豆视频一区| 亚洲国产岛国毛片在线| 99久久婷婷国产精品综合| 亚洲视频图片小说| 欧美私模裸体表演在线观看| 午夜欧美2019年伦理| 欧美一区二区在线观看| 精品综合久久久久久8888| 久久久国产精华| 99久久久无码国产精品| 亚洲最大的成人av| 日韩视频免费观看高清完整版在线观看| 日韩精品一二三四| 国产丝袜欧美中文另类| av电影在线观看不卡| 亚洲午夜电影在线观看| 欧美成人激情免费网| 不卡视频一二三| 亚洲地区一二三色| 欧美精品一区二区高清在线观看| 国产91精品精华液一区二区三区| 综合久久给合久久狠狠狠97色| 欧美精品久久天天躁| 激情综合色综合久久综合| 国产精品青草综合久久久久99| 欧美性大战xxxxx久久久| 久久99国产精品麻豆| 中文字幕在线不卡国产视频| 欧美日韩免费一区二区三区 | 欧美在线短视频| 日韩精品一级二级| 国产精品欧美一区二区三区| 欧美日本在线看| 波多野结衣亚洲| 蜜桃精品视频在线观看| 亚洲日本成人在线观看| 久久夜色精品国产噜噜av| 在线观看三级视频欧美| 丰满少妇久久久久久久| 日韩和欧美一区二区三区| 1区2区3区国产精品| 精品国产91洋老外米糕| 欧美色视频在线| 成人一二三区视频| 精品无码三级在线观看视频| 亚洲一区二区成人在线观看| 国产精品三级在线观看| 欧美成人a视频| 欧美高清视频不卡网| 97精品久久久午夜一区二区三区| 国产一区在线不卡| 免费观看在线色综合| 亚洲成a天堂v人片| 亚洲女同一区二区| 中文字幕免费不卡在线| 久久青草国产手机看片福利盒子| 91精品国产欧美一区二区18| 欧美性感一区二区三区| 日本高清成人免费播放| 91麻豆成人久久精品二区三区| 国产成人高清在线| 顶级嫩模精品视频在线看| 国内成人免费视频| 精品无人码麻豆乱码1区2区 | 成人av手机在线观看| 激情偷乱视频一区二区三区| 奇米亚洲午夜久久精品| 日韩精品五月天| 丝袜美腿成人在线| 日韩国产一区二| 日本欧美加勒比视频| 免费欧美在线视频| 美女网站一区二区| 久久av老司机精品网站导航| 老鸭窝一区二区久久精品| 美女免费视频一区| 久久99精品国产.久久久久久| 麻豆一区二区三| 久久99久国产精品黄毛片色诱| 另类小说图片综合网| 国产一区二区在线影院| 国产mv日韩mv欧美| 91亚洲精品乱码久久久久久蜜桃| 色综合久久久久久久久| 在线一区二区观看| 666欧美在线视频| 日韩视频免费观看高清完整版| 亚洲精品在线观看网站| 国产亚洲一区二区三区在线观看| 亚洲国产精品成人综合色在线婷婷| 国产精品久久久久久久岛一牛影视| 亚洲欧洲制服丝袜| 日日夜夜精品视频天天综合网| 免费高清成人在线| 懂色av中文字幕一区二区三区| 91在线视频在线| 欧美日韩高清一区二区不卡| 日韩精品影音先锋| 国产精品美女久久久久久2018| 欧美激情一区二区三区全黄| 中文字幕亚洲一区二区va在线| 亚洲亚洲人成综合网络| 麻豆国产精品官网| a美女胸又www黄视频久久| 欧美日本视频在线| 国产亚洲人成网站| 亚洲一卡二卡三卡四卡| 国产一区视频网站| 欧美亚洲国产一卡| 欧美一区二区三区不卡| 国产精品久久久久aaaa樱花| 天使萌一区二区三区免费观看| 成人综合婷婷国产精品久久蜜臀| 在线观看不卡视频| 国产日韩欧美精品一区| 亚洲v日本v欧美v久久精品| 国产精品一区二区男女羞羞无遮挡 | av一二三不卡影片| 日韩一区二区在线观看| 国产精品第一页第二页第三页 | 亚洲人妖av一区二区| 日本不卡一区二区三区| 99re免费视频精品全部| 精品国产电影一区二区| 亚洲网友自拍偷拍| proumb性欧美在线观看| 日韩欧美一二三| 亚洲一区二区在线观看视频 | 六月丁香综合在线视频| 一本色道久久加勒比精品 | 国产乱码字幕精品高清av| 欧美视频一区二区三区在线观看| 国产亚洲欧洲一区高清在线观看| 午夜精品aaa| 在线观看一区二区精品视频| 中文字幕不卡三区| 国产福利视频一区二区三区| 884aa四虎影成人精品一区| 亚洲免费资源在线播放| 成人黄色大片在线观看| 亚洲精品一区二区三区香蕉| 日韩电影一区二区三区| 色噜噜狠狠色综合欧洲selulu| 欧美激情综合网| 国产麻豆精品视频| 久久综合视频网| 麻豆精品国产传媒mv男同| 欧美高清视频一二三区| 五月婷婷久久丁香| 欧美亚洲免费在线一区| 亚洲精品久久7777| 一本色道亚洲精品aⅴ| 亚洲欧美偷拍三级| 91麻豆成人久久精品二区三区| 亚洲天堂中文字幕| 一本在线高清不卡dvd| 一区二区激情小说| 欧美三级日韩在线|