Skip to content

Commit

Permalink
doc : Document updated #347
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi authored and alirezazolanvari committed Nov 28, 2021
1 parent 84c54cd commit 3b3e57c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions Document/Document.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2431,7 +2431,7 @@
"metadata": {},
"outputs": [],
"source": [
"cp2 = Compare({\"cm2\":cm2,\"cm3\":cm3},by_class=True,weight={0:5,1:1,2:1})"
"cp2 = Compare({\"cm2\":cm2,\"cm3\":cm3},by_class=True,class_weight={0:5,1:1,2:1})"
]
},
{
Expand Down Expand Up @@ -2505,7 +2505,7 @@
"source": [
"1. `cm_dict` : python `dict` of `ConfusionMatrix` object (`str` : `ConfusionMatrix`)\n",
"2. `by_class` : `bool`\n",
"3. `weight` : python `dict` of class weights (`class_name` : `float`)\n",
"3. `class_weight` : python `dict` of class weights (`class_name` : `float`)\n",
"4. `digit`: `int`"
]
},
Expand All @@ -2516,6 +2516,15 @@
"* run `help(Compare)` for more information"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<ul>\n",
" <li><span style=\"color:red;\">Notice </span> : `weight` renamed to `class_weight` in <span style=\"color:red;\">version 3.3</span> </li>\n",
"</ul>"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -12785,7 +12794,7 @@
],
"source": [
"try:\n",
" cp=Compare({\"cm1\":cm2,\"cm2\":cm3},by_class=True,weight={1:2,2:0})\n",
" cp=Compare({\"cm1\":cm2,\"cm2\":cm3},by_class=True,class_weight={1:2,2:0})\n",
"except pycmCompareError as e:\n",
" print(str(e))"
]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ pycm.ConfusionMatrix(classes: [0, 1, 2])

1. `cm_dict` : python `dict` of `ConfusionMatrix` object (`str` : `ConfusionMatrix`)
2. `by_class` : `bool`
3. `weight` : python `dict` of class weights (`class_name` : `float`)
3. `class_weight` : python `dict` of class weights (`class_name` : `float`)
4. `digit`: `int`

* Run `help(Compare)` for `Compare` object details
Expand Down

0 comments on commit 3b3e57c

Please sign in to comment.