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

📄 learnoptionsdlg.cpp

📁 函数逼近
💻 CPP
字号:
/*
 * 
 *	 Copyright 2004-2006 Ghassan OREIBY
 *   
 * 	 This file is part of Neurality.
 *
 *   Neurality 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.
 *
 *   Neurality 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 Neurality; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * 
 */

// LearnOptionsDlg.cpp : implementation file
//

#include "stdafx.h"
#include "GUI.h"
#include "LearnOptionsDlg.h"


// CLearnOptionsDlg dialog

IMPLEMENT_DYNAMIC(CLearnOptionsDlg, CDialog)
CLearnOptionsDlg::CLearnOptionsDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CLearnOptionsDlg::IDD, pParent)
	, fEta(.9f)
	, fAlpha(.75f)
	, fBeta(.2f)
	, fKappa(.01f)
	, fXi(.7f)
	, nSaveItr(5000)
	, nShowItr(1)
	, bShowCurve(TRUE)
	, m_fMSE(0.0005f)
{
	CNode::GetLearnParam(fEta, fAlpha, fBeta, fKappa, fXi);
}

CLearnOptionsDlg::~CLearnOptionsDlg()
{
}

void CLearnOptionsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT2, fEta);
	DDX_Text(pDX, IDC_EDIT1, fAlpha);
	DDX_Text(pDX, IDC_EDIT9, fBeta);
	DDX_Text(pDX, IDC_EDIT4, fKappa);
	DDX_Text(pDX, IDC_EDIT10, fXi);
	DDX_Text(pDX, IDC_EDIT5, nSaveItr);
	DDX_Text(pDX, IDC_EDIT6, nShowItr);
	DDX_Check(pDX, IDC_CHECK1, bShowCurve);
	DDX_Text(pDX, IDC_EDIT7, m_fMSE);
}


BEGIN_MESSAGE_MAP(CLearnOptionsDlg, CDialog)
	ON_BN_CLICKED(IDRESET, OnBnClickedReset)
//	ON_EN_CHANGE(IDC_EDIT7, OnEnChangeEdit7)
END_MESSAGE_MAP()


// CLearnOptionsDlg message handlers

void CLearnOptionsDlg::OnBnClickedReset()
{
	fEta	= .9f;
	fAlpha	= .75f;
	fBeta	= .2f;
	fKappa	= .01f;
	fXi		= .7f;
	m_fMSE	= 0.0005f;
	nSaveItr	= 5000;
	nShowItr	= 1;
	bShowCurve	= TRUE;
	UpdateData(FALSE);
}

// Adjusts the learning options of the Network
void CLearnOptionsDlg::AdjustNetworkLearning(void)
{
	CNetwork::AdjustLearning(fEta, fAlpha, fBeta, fKappa, fXi);
}

int CLearnOptionsDlg::GetItrSave(void) const
{
	return nSaveItr;
}

int CLearnOptionsDlg::GetItrShow(void) const
{
	return nShowItr;
}

BOOL CLearnOptionsDlg::GetShowCurveState(void) const
{
	return bShowCurve;
}

float CLearnOptionsDlg::GetMSE(void) const
{
	return m_fMSE;
}

⌨️ 快捷键说明

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