Skip to content

Instantly share code, notes, and snippets.

View WojciechKusa's full-sized avatar

Wojciech Kusa WojciechKusa

View GitHub Profile
@WojciechKusa
WojciechKusa / wss_to_tnr.py
Created September 7, 2023 13:11
Convert WSS score to TNR
from typing import Dict, List, Union
import numpy as np
ScoreType = Union[float, List[float], Dict[str, float]]
def convert_single_score(score: float, min_score: float, max_score: float) -> float:
"""
Convert a single score using min-max normalization.
#!/bin/bash
set -e
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${THIS_SCRIPT_DIR}/.."
# Check if there's something uncommitted (don't release if there are files
# not yet committed)
set +e