在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:floswald/SMM.jl开源软件地址:https://github.com/floswald/SMM.jl开源编程语言:Julia 84.2%开源软件介绍:SMM.jl: Simulated Method of Moments for Julia
Notice: this package was previously called MomentOpt.jl. This package provides a InstallationIn your julia REPL, type ] add SMM DocumentationExamplesPlease check out a fully worked example in Here is a working session comparing serial vs parallel performance on a test objective function. Notice that parallel performance hinges on the objective function being reasonably expensive to compute (at least 0.1 seconds per function evaluation) - otherwise the overhead from data transfer is just too high. julia> using SMM
[ Info: Precompiling SMM [bc769cb7-f249-5bba-802a-79f18cb247ec]
julia> x = SMM.serialNormal(2,200,slow = true)
[ Info: Starting estimation loop.
Progress: 100%|██████████████████████████████████████████████| Time: 0:01:05
┌ Warning: could not find 'filename' in algo.opts - not saving anything
└ @ SMM ~/.julia/dev/SMM/src/mopt/AlgoAbstract.jl:67
[ Info: Done with estimation after 1.1 minutes
summary(MA) = 3×5 DataFrame
Row │ id acc_rate perc_exchanged exchanged_most_with best_val
│ Int64 Float64 Float64 Int64 Float64
─────┼──────────────────────────────────────────────────────────────────
1 │ 1 0.0793651 5.5 2 0.0023224
2 │ 2 0.0819672 8.5 1 0.0126754
3 │ 3 0.115183 4.5 2 0.0145625
(
BGP Algorithm with 3 BGPChains
============================
Algorithm
---------
Current iteration: 200
Number of params to estimate: 2
Number of moments to match: 2
, Plot{Plots.GRBackend() n=2}, Plot{Plots.GRBackend() n=3})
julia> using Distributed
julia> addprocs(2, exeflags="--project=.") # you don't need the `exeflag` if you `add`ed the package regularly!
2-element Array{Int64,1}:
2
3
julia> @everywhere using SMM
julia> x = SMM.serialNormal(2,200,slow = true)
[ Info: Starting estimation loop.
Progress: 100%|█████████████████████████████████████████████| Time: 0:00:49
┌ Warning: could not find 'filename' in algo.opts - not saving anything
└ @ SMM ~/.julia/dev/SMM/src/mopt/AlgoAbstract.jl:67
[ Info: Done with estimation after 0.8 minutes
summary(MA) = 3×5 DataFrame
Row │ id acc_rate perc_exchanged exchanged_most_with best_val
│ Int64 Float64 Float64 Int64 Float64
─────┼───────────────────────────────────────────────────────────────────
1 │ 1 0.117347 2.0 2 0.00246371
2 │ 2 0.0899471 5.5 3 0.103399
3 │ 3 0.161458 4.0 2 0.139263
(
BGP Algorithm with 3 BGPChains
============================
Algorithm
---------
Current iteration: 200
Number of params to estimate: 2
Number of moments to match: 2
, Plot{Plots.GRBackend() n=2}, Plot{Plots.GRBackend() n=3}) ContributingWe encourage user contributions. Please submit a pull request for any improvements you would like to suggest, or a new algorithm you implemented. New algorithms:
HistoryThis package grew out of the R package Thanks to all Contributors! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论