Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gps_regressor.py #46

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions causal_curve/gps_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _create_point_estimate(self, T):
in the case of a continuous outcome.
"""
return self.gam_results.predict(
np.array([T, self.gps_function(T).mean()]).reshape(1, -1)
np.array([T[0], self.gps_function(T).mean()]).reshape(1, -1)
)

def point_estimate_interval(self, T, ci=0.95):
Expand Down Expand Up @@ -154,5 +154,5 @@ def _create_point_estimate_interval(self, T, width):
associated with a point estimate in the case of a continuous outcome.
"""
return self.gam_results.prediction_intervals(
np.array([T, self.gps_function(T).mean()]).reshape(1, -1), width=width
np.array([T[0], self.gps_function(T).mean()]).reshape(1, -1), width=width
)