CompStats 0.1.7__tar.gz → 0.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/__init__.py +1 -1
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/interface.py +38 -10
- {compstats-0.1.7 → compstats-0.1.9}/CompStats.egg-info/PKG-INFO +1 -1
- {compstats-0.1.7 → compstats-0.1.9}/PKG-INFO +1 -1
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/bootstrap.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/measurements.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/metrics.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/performance.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/tests/__init__.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/tests/data.csv +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/tests/test_bootstrap.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/tests/test_interface.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/tests/test_measurements.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/tests/test_metrics.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/tests/test_performance.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats/utils.py +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats.egg-info/SOURCES.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats.egg-info/dependency_links.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats.egg-info/requires.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/CompStats.egg-info/top_level.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/LICENSE +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/MANIFEST.in +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/README.rst +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/pyproject.toml +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/setup.cfg +0 -0
- {compstats-0.1.7 → compstats-0.1.9}/setup.py +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
__version__ = '0.1.
|
|
14
|
+
__version__ = '0.1.9'
|
|
15
15
|
from CompStats.bootstrap import StatisticSamples
|
|
16
16
|
from CompStats.measurements import CI, SE, difference_p_value
|
|
17
17
|
from CompStats.performance import performance, difference, all_differences, plot_performance, plot_difference
|
|
@@ -604,21 +604,44 @@ class Difference:
|
|
|
604
604
|
def dataframe(self, value_name:str='Score',
|
|
605
605
|
var_name:str='Best',
|
|
606
606
|
alg_legend:str='Algorithm',
|
|
607
|
-
|
|
607
|
+
sig_legend:str='Significant',
|
|
608
|
+
perf_names:str=None,
|
|
609
|
+
right:bool=True,
|
|
610
|
+
alpha:float=0.05):
|
|
608
611
|
"""Dataframe"""
|
|
609
612
|
if perf_names is None and isinstance(self.best, np.ndarray):
|
|
610
613
|
perf_names = [f'{alg}({k})'
|
|
611
614
|
for k, alg in enumerate(self.best)]
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
615
|
+
df = dataframe(self, value_name=value_name,
|
|
616
|
+
var_name=var_name,
|
|
617
|
+
alg_legend=alg_legend,
|
|
618
|
+
perf_names=perf_names)
|
|
619
|
+
df[sig_legend] = False
|
|
620
|
+
if isinstance(self.best, str):
|
|
621
|
+
for name, p in self.p_value(right=right).items():
|
|
622
|
+
if p >= alpha:
|
|
623
|
+
continue
|
|
624
|
+
df.loc[df[alg_legend] == name, sig_legend] = True
|
|
625
|
+
else:
|
|
626
|
+
p_values = self.p_value(right=right)
|
|
627
|
+
systems = list(p_values.keys())
|
|
628
|
+
p_values = np.array([p_values[k] for k in systems])
|
|
629
|
+
for name, p_value in zip(perf_names, p_values.T):
|
|
630
|
+
mask = df[var_name] == name
|
|
631
|
+
for alg, p in zip(systems, p_value):
|
|
632
|
+
if p >= alpha:
|
|
633
|
+
continue
|
|
634
|
+
_ = mask & (df[alg_legend] == alg)
|
|
635
|
+
df.loc[_, sig_legend] = True
|
|
636
|
+
return df
|
|
616
637
|
|
|
617
638
|
def plot(self, value_name:str='Difference',
|
|
618
639
|
var_name:str='Best',
|
|
619
640
|
alg_legend:str='Algorithm',
|
|
641
|
+
sig_legend:str='Significant',
|
|
620
642
|
perf_names:list=None,
|
|
621
|
-
|
|
643
|
+
alpha:float=0.05,
|
|
644
|
+
right:bool=True,
|
|
622
645
|
kind:str='point', linestyle:str='none',
|
|
623
646
|
col_wrap:int=3, capsize:float=0.2,
|
|
624
647
|
set_refline:bool=True,
|
|
@@ -644,16 +667,21 @@ class Difference:
|
|
|
644
667
|
import seaborn as sns
|
|
645
668
|
df = self.dataframe(value_name=value_name,
|
|
646
669
|
var_name=var_name,
|
|
647
|
-
alg_legend=alg_legend,
|
|
648
|
-
|
|
670
|
+
alg_legend=alg_legend,
|
|
671
|
+
sig_legend=sig_legend,
|
|
672
|
+
perf_names=perf_names,
|
|
673
|
+
alpha=alpha, right=right)
|
|
674
|
+
title = var_name
|
|
649
675
|
if var_name not in df.columns:
|
|
650
676
|
var_name = None
|
|
651
677
|
col_wrap = None
|
|
652
|
-
ci = lambda x: measurements.CI(x, alpha=
|
|
678
|
+
ci = lambda x: measurements.CI(x, alpha=2*alpha)
|
|
653
679
|
f_grid = sns.catplot(df, x=value_name, errorbar=ci,
|
|
654
680
|
y=alg_legend, col=var_name,
|
|
655
681
|
kind=kind, linestyle=linestyle,
|
|
656
|
-
col_wrap=col_wrap, capsize=capsize,
|
|
682
|
+
col_wrap=col_wrap, capsize=capsize,
|
|
683
|
+
hue=sig_legend,
|
|
684
|
+
**kwargs)
|
|
657
685
|
if set_refline:
|
|
658
686
|
f_grid.refline(x=0)
|
|
659
687
|
if isinstance(self.best, str):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: CompStats
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: CompStats implements an evaluation methodology for statistically analyzing competition results and competition
|
|
5
5
|
Project-URL: Homepage, https://compstats.readthedocs.io
|
|
6
6
|
Project-URL: Repository, https://github.com/INGEOTEC/CompStats
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: CompStats
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: CompStats implements an evaluation methodology for statistically analyzing competition results and competition
|
|
5
5
|
Project-URL: Homepage, https://compstats.readthedocs.io
|
|
6
6
|
Project-URL: Repository, https://github.com/INGEOTEC/CompStats
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|