brainmass.objectives.cosine_sim#
- brainmass.objectives.cosine_sim(as_loss=False, epsilon=0.0)[source]#
Build a cosine-similarity score between two (flattened) time series.
Thin wrapper over
braintools.metric.cosine_similarity(); the inputs are flattened to a single vector so the result is a scalar.- Parameters:
- Returns:
score(prediction, target) -> scalar.- Return type:
callable