Base Models
Extreme learning machines and L2 regularized extreme learning machines for CausalELM estimators
CausalELM.Models
— ModuleBase models to perform extreme learning with and without L2 penalization.
For details on Extreme learning machines see; Huang, Guang-Bin, Qin-Yu Zhu, and Chee-Kheong Siew. "Extreme learning machine: theory and applications." Neurocomputing 70, no. 1-3 (2006): 489-501.
For details on Extreme learning machines with an L2 penalty see: Li, Guoqiang, and Peifeng Niu. "An enhanced extreme learning machine based on ridge regression for regression." Neural Computing and Applications 22, no. 3 (2013): 803-810.
CausalELM.Models.ExtremeLearningMachine
— TypeAbstract type that includes vanilla and L2 regularized Extreme Learning Machines
CausalELM.Models.ExtremeLearner
— TypeStruct to hold data for an Extreme Learning machine
CausalELM.Models.RegularizedExtremeLearner
— TypeStruct to hold data for a regularized Extreme Learning Machine
CausalELM.Models.fit!
— Functionfit!(model)
Make predictions with an ExtremeLearner.
For more details see: Huang, Guang-Bin, Qin-Yu Zhu, and Chee-Kheong Siew. "Extreme learning machine: theory and applications." Neurocomputing 70, no. 1-3 (2006): 489-501.
Examples julia-repl julia> m1 = ExtremeLearner(x, y, 10, σ) Extreme Learning Machine with 10 hidden neurons julia> f1 = fit!(m1) [-4.403356409043448, -5.577616954029608, -2.1732800642523595, 0.9669137012255704, -3.6474913410560013, -4.206228346376102, -7.575391282978456, 4.528774205936467, -2.4741301876094655, 40.642730531608635, -11.058942121275233]
fit!(model)
Fit a Regularized Extreme Learner.
For more details see: Li, Guoqiang, and Peifeng Niu. "An enhanced extreme learning machine based on ridge regression for regression." Neural Computing and Applications 22, no. 3 (2013): 803-810.
Examples julia-repl julia> m1 = RegularizedExtremeLearner(x, y, 10, σ) Regularized Extreme Learning Machine with 10 hidden neurons julia> f1 = fit!(m1) [-4.403356409043448, -5.577616954029608, -2.1732800642523595, 0.9669137012255704, -3.6474913410560013, -4.206228346376102, -7.575391282978456, 4.528774205936467, -2.4741301876094655, 40.642730531608635, -11.058942121275233]
CausalELM.Models.predict
— Functionpredict(model, X)
Use an ExtremeLearningMachine to make predictions.
For more details see: Huang G-B, Zhu Q-Y, Siew C. Extreme learning machine: theory and applications. Neurocomputing. 2006;70:489–501. https://doi.org/10.1016/j.neucom.2005.12.126
Examples julia-repl julia> m1 = ExtremeLearner(x, y, 10, σ) Extreme Learning Machine with 10 hidden neurons julia> f1 = fit(m1, sigmoid) [-4.403356409043448, -5.577616954029608, -2.1732800642523595, 0.9669137012255704, -3.6474913410560013, -4.206228346376102, -7.575391282978456, 4.528774205936467, -2.4741301876094655, 40.642730531608635, -11.058942121275233] julia> predict(m1, [1.0 1.0; 0.0 1.0; 0.0 0.0; 1.0 0.0]) [9.811656638113011e-16, 0.9999999999999962, -9.020553785284482e-17, 0.9999999999999978]
CausalELM.Models.predictcounterfactual!
— Functionpredictcounterfactual(model, X)
Use an ExtremeLearningMachine to predict the counterfactual.
This should be run with the observed covariates. To use synthtic data for what-if scenarios use predict.
See also predict
.
Examples julia-repl julia> m1 = ExtremeLearner(x, y, 10, σ) Extreme Learning Machine with 10 hidden neurons julia> f1 = fit(m1, sigmoid) [-4.403356409043448, -5.577616954029608, -2.1732800642523595, 0.9669137012255704, -3.6474913410560013, -4.206228346376102, -7.575391282978456, 4.528774205936467, -2.4741301876094655, 40.642730531608635, -11.058942121275233] julia> predictcounterfactual(m1, [1.0 1.0; 0.0 1.0; 0.0 0.0; 1.0 0.0]) [9.811656638113011e-16, 0.9999999999999962, -9.020553785284482e-17, 0.9999999999999978]
CausalELM.Models.placebotest
— Functionplacebotest(model)
Conduct a placebo test.
This method makes predictions for the post-event or post-treatment period using data in the pre-event or pre-treatment period and the post-event or post-treament. If there is a statistically significant difference between these predictions the study design may be flawed. Due to the multitude of significance tests for time series data, this function returns the predictions but does not test for statistical significance.
Examples julia-repl julia> m1 = ExtremeLearner(x, y, 10, σ) Extreme Learning Machine with 10 hidden neurons julia> f1 = fit(m1, sigmoid) [-4.403356409043448, -5.577616954029608, -2.1732800642523595, 0.9669137012255704, -3.6474913410560013, -4.206228346376102, -7.575391282978456, 4.528774205936467, -2.4741301876094655, 40.642730531608635, -11.058942121275233] julia> predictcounterfactual(m1, [1.0 1.0; 0.0 1.0; 0.0 0.0; 1.0 0.0]) [9.811656638113011e-16, 0.9999999999999962, -9.020553785284482e-17, 0.9999999999999978] julia> placebotest(m1) ([9.811656638113011e-16, 0.9999999999999962, -9.020553785284482e-17, 0.9999999999999978], [0.5, 0.4, 0.3, 0.2])