jpxkqx commited on
Commit
df40628
·
1 Parent(s): c3f2132
structural_similarity_index_measure.py CHANGED
@@ -41,14 +41,9 @@ Returns:
41
  Examples:
42
  Example 1-A simple example
43
  >>> accuracy_metric = evaluate.load("accuracy")
44
- >>> results = accuracy_metric.compute(references=[0, 1, 2, 0, 1, 2], predictions=[0, 1, 1, 2, 1, 0])
45
  >>> print(results)
46
- {'accuracy': 0.5}
47
- Example 2-The same as Example 1, except with `sample_weight` set.
48
- >>> accuracy_metric = evaluate.load("accuracy")
49
- >>> results = accuracy_metric.compute(references=[0, 1, 2, 0, 1, 2], predictions=[0, 1, 1, 2, 1, 0], sample_weight=[0.5, 2, 0.7, 0.5, 9, 0.4])
50
- >>> print(results)
51
- {'accuracy': 0.8778625954198473}
52
  """
53
 
54
 
 
41
  Examples:
42
  Example 1-A simple example
43
  >>> accuracy_metric = evaluate.load("accuracy")
44
+ >>> results = accuracy_metric.compute(references=[[0, 0], [-1, -1]], predictions=[[0, 1], [0, 0]])
45
  >>> print(results)
46
+ 0.5
 
 
 
 
 
47
  """
48
 
49
 
tests.py CHANGED
@@ -1,7 +1,7 @@
1
  test_cases = [
2
  {
3
- "predictions": [[0.1, 0.1], [1.1, 0.1]],
4
- "references": [[0.1, 0.1], [1.1, 0.1]],
5
  "result": 1.0
6
  },
7
  {
 
1
  test_cases = [
2
  {
3
+ "predictions": [[0.1, 0.1], [1, 0.1]],
4
+ "references": [[0.1, 0.1], [0.9, 0.1]],
5
  "result": 1.0
6
  },
7
  {