This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Chads-MacBook-Pro:02-spark chad$ scp -i "~/aws-metis.pem" -v Spark_Supervised_Machine_Learning.ipynb ubuntu@ec2-54-186-96-112.us-west-2.compute.amazonaws.com:~/notebooks | |
| Executing: program /usr/bin/ssh host ec2-54-186-96-112.us-west-2.compute.amazonaws.com, user ubuntu, command scp -v -t ~/notebooks | |
| OpenSSH_7.6p1, LibreSSL 2.6.2 | |
| debug1: Reading configuration data /Users/chad/.ssh/config | |
| debug1: Reading configuration data /etc/ssh/ssh_config | |
| debug1: /etc/ssh/ssh_config line 20: Applying options for * | |
| debug1: /etc/ssh/ssh_config line 51: Applying options for * | |
| debug1: Connecting to ec2-54-186-96-112.us-west-2.compute.amazonaws.com port 22. | |
| debug1: Connection established. | |
| debug1: key_load_public: No such file or directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export ProbVector | |
| using ArgCheck: @argcheck | |
| using Parameters | |
| import TransformVariables: RealVector,@calltrans, LogJacFlag, | |
| VectorTransform, dimension, inverse!, inverse_eltype | |
| using TransformVariables | |
| """ | |
| (y, r, ℓ) = SIGNATURES | |
| Given ``x ∈ ℝ`` and ``0 ≤ r ≤ 1``, return `(y, r′)` such that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Pkg | |
| Pkg.add.( | |
| ["Distributions" | |
| , "MonteCarloMeasurements" | |
| , "StatsFuns" | |
| , "LaTeXStrings" | |
| , "Plots"]) | |
| using Distributions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # obs is a zero-one vector of truth | |
| # prob is a vector resulting from "predict_proba" | |
| def makecost(obs,prob,falsepos_cost,falseneg_cost): | |
| def cost(cutoff): | |
| pred = np.array(prob > cutoff) | |
| fpos = pred * (1 - obs) | |
| fneg = (1 - pred) * obs | |
| return np.sum(fpos * falsepos_cost + fneg * falseneg_cost) | |
| return np.vectorize(cost) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Transducers | |
| T = Transducers | |
| using Transducers: R_,next,inner,start,complete,wrap,unwrap,wrapping | |
| struct MeanVar <: Transducer | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Transducers | |
| T = Transducers | |
| struct MeanVar <: Transducer | |
| end | |
| function T.start(rf::T.R_{MeanVar}, result) | |
| private_state = (0, 0.0, 0.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PyCall,SymPy | |
| using MLStyle | |
| stats = PyCall.pyimport_conda("sympy.stats", "sympy"); | |
| SymPy.import_from(stats) | |
| sym(x) = SymPy.symbols(x); | |
| macro ℓ(expr) | |
| args = @match expr begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JuliaActuary/MortalityTables.jl | |
| JuliaActuary/DynamicPolynomials.jl | |
| JuliaActuary/FixedPolynomials.jl | |
| JuliaActuary/MultivariateBases.jl | |
| JuliaActuary/MultivariateMoments.jl | |
| JuliaActuary/MultivariatePolynomials.jl | |
| JuliaActuary/SemialgebraicSets.jl | |
| JuliaActuary/StaticPolynomials.jl | |
| JuliaActuary/TypedPolynomials.jl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Soss | |
| using Distributions | |
| mstep = @model pars,state begin | |
| # Parameters | |
| α = pars.α # Daily transmission rate | |
| βγ = pars.βγ # Daily recovery rate, case fatality rate | |
| # Starting counts | |
| s0 = state.s # Susceptible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is machine-generated - editing it directly is not advised | |
| [[AbstractAlgebra]] | |
| deps = ["InteractiveUtils", "LinearAlgebra", "Markdown", "Random", "RandomExtensions", "SparseArrays", "Test"] | |
| git-tree-sha1 = "7df2949bfd757e426897a4b579fbd5dc776ff8c9" | |
| uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" | |
| version = "0.12.0" | |
| [[AbstractLattices]] | |
| git-tree-sha1 = "f35684b7349da49fcc8a9e520e30e45dbb077166" |