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

Fix prediction on training data in transformed space when calculating model fit quality metrics #2279

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions ax/modelbridge/cross_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,12 +566,12 @@ def _predict_on_training_data(
observations = observations_from_data(
experiment=experiment, data=data
) # List[Observation]
observation_features = [obs.features for obs in observations]

# Transform observation features
observation_features = deepcopy(observation_features)
# Transform observations -- this will transform both obs data and features
for t in model_bridge.transforms.values():
observation_features = t.transform_observation_features(observation_features)
observations = t.transform_observations(observations)

observation_features = [obs.features for obs in observations]

# Make predictions in transformed space
observation_data_pred = model_bridge._predict(observation_features)
Expand Down