Skip to content

Commit

Permalink
Fixed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dscolby committed Jun 18, 2024
1 parent 67b2dfa commit 12c0440
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CausalELM.Continuous
```@docs
binary_step
σ
Causal.tanh
CausalELM.tanh
relu
leaky_relu
swish
Expand Down
28 changes: 28 additions & 0 deletions src/metalearners.jl
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ end
Estimate the CATE using an S-learner.
# References
For an overview of S-learning see:
Künzel, Sören R., Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. "Metalearners for
estimating heterogeneous treatment effects using machine learning." Proceedings of the
Expand All @@ -521,6 +522,7 @@ end
Estimate the CATE using an T-learner.
# References
For an overview of T-learning see:
Künzel, Sören R., Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. "Metalearners for
estimating heterogeneous treatment effects using machine learning." Proceedings of the
Expand Down Expand Up @@ -562,6 +564,7 @@ end
Estimate the CATE using an X-learner.
# References
For an overview of X-learning see:
Künzel, Sören R., Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. "Metalearners for
estimating heterogeneous treatment effects using machine learning." Proceedings of the
Expand Down Expand Up @@ -595,6 +598,7 @@ end
Estimate the CATE using an R-learner.
# References
For an overview of R-learning see:
Nie, Xinkun, and Stefan Wager. "Quasi-oracle estimation of heterogeneous treatment
effects." Biometrika 108, no. 2 (2021): 299-319.
Expand All @@ -616,6 +620,26 @@ function estimate_causal_effect!(R::RLearner)
return R.causal_effect
end

"""
causal_loss(R)
Minimize the causal loss function for an R-learner.
# Notes
This function should not be called directly.
# References
For an overview of R-learning see:
Nie, Xinkun, and Stefan Wager. "Quasi-oracle estimation of heterogeneous treatment
effects." Biometrika 108, no. 2 (2021): 299-319.
# Examples
```julia
julia> X, T, Y = rand(100, 5), [rand()<0.4 for i in 1:100], rand(100)
julia> m1 = RLearner(X, T, Y)
julia> causal_loss(m1)
```
"""
function causal_loss(R::RLearner)
X, T, W, Y = make_folds(R)
predictors = Vector{RegularizedExtremeLearner}(undef, R.folds)
Expand Down Expand Up @@ -646,6 +670,7 @@ end
Estimate the CATE using a doubly robust learner.
# References
For details on how this method estimates the CATE see:
Kennedy, Edward H. "Towards optimal doubly robust estimation of heterogeneous causal
effects." Electronic Journal of Statistics 17, no. 2 (2023): 3008-3049.
Expand Down Expand Up @@ -682,6 +707,7 @@ end
Estimate the CATE for a single cross fitting iteration via doubly robust estimation.
# Notes
This method should not be called directly.
# Arguments
Expand Down Expand Up @@ -735,6 +761,7 @@ stage1!(x)
Estimate the first stage models for an X-learner.
# Notes
This method should not be called by the user.
# Examples
Expand Down Expand Up @@ -777,6 +804,7 @@ stage2!(x)
Estimate the second stage models for an X-learner.
# Notes
This method should not be called by the user.
# Examples
Expand Down
2 changes: 1 addition & 1 deletion src/metrics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ end
Calculate the recall for a classification task
See also [`CausalEM.precision`](@ref).
See also [`CausalELM.precision`](@ref).
# Examples
```jldoctest
Expand Down

0 comments on commit 12c0440

Please sign in to comment.