Skip to content

Instantly share code, notes, and snippets.

@dpoulopoulos
Created February 29, 2020 11:47
Show Gist options
  • Select an option

  • Save dpoulopoulos/9ea4041546e61a73e50a1a4ea69a2c00 to your computer and use it in GitHub Desktop.

Select an option

Save dpoulopoulos/9ea4041546e61a73e50a1a4ea69a2c00 to your computer and use it in GitHub Desktop.
Definition of the confidence function for icf.
def conf_func(x: torch.tensor, a: float = 1) -> torch.tensor:
x[x == 5.] = a * 1.
x[x == 4.] = a * .5
x[x == 3.] = a * .01
x[x == 2.] = a * .5
x[x == 1.] = a * 1.
return x.float()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment