📄 form3.frm
字号:
VERSION 5.00
Begin VB.Form Form3
Caption = "模型更新"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form3"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Txtpp
Height = 495
Left = 2280
TabIndex = 4
Top = 1080
Width = 1215
End
Begin VB.TextBox Txtae
Height = 495
Left = 2280
TabIndex = 2
Top = 360
Width = 1215
End
Begin VB.CommandButton mxgx
Caption = "开始模型更新判断"
Height = 495
Left = 1560
TabIndex = 0
Top = 2280
Width = 1695
End
Begin VB.Label Label2
Caption = "模型精度预定值"
Height = 375
Left = 360
TabIndex = 3
Top = 1200
Width = 1335
End
Begin VB.Label Label1
Caption = "模型允许误差"
Height = 495
Left = 360
TabIndex = 1
Top = 480
Width = 1455
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub mxgx_Click()
Dim x()
Dim Err()
Dim path1 As String
Dim num As Integer, nmax As Integer, gxpd
path1 = App.Path + "\mxgx.txt"
nmax = Form1.linescount(path1)
Open App.Path + "\mxgx.txt" For Input As #2 '求取待判断数据文本包含的样本个数
ReDim x(nmax, 2)
ReDim Err(nmax)
num = 0:
For i = 0 To nmax - 2
For j = 0 To 1
Input #2, x(i, j)
Next j
Next i
Close #2
For i = 0 To nmax - 1
Err(i) = Abs(x(i, 1) - x(i, 0))
If Err(i) > CSng(Txtae.Text) Then
num = num + 1
End If
Next i
gxpd = num / nmax
If (1 - gxpd) > CSng(Txtpp.Text) Then
MsgBox "模型精度仍然满足要求,不需要更新"
Else
MsgBox "模型精度低于预定精度,建议更新模型"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -