Skip to content

Commit

Permalink
Merge pull request #23 from dysonance/performance
Browse files Browse the repository at this point in the history
Performance
  • Loading branch information
dysonance committed Jan 22, 2020
2 parents bd31fba + 232e167 commit a449c1d
Show file tree
Hide file tree
Showing 15 changed files with 788 additions and 749 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ matrix:
notifications:
email: false
after_success:
- julia -e 'using Pkg; cd(joinpath(dirname(pathof(Indicators)), "..")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
- julia -e 'using Pkg; cd(joinpath(dirname(pathof(Indicators)), "..")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
- julia -e 'using Pkg, Indicators; cd(joinpath(dirname(pathof(Indicators)), "..")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
- julia -e 'using Pkg, Indicators; cd(joinpath(dirname(pathof(Indicators)), "..")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
jobs:
include:
- stage: "Documentation"
Expand Down
33 changes: 24 additions & 9 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinaryProvider]]
deps = ["Libdl", "SHA"]
git-tree-sha1 = "29995a7b317bbd06be147e1974a3541ce2502dca"
git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.7"
version = "0.5.8"

[[Dates]]
deps = ["Printf"]
Expand All @@ -19,9 +19,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"]
git-tree-sha1 = "f1e1b417a34cf73a70cbed919915bf8f8bad1806"
git-tree-sha1 = "5c49dab19938b119fe204fd7d7e8e174f4e9c68b"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.8.6"
version = "0.8.8"

[[IniFile]]
deps = ["Test"]
Expand All @@ -39,6 +39,9 @@ git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.0"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

Expand All @@ -64,14 +67,22 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "ef0af6c8601db18c282d092ccbd2f01f3f0cd70b"
git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.7"
version = "0.3.10"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down Expand Up @@ -99,14 +110,18 @@ deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[Temporal]]
deps = ["Dates", "HTTP", "JSON", "Printf", "Random", "RecipesBase", "Statistics", "Test"]
git-tree-sha1 = "ab2b14f510cd2a068974c9dc654ad8e743582dc1"
deps = ["Dates", "HTTP", "JSON", "Pkg", "Printf", "Random", "RecipesBase", "Statistics", "Test"]
git-tree-sha1 = "31560aae24d7fa64dd75aaa4a74a81ac7cd28576"
uuid = "a110ec8f-48c8-5d59-8f7e-f91bc4cc0c3d"
version = "0.6.1"
version = "0.7.0"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
2 changes: 1 addition & 1 deletion src/reg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Moving linear regression R-squared or adjusted R-squared
"""
function mlr_rsq(y::Array{T}; n::Int64=10, adjusted::Bool=false)::Array{T} where {T<:Real}
yhat = mlr(y, n=n)
rsq = runcor(y, yhat, n=n, cumulative=false) .^ 2
rsq = runcor(y, yhat, n=n, cumulative=false) .^ 2.0
if adjusted
return rsq .- (1.0.-rsq)*(1.0/(float(n).-2.0))
else
Expand Down
Loading

0 comments on commit a449c1d

Please sign in to comment.