You've already forked lazarus-ccr
LazStats: Massive refactoring of AutoCorUnit regarding usability.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7930 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,8 @@ uses
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, tachartlazaruspkg, tachartprint, lhelpcontrolpkg, Globals, LicenseUnit,
|
||||
OptionsUnit, MainDM, MainUnit, GridProcs, MatrixUnit, RegressionUnit;
|
||||
OptionsUnit, MainDM, MainUnit, GridProcs, MatrixUnit, RegressionUnit,
|
||||
SmoothingUnit;
|
||||
|
||||
{$R LazStats.res}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
inherited AutoCorrForm: TAutoCorrForm
|
||||
Left = 767
|
||||
Left = 446
|
||||
Height = 512
|
||||
Top = 157
|
||||
Top = 176
|
||||
Width = 991
|
||||
HelpType = htKeyword
|
||||
HelpKeyword = 'html/Autocorrelation.htm'
|
||||
@ -10,34 +10,34 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
ClientWidth = 991
|
||||
inherited ParamsPanel: TPanel
|
||||
Height = 496
|
||||
Width = 448
|
||||
Width = 400
|
||||
ClientHeight = 496
|
||||
ClientWidth = 448
|
||||
ClientWidth = 400
|
||||
TabOrder = 1
|
||||
inherited CloseBtn: TButton
|
||||
Left = 393
|
||||
Left = 345
|
||||
Top = 471
|
||||
TabOrder = 14
|
||||
end
|
||||
inherited ComputeBtn: TButton
|
||||
Left = 309
|
||||
Left = 261
|
||||
Top = 471
|
||||
TabOrder = 13
|
||||
end
|
||||
inherited ResetBtn: TButton
|
||||
Left = 247
|
||||
Left = 199
|
||||
Top = 471
|
||||
TabOrder = 12
|
||||
end
|
||||
inherited HelpBtn: TButton
|
||||
Tag = 104
|
||||
Left = 188
|
||||
Left = 140
|
||||
Top = 471
|
||||
TabOrder = 11
|
||||
end
|
||||
inherited ButtonBevel: TBevel
|
||||
Top = 455
|
||||
Width = 448
|
||||
Width = 400
|
||||
end
|
||||
object GroupBox1: TGroupBox[5]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
@ -90,20 +90,19 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
Left = 142
|
||||
Height = 68
|
||||
Top = 0
|
||||
Width = 306
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Width = 252
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 16
|
||||
Caption = 'Include Cases:'
|
||||
ClientHeight = 48
|
||||
ClientWidth = 302
|
||||
ClientWidth = 248
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = FromCaseEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = OnlyCasesBtn
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 189
|
||||
Left = 178
|
||||
Height = 15
|
||||
Top = 23
|
||||
Width = 12
|
||||
@ -144,7 +143,7 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
Left = 128
|
||||
Height = 23
|
||||
Top = 19
|
||||
Width = 57
|
||||
Width = 46
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 4
|
||||
TabOrder = 2
|
||||
@ -155,10 +154,10 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = OnlyCasesBtn
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 205
|
||||
Left = 194
|
||||
Height = 23
|
||||
Top = 19
|
||||
Width = 58
|
||||
Width = 46
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 8
|
||||
@ -185,9 +184,9 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideRight.Control = InBtn
|
||||
AnchorSideBottom.Control = GroupBox4
|
||||
Left = 0
|
||||
Height = 169
|
||||
Height = 262
|
||||
Top = 97
|
||||
Width = 205
|
||||
Width = 155
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Right = 6
|
||||
@ -198,13 +197,15 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
TabOrder = 2
|
||||
end
|
||||
object InBtn: TBitBtn[9]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = VarList
|
||||
Left = 211
|
||||
AnchorSideRight.Control = DepVarEdit
|
||||
Left = 161
|
||||
Height = 26
|
||||
Top = 97
|
||||
Width = 26
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 6
|
||||
Images = MainDataModule.ImageList
|
||||
ImageIndex = 1
|
||||
OnClick = InBtnClick
|
||||
@ -212,15 +213,17 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
TabOrder = 3
|
||||
end
|
||||
object OutBtn: TBitBtn[10]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = InBtn
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 211
|
||||
AnchorSideRight.Control = DepVarEdit
|
||||
Left = 161
|
||||
Height = 26
|
||||
Top = 127
|
||||
Width = 26
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 6
|
||||
Images = MainDataModule.ImageList
|
||||
ImageIndex = 0
|
||||
OnClick = OutBtnClick
|
||||
@ -230,7 +233,7 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
object Label4: TLabel[11]
|
||||
AnchorSideLeft.Control = DepVarEdit
|
||||
AnchorSideBottom.Control = DepVarEdit
|
||||
Left = 243
|
||||
Left = 193
|
||||
Height = 15
|
||||
Top = 101
|
||||
Width = 88
|
||||
@ -240,18 +243,16 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
ParentColor = False
|
||||
end
|
||||
object DepVarEdit: TEdit[12]
|
||||
AnchorSideLeft.Control = InBtn
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideLeft.Control = GroupBox5
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = OutBtn
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 243
|
||||
Left = 193
|
||||
Height = 23
|
||||
Top = 118
|
||||
Width = 205
|
||||
Width = 207
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Bottom = 12
|
||||
ReadOnly = True
|
||||
TabOrder = 5
|
||||
@ -261,7 +262,7 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideTop.Control = AlphaEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = AlphaEdit
|
||||
Left = 312
|
||||
Left = 264
|
||||
Height = 15
|
||||
Top = 161
|
||||
Width = 67
|
||||
@ -274,7 +275,7 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideTop.Control = MaxLagEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = MaxLagEdit
|
||||
Left = 296
|
||||
Left = 248
|
||||
Height = 15
|
||||
Top = 188
|
||||
Width = 83
|
||||
@ -288,7 +289,7 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 387
|
||||
Left = 339
|
||||
Height = 23
|
||||
Top = 157
|
||||
Width = 61
|
||||
@ -303,7 +304,7 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 387
|
||||
Left = 339
|
||||
Height = 23
|
||||
Top = 184
|
||||
Width = 61
|
||||
@ -319,23 +320,23 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 221
|
||||
Left = 193
|
||||
Height = 51
|
||||
Top = 223
|
||||
Width = 227
|
||||
Width = 207
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 16
|
||||
Caption = 'Projection Option'
|
||||
ClientHeight = 31
|
||||
ClientWidth = 223
|
||||
ClientWidth = 203
|
||||
TabOrder = 8
|
||||
object Label2: TLabel
|
||||
AnchorSideLeft.Control = ProjPtsEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ProjPtsEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 135
|
||||
Left = 131
|
||||
Height = 15
|
||||
Top = 6
|
||||
Width = 33
|
||||
@ -361,12 +362,12 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideLeft.Control = ProjectChk
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = GroupBox3
|
||||
Left = 85
|
||||
Left = 81
|
||||
Height = 23
|
||||
Top = 2
|
||||
Width = 42
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Left = 12
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Bottom = 6
|
||||
TabOrder = 1
|
||||
@ -378,75 +379,38 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonBevel
|
||||
Left = 0
|
||||
Height = 177
|
||||
Top = 278
|
||||
Width = 205
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
Height = 84
|
||||
Top = 371
|
||||
Width = 177
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
Caption = 'Data Smoothing:'
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.VerticalSpacing = 2
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ClientHeight = 157
|
||||
ClientWidth = 201
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 64
|
||||
ClientWidth = 173
|
||||
TabOrder = 9
|
||||
object MeanChk: TCheckBox
|
||||
object SmoothingParamsBtn: TButton
|
||||
Left = 12
|
||||
Height = 19
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 185
|
||||
Caption = 'Center on Mean'
|
||||
TabOrder = 0
|
||||
end
|
||||
object DifferenceChk: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 27
|
||||
Width = 185
|
||||
Caption = 'Difference Smoothing'
|
||||
Width = 149
|
||||
AutoSize = True
|
||||
Caption = 'Parameters...'
|
||||
OnClick = SmoothingParamsBtnClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object MoveAvgChk: TCheckBox
|
||||
object AutoRegSmoothChk: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 48
|
||||
Width = 185
|
||||
Caption = 'Moving Average Smooth'
|
||||
TabOrder = 2
|
||||
end
|
||||
object ExpSmoothChk: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 69
|
||||
Width = 185
|
||||
Caption = 'Exponentially Smooth'
|
||||
TabOrder = 3
|
||||
end
|
||||
object FourierSmoothChk: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 90
|
||||
Width = 185
|
||||
Caption = 'Fourier Filter Smooth'
|
||||
TabOrder = 4
|
||||
end
|
||||
object PolyChk: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 111
|
||||
Width = 185
|
||||
Caption = 'Polynomial Regression Smooth'
|
||||
TabOrder = 5
|
||||
end
|
||||
object MRegSmoothChk: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 132
|
||||
Width = 185
|
||||
Caption = 'Multiple Regression Smooth'
|
||||
OnChange = MRegSmoothChkChange
|
||||
TabOrder = 6
|
||||
Top = 39
|
||||
Width = 149
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Auto-regression smooth'
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object GroupBox5: TGroupBox[19]
|
||||
@ -457,19 +421,21 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = GroupBox4
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 221
|
||||
Height = 177
|
||||
Top = 278
|
||||
Width = 227
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Left = 193
|
||||
Height = 135
|
||||
Top = 320
|
||||
Width = 207
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Top = 16
|
||||
Caption = 'Analysis / Output Options'
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.VerticalSpacing = 2
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ClientHeight = 157
|
||||
ClientWidth = 223
|
||||
ClientHeight = 115
|
||||
ClientWidth = 203
|
||||
TabOrder = 10
|
||||
object PlotChk: TCheckBox
|
||||
Left = 12
|
||||
@ -477,6 +443,8 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
Top = 6
|
||||
Width = 148
|
||||
Caption = 'Plot correlogram'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object StatsChk: TCheckBox
|
||||
@ -511,28 +479,19 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
Caption = 'Yule-Walker coefficients'
|
||||
TabOrder = 4
|
||||
end
|
||||
object ResidChk: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 111
|
||||
Width = 148
|
||||
Caption = 'Residual plot'
|
||||
Enabled = False
|
||||
TabOrder = 5
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited ParamsSplitter: TSplitter
|
||||
Left = 460
|
||||
Left = 412
|
||||
Height = 512
|
||||
end
|
||||
inherited PageControl: TPageControl
|
||||
Left = 469
|
||||
Left = 421
|
||||
Height = 496
|
||||
Width = 514
|
||||
ActivePage = YuleWalkerPage
|
||||
Width = 562
|
||||
ActivePage = AutoRegPage
|
||||
MultiLine = True
|
||||
TabIndex = 4
|
||||
TabIndex = 5
|
||||
TabOrder = 3
|
||||
Options = [nboMultiLine]
|
||||
inherited ChartPage: TTabSheet
|
||||
@ -540,7 +499,7 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
TabVisible = False
|
||||
end
|
||||
object CorrelationMatrixPage: TTabSheet[2]
|
||||
Caption = 'Correlation matrix'
|
||||
Caption = 'Correlation Matrix'
|
||||
TabVisible = False
|
||||
end
|
||||
object PartialsPage: TTabSheet[3]
|
||||
@ -551,6 +510,10 @@ inherited AutoCorrForm: TAutoCorrForm
|
||||
Caption = 'Yule-Walker'
|
||||
TabVisible = False
|
||||
end
|
||||
object AutoRegPage: TTabSheet[5]
|
||||
Caption = 'Auto-Regr. Smooth'
|
||||
TabVisible = False
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel[3]
|
||||
AnchorSideRight.Control = Owner
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@ unit ExpSmoothUnit;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ExtCtrls;
|
||||
|
||||
type
|
||||
@ -36,8 +36,11 @@ type
|
||||
var
|
||||
ExpSmoothFrm: TExpSmoothFrm;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Math;
|
||||
|
||||
@ -80,8 +83,5 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
{$I expsmoothunit.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -0,0 +1,491 @@
|
||||
inherited SmoothingForm: TSmoothingForm
|
||||
Left = 603
|
||||
Height = 463
|
||||
Top = 292
|
||||
Width = 823
|
||||
Caption = 'SmoothingForm'
|
||||
ClientHeight = 463
|
||||
ClientWidth = 823
|
||||
inherited ParamsPanel: TPanel
|
||||
Height = 447
|
||||
Width = 296
|
||||
ClientHeight = 447
|
||||
ClientWidth = 296
|
||||
object OKBtn: TButton[0]
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ParamsPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 254
|
||||
Height = 25
|
||||
Top = 422
|
||||
Width = 42
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'OK'
|
||||
ModalResult = 1
|
||||
TabOrder = 9
|
||||
end
|
||||
inherited CloseBtn: TButton[1]
|
||||
AnchorSideRight.Control = HelpBtn
|
||||
AnchorSideRight.Side = asrTop
|
||||
Left = -88
|
||||
Top = 422
|
||||
ModalResult = 11
|
||||
Visible = False
|
||||
end
|
||||
inherited ComputeBtn: TButton[2]
|
||||
AnchorSideRight.Control = OKBtn
|
||||
Left = 88
|
||||
Top = 422
|
||||
Anchors = [akTop]
|
||||
Visible = False
|
||||
end
|
||||
inherited ResetBtn: TButton[3]
|
||||
Left = 26
|
||||
Top = 422
|
||||
Visible = False
|
||||
end
|
||||
inherited HelpBtn: TButton[4]
|
||||
Left = -33
|
||||
Top = 422
|
||||
Visible = False
|
||||
end
|
||||
inherited ButtonBevel: TBevel[5]
|
||||
AnchorSideBottom.Control = OKBtn
|
||||
Top = 406
|
||||
Width = 296
|
||||
end
|
||||
object DataSmoothingChkLB: TCheckListBox[6]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideTop.Control = Label2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Splitter1
|
||||
Left = 0
|
||||
Height = 129
|
||||
Top = 64
|
||||
Width = 296
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Bottom = 8
|
||||
Items.Strings = (
|
||||
'Difference Smoothing'
|
||||
'Moving Average Smoothing'
|
||||
'Exponential Smoothing'
|
||||
'Fourier Filter Smoothing'
|
||||
'Polynomial Regression Smooth'
|
||||
'Multiple Regression Smoothing'
|
||||
)
|
||||
ItemHeight = 17
|
||||
OnSelectionChange = DataSmoothingChkLBSelectionChange
|
||||
TabOrder = 4
|
||||
Data = {
|
||||
06000000000000000000
|
||||
}
|
||||
end
|
||||
object Label2: TLabel[7]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideTop.Control = Bevel1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 47
|
||||
Width = 136
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Data Smoothing Methods'
|
||||
ParentColor = False
|
||||
end
|
||||
object MeanChk: TCheckBox[8]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideTop.Control = ParamsPanel
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 105
|
||||
BorderSpacing.Bottom = 8
|
||||
Caption = 'Center on Mean'
|
||||
OnChange = MeanChkChange
|
||||
TabOrder = 5
|
||||
end
|
||||
object ResidChk: TCheckBox[9]
|
||||
AnchorSideLeft.Control = MeanChk
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ParamsPanel
|
||||
Left = 121
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 88
|
||||
BorderSpacing.Left = 16
|
||||
Caption = 'Residual plot'
|
||||
OnChange = ResidChkChange
|
||||
TabOrder = 6
|
||||
end
|
||||
object Bevel1: TBevel[10]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideTop.Control = MeanChk
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 8
|
||||
Top = 27
|
||||
Width = 296
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Shape = bsBottomLine
|
||||
end
|
||||
object NotebookGroup: TGroupBox[11]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideTop.Control = Splitter1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonBevel
|
||||
Left = 0
|
||||
Height = 188
|
||||
Top = 218
|
||||
Width = 296
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'NotebookGroup'
|
||||
ClientHeight = 168
|
||||
ClientWidth = 292
|
||||
TabOrder = 7
|
||||
object Notebook: TNotebook
|
||||
AnchorSideLeft.Control = NotebookGroup
|
||||
AnchorSideTop.Control = NotebookGroup
|
||||
AnchorSideRight.Control = NotebookGroup
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = NotebookGroup
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 156
|
||||
Top = 4
|
||||
Width = 268
|
||||
PageIndex = 0
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 12
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 12
|
||||
BorderSpacing.Bottom = 8
|
||||
TabOrder = 0
|
||||
object DifferencePage: TPage
|
||||
object Label8: TLabel
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 13
|
||||
Height = 15
|
||||
Top = 4
|
||||
Width = 108
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Difference for lag of:'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
AnchorSideLeft.Control = DifferencePage
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 31
|
||||
Width = 121
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'No. of times to repeat: '
|
||||
ParentColor = False
|
||||
end
|
||||
object LagEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = Label8
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DifferencePage
|
||||
Left = 129
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 66
|
||||
Alignment = taRightJustify
|
||||
MaxValue = 65535
|
||||
OnChange = LagEditChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object DiffOrderEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = Label9
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
Left = 129
|
||||
Height = 23
|
||||
Top = 28
|
||||
Width = 66
|
||||
Alignment = taRightJustify
|
||||
MaxValue = 65535
|
||||
MinValue = 1
|
||||
OnChange = DiffOrderEditChange
|
||||
TabOrder = 1
|
||||
Value = 1
|
||||
end
|
||||
end
|
||||
object MovingAvgPage: TPage
|
||||
object Label3: TLabel
|
||||
AnchorSideLeft.Control = MovingAvgPage
|
||||
AnchorSideTop.Control = WeightOrder
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 4
|
||||
Width = 36
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Order: '
|
||||
ParentColor = False
|
||||
end
|
||||
object WeightsGrid: TStringGrid
|
||||
AnchorSideLeft.Control = MovingAvgPage
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = MovingAvgPage
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = MovingAvgPage
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 124
|
||||
Top = 32
|
||||
Width = 260
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoAdvance = aaDown
|
||||
AutoFillColumns = True
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
ColCount = 3
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goDrawFocusSelected, goEditing, goThumbTracking, goSmoothScroll, goFixedColSizing]
|
||||
RowCount = 2
|
||||
TabOrder = 0
|
||||
OnEditingDone = WeightsGridEditingDone
|
||||
OnPrepareCanvas = WeightsGridPrepareCanvas
|
||||
OnSelectEditor = WeightsGridSelectEditor
|
||||
ColWidths = (
|
||||
78
|
||||
91
|
||||
91
|
||||
)
|
||||
Cells = (
|
||||
3
|
||||
0
|
||||
0
|
||||
'Weight #'
|
||||
1
|
||||
0
|
||||
'Weight Value'
|
||||
2
|
||||
0
|
||||
'Normalized'
|
||||
)
|
||||
end
|
||||
object WeightOrder: TSpinEdit
|
||||
AnchorSideLeft.Control = Label3
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = MovingAvgPage
|
||||
Left = 44
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 68
|
||||
Alignment = taRightJustify
|
||||
OnChange = WeightOrderChange
|
||||
OnEditingDone = WeightOrderEditingDone
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object ExpPage: TPage
|
||||
object Label5: TLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = AlphaEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = AlphaEdit
|
||||
Left = 56
|
||||
Height = 15
|
||||
Top = 12
|
||||
Width = 31
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Alpha'
|
||||
ParentColor = False
|
||||
end
|
||||
object AlphaScroll: TScrollBar
|
||||
AnchorSideLeft.Control = ExpPage
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ExpPage
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 23
|
||||
Top = 39
|
||||
Width = 236
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Top = 12
|
||||
BorderSpacing.Right = 16
|
||||
PageSize = 0
|
||||
Position = 99
|
||||
TabOrder = 0
|
||||
OnChange = AlphaScrollChange
|
||||
end
|
||||
object Label6: TLabel
|
||||
AnchorSideLeft.Control = AlphaScroll
|
||||
AnchorSideTop.Control = AlphaScroll
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 24
|
||||
Height = 15
|
||||
Top = 66
|
||||
Width = 15
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 4
|
||||
Caption = '0.0'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
AnchorSideTop.Control = AlphaScroll
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = AlphaScroll
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 229
|
||||
Height = 15
|
||||
Top = 66
|
||||
Width = 15
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 8
|
||||
Caption = '1.0'
|
||||
ParentColor = False
|
||||
end
|
||||
object AlphaEdit: TFloatSpinEdit
|
||||
AnchorSideLeft.Control = ExpPage
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
Left = 95
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 78
|
||||
Alignment = taRightJustify
|
||||
Increment = 0.01
|
||||
MaxValue = 1
|
||||
OnChange = AlphaEditChange
|
||||
TabOrder = 1
|
||||
Value = 0.01
|
||||
end
|
||||
end
|
||||
object FourierPage: TPage
|
||||
object Label4: TLabel
|
||||
AnchorSideLeft.Control = FourierPage
|
||||
AnchorSideTop.Control = StrengthEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 76
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Filter strength:'
|
||||
ParentColor = False
|
||||
end
|
||||
object StrengthEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = Label4
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = FourierPage
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 84
|
||||
Height = 23
|
||||
Top = 12
|
||||
Width = 68
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 12
|
||||
OnChange = StrengthEditChange
|
||||
OnEditingDone = StrengthEditEditingDone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object PolyPage: TPage
|
||||
AnchorSideTop.Side = asrBottom
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = PolyPage
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 4
|
||||
Width = 97
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Polynomial order :'
|
||||
ParentColor = False
|
||||
end
|
||||
object PolyOrderEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
Left = 105
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 50
|
||||
Alignment = taRightJustify
|
||||
MinValue = 1
|
||||
OnChange = PolyOrderEditChange
|
||||
TabOrder = 0
|
||||
Value = 1
|
||||
end
|
||||
end
|
||||
object MRegPage: TPage
|
||||
end
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter[12]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 201
|
||||
Width = 296
|
||||
Align = alNone
|
||||
ResizeAnchor = akBottom
|
||||
end
|
||||
object CancelBtn: TButton[13]
|
||||
AnchorSideTop.Control = OKBtn
|
||||
AnchorSideRight.Control = OKBtn
|
||||
Left = 184
|
||||
Height = 25
|
||||
Top = 422
|
||||
Width = 62
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 10
|
||||
end
|
||||
end
|
||||
inherited ParamsSplitter: TSplitter
|
||||
Left = 308
|
||||
Height = 463
|
||||
end
|
||||
object ButtonBevel2: TBevel[2]
|
||||
AnchorSideLeft.Control = ParamsPanel
|
||||
AnchorSideRight.Control = ParamsPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = CloseBtn
|
||||
Left = 8
|
||||
Height = 8
|
||||
Top = 406
|
||||
Width = 296
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
Shape = bsBottomLine
|
||||
end
|
||||
object OriginalDataChartSource: TUserDefinedChartSource[3]
|
||||
OnGetChartDataItem = OriginalDataChartSourceGetChartDataItem
|
||||
Left = 429
|
||||
Top = 68
|
||||
end
|
||||
object SmoothedDataChartSource: TUserDefinedChartSource[4]
|
||||
OnGetChartDataItem = SmoothedDataChartSourceGetChartDataItem
|
||||
Left = 430
|
||||
Top = 122
|
||||
end
|
||||
object ResidualsChartSource: TUserDefinedChartSource[5]
|
||||
OnGetChartDataItem = ResidualsChartSourceGetChartDataItem
|
||||
Left = 433
|
||||
Top = 182
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
@ -400,8 +400,10 @@ end;
|
||||
{ Cumulative probability of the F distribution for given F value and with
|
||||
DF1 and DF2 degrees of freedom }
|
||||
function ProbF(F, DF1, DF2: Double): Double;
|
||||
{
|
||||
var
|
||||
b1, b2: Double;
|
||||
}
|
||||
begin
|
||||
if f <= 0.0 then
|
||||
Result := 1.0
|
||||
|
@ -11,15 +11,15 @@ uses
|
||||
Globals;
|
||||
|
||||
type
|
||||
TDblVector = DblDyneVec;
|
||||
TDblMatrix = DblDyneMat;
|
||||
TDblCube = DblDyneCube;
|
||||
TDblQuad = DblDyneQuad;
|
||||
TDblVector = DblDyneVec; // array of double
|
||||
TDblMatrix = DblDyneMat; // array of array of double
|
||||
TDblCube = DblDyneCube; // array of array of array of double
|
||||
TDblQuad = DblDyneQuad; // array of array of array of array of double
|
||||
|
||||
TIntVector = IntDyneVec;
|
||||
TIntMatrix = IntDyneMat;
|
||||
TIntCube = IntDyneCube;
|
||||
TIntQuad = IntDyneQuad;
|
||||
TIntVector = IntDyneVec; // array of integer
|
||||
TIntMatrix = IntDyneMat; // array of array of integer
|
||||
TIntCube = IntDyneCube; // array of array of array of integer
|
||||
TIntQuad = IntDyneQuad; // array of array of array of array of integer
|
||||
|
||||
EMatrix = class(Exception);
|
||||
|
||||
@ -136,6 +136,8 @@ implementation
|
||||
uses
|
||||
Math;
|
||||
|
||||
const
|
||||
TWO_PI = 2.0 * pi; // redeclaration to avoid dependence on MathUnit
|
||||
|
||||
operator + (A, B: TDblVector): TDblVector;
|
||||
var
|
||||
|
@ -178,14 +178,14 @@ begin
|
||||
|
||||
// Product of transposed augmented with augmented matrix
|
||||
XT_X := XT * X;
|
||||
AResults.XT_X := Matcopy(XT_X);
|
||||
AResults.XT_X := MatCopy(XT_X);
|
||||
|
||||
// Product of inverse of XT_X with XT_Y yields the coefficients. Intercept is last.
|
||||
inv_XT_X := MatInverse(XT_X);
|
||||
AResults.Coeffs := inv_XT_X * XT_Y;
|
||||
|
||||
// THe XT_X matrix contains the sum of squares (diagonal elements), sum of
|
||||
// cross-products (off-diagonal elements and the sum the variable values
|
||||
// cross-products (off-diagonal elements and the sum of the variable values
|
||||
// (augmented column).
|
||||
SetLength(AResults.Means, mx+1);
|
||||
SetLength(AResults.Variances, mx+1);
|
||||
@ -206,7 +206,10 @@ begin
|
||||
for j := 0 to mx-1 do
|
||||
begin
|
||||
VarCovar[i, j] := (XT_X[i, j] - XT_X[i, mx] * XT_X[j, mx] / nx) / (nx - 1);
|
||||
Correlations[i, j] := VarCovar[i, j] / (StdDevs[i] * StdDevs[j]);
|
||||
if StdDevs[i] <> 0 then
|
||||
Correlations[i, j] := VarCovar[i, j] / (StdDevs[i] * StdDevs[j])
|
||||
else
|
||||
Correlations[i, j] := 0.0;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user