Skip to content

Commit

Permalink
Added pandas output
Browse files Browse the repository at this point in the history
  • Loading branch information
chadcwilliams committed Nov 29, 2023
1 parent f0c4254 commit cc0388d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/autora/experimentalist/novelty/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def sample(
num_samples: Optional[int] = None,
metric: AllowedMetrics = "euclidean",
integration: str = "min",
) -> np.ndarray:
):
"""
This novelty experimentalist re-arranges the pool of experimental conditions according to their
dissimilarity with respect to a reference pool. The default dissimilarity is calculated
Expand All @@ -63,11 +63,16 @@ def sample(
Sampled pool of conditions
"""

condition_pool_copy = conditions.copy()

new_conditions = novelty_score_sample(
conditions, reference_conditions, num_samples, metric, integration
)
new_conditions.drop("score", axis=1, inplace=True)

if isinstance(condition_pool_copy, pd.DataFrame):
new_conditions = pd.DataFrame(new_conditions, columns=condition_pool_copy.columns)

return new_conditions


Expand Down

0 comments on commit cc0388d

Please sign in to comment.