Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fredrik Bagge Carlson
SystemIdentification
Commits
93216c2d
Commit
93216c2d
authored
Sep 06, 2015
by
Fredrik Bagge Carlson
Browse files
update ar arx and rename test-> runtests
parent
22c0921d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/armax.jl
View file @
93216c2d
"""`ar(y, na; λ = 0
, doplot=false
)`"""
"""`ar(y, na; λ = 0)`"""
function
ar
(
y
::
Vector
{
Float64
},
na
;
λ
=
0
)
y_train
,
A
=
getARregressor
(
y
,
na
)
n_points
=
size
(
A
,
1
)
...
...
@@ -13,10 +13,10 @@ function ar(y::Vector{Float64}, na; λ = 0)
result
=
FitResult
(
y_train
,
prediction
,
na
,
λ
>
0
?
(
:
LS_reg
)
:
(
:
LS
),
λ
)
return
model
,
result
end
ar
(
iddata
::
IdData
,
na
;
λ
=
0
,
doplot
=
false
)
=
ar
(
iddata
.
y
,
na
;
λ
=
0
)
ar
(
iddata
::
IdData
,
na
;
λ
=
0
)
=
ar
(
iddata
.
y
,
na
;
λ
=
0
)
"""arx(y, u, na, nb; λ = 0
, doplot=false
)"""
function
arx
(
y
::
Vector
{
Float64
},
u
::
VecOrMat
{
Float64
},
na
,
nb
;
λ
=
0
,
doplot
=
false
)
"""arx(y, u, na, nb; λ = 0)"""
function
arx
(
y
::
Vector
{
Float64
},
u
::
VecOrMat
{
Float64
},
na
,
nb
;
λ
=
0
)
y_train
,
A
=
getARXregressor
(
y
,
u
,
na
,
nb
)
n_points
=
size
(
A
,
1
)
if
λ
==
0
...
...
test/tests.jl
→
test/
run
tests.jl
View file @
93216c2d
...
...
@@ -88,3 +88,5 @@ function run_tests()
end
end
import
SystemIdentificationTests
SystemIdentificationTests
.
run_tests
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment