⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 levenbergmarquardtpanel.java

📁 利用Java实现的神经网络工具箱
💻 JAVA
字号:
/* * $RCSfile: LevenbergMarquardtPanel.java,v $ * $Revision: 1.3 $ * $Date: 2005/02/24 21:20:29 $ * * NeuralNetworkToolkit * Copyright (C) 2004 Universidade de Brasília * * This file is part of NeuralNetworkToolkit. * * NeuralNetworkToolkit 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. * * NeuralNetworkToolkit 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 NeuralNetworkToolkit; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 - USA. */package neuralnetworktoolkit.gui.options.method;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.util.ResourceBundle;import javax.swing.ButtonGroup;import javax.swing.JPanel;import javax.swing.JRadioButton;import javax.swing.border.TitledBorder;import neuralnetworktoolkit.methods.TrainingParameters;import neuralnetworktoolkit.methods.gradientbased.quasinewton.lm.LevenbergMarquardtModel;import neuralnetworktoolkit.methods.gradientbased.quasinewton.lm.LevenbergMarquardtParameters;/** *  *  * @version $Revision: 1.3 $ - $Date: 2005/02/24 21:20:29 $ *  * @author <a href="mailto:rodbra@pop.com.br">Rodrigo C. M. Coimbra</a> * @author <a href="mailto:hugoiver@yahoo.com.br">Hugo Iver V. Gonçalves</a> */public class LevenbergMarquardtPanel extends GaussNewtonPanel {		private JRadioButton lmIncompleteRadio;	private JRadioButton lmCompleteRadio;	private ButtonGroup lmKindGroup;	private JPanel lmKindPanel;		private ResourceBundle resource;		public LevenbergMarquardtPanel() {		super();				resource = ResourceBundle			.getBundle("neuralnetworktoolkit.gui.options.method.resources.LevenbergMarquardtPanelResource");				lmIncompleteRadio = new JRadioButton(resource.getString("incomplete"));		lmCompleteRadio = new JRadioButton(resource.getString("complete"));		lmKindGroup = new ButtonGroup();		lmKindGroup.add(lmIncompleteRadio);		lmKindGroup.add(lmCompleteRadio);				lmKindPanel = new JPanel();		lmKindPanel.setLayout(new GridBagLayout());		lmKindPanel.add(lmIncompleteRadio,				new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,						GridBagConstraints.CENTER,						GridBagConstraints.HORIZONTAL, borderInsets,						67, 0));		lmKindPanel.add(lmCompleteRadio,				new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0,						GridBagConstraints.CENTER,						GridBagConstraints.HORIZONTAL, borderInsets,						67, 0));		lmKindPanel.setBorder(new TitledBorder(resource.getString("lmKind")));				this.add(lmKindPanel,				new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0,						GridBagConstraints.CENTER,						GridBagConstraints.HORIZONTAL, borderInsets,						67, 0));			} //LevenbergMarquardtPanel()		/* 	 * @see neuralnetworktoolkit.gui.options.method.TrainingMethodPanel#initializeComponents(boolean)	 */	public void initializeComponents(boolean verify) {		LevenbergMarquardtParameters lmParameters;				super.initializeComponents(verify);		if(verify) {			lmParameters = (LevenbergMarquardtParameters) parameters;						switch (lmParameters.getLmKind()) {			case (LevenbergMarquardtModel.INCOMPLETE_LM): {				lmKindGroup.setSelected(lmIncompleteRadio.getModel(), true);											} break;			case (LevenbergMarquardtModel.COMPLETE_LM): {				lmKindGroup.setSelected(lmCompleteRadio.getModel(), true);											} break;			default: 				lmKindGroup.setSelected(lmIncompleteRadio.getModel(), true);											}					}			} //initializeComponents()		/**	 * @return Returns the parameters.	 */	public TrainingParameters getParameters() {		LevenbergMarquardtParameters lmParameters;				lmParameters = (LevenbergMarquardtParameters) super.getParameters();				if(lmIncompleteRadio.isSelected()) {			lmParameters.setLmKind(LevenbergMarquardtModel.INCOMPLETE_LM);					} else if(lmCompleteRadio.isSelected()) {			lmParameters.setLmKind(LevenbergMarquardtModel.COMPLETE_LM);					}		return lmParameters;					} //getParameters()} //LevenbergMarquardtPanel

⌨️ 快捷键说明

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