CompStats 0.1.7__tar.gz → 0.1.8__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.8}/CompStats/__init__.py +1 -1
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/interface.py +33 -7
- {compstats-0.1.7 → compstats-0.1.8}/CompStats.egg-info/PKG-INFO +1 -1
- {compstats-0.1.7 → compstats-0.1.8}/PKG-INFO +1 -1
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/bootstrap.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/measurements.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/metrics.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/performance.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/tests/__init__.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/tests/data.csv +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/tests/test_bootstrap.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/tests/test_interface.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/tests/test_measurements.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/tests/test_metrics.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/tests/test_performance.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats/utils.py +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats.egg-info/SOURCES.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats.egg-info/dependency_links.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats.egg-info/requires.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/CompStats.egg-info/top_level.txt +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/LICENSE +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/MANIFEST.in +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/README.rst +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/pyproject.toml +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/setup.cfg +0 -0
- {compstats-0.1.7 → compstats-0.1.8}/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.8'
|
|
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,19 +604,40 @@ 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
|
+
CI:float=0.05):
|
|
608
610
|
"""Dataframe"""
|
|
609
611
|
if perf_names is None and isinstance(self.best, np.ndarray):
|
|
610
612
|
perf_names = [f'{alg}({k})'
|
|
611
613
|
for k, alg in enumerate(self.best)]
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
614
|
+
df = dataframe(self, value_name=value_name,
|
|
615
|
+
var_name=var_name,
|
|
616
|
+
alg_legend=alg_legend,
|
|
617
|
+
perf_names=perf_names)
|
|
618
|
+
df[sig_legend] = False
|
|
619
|
+
if isinstance(self.best, str):
|
|
620
|
+
for name, p in self.p_value().items():
|
|
621
|
+
if p >= CI:
|
|
622
|
+
continue
|
|
623
|
+
df.loc[df[alg_legend] == name, sig_legend] = True
|
|
624
|
+
else:
|
|
625
|
+
p_values = self.p_value()
|
|
626
|
+
systems = list(p_values.keys())
|
|
627
|
+
p_values = np.array([p_values[k] for k in systems])
|
|
628
|
+
for name, p_value in zip(perf_names, p_values.T):
|
|
629
|
+
mask = df[var_name] == name
|
|
630
|
+
for alg, p in zip(systems, p_value):
|
|
631
|
+
if p >= CI:
|
|
632
|
+
continue
|
|
633
|
+
_ = mask & (df[alg_legend] == alg)
|
|
634
|
+
df.loc[_, sig_legend] = True
|
|
635
|
+
return df
|
|
616
636
|
|
|
617
637
|
def plot(self, value_name:str='Difference',
|
|
618
638
|
var_name:str='Best',
|
|
619
639
|
alg_legend:str='Algorithm',
|
|
640
|
+
sig_legend:str='Significant',
|
|
620
641
|
perf_names:list=None,
|
|
621
642
|
CI:float=0.05,
|
|
622
643
|
kind:str='point', linestyle:str='none',
|
|
@@ -644,7 +665,10 @@ class Difference:
|
|
|
644
665
|
import seaborn as sns
|
|
645
666
|
df = self.dataframe(value_name=value_name,
|
|
646
667
|
var_name=var_name,
|
|
647
|
-
alg_legend=alg_legend,
|
|
668
|
+
alg_legend=alg_legend,
|
|
669
|
+
sig_legend=sig_legend,
|
|
670
|
+
perf_names=perf_names,
|
|
671
|
+
CI=CI)
|
|
648
672
|
title = var_name
|
|
649
673
|
if var_name not in df.columns:
|
|
650
674
|
var_name = None
|
|
@@ -653,7 +677,9 @@ class Difference:
|
|
|
653
677
|
f_grid = sns.catplot(df, x=value_name, errorbar=ci,
|
|
654
678
|
y=alg_legend, col=var_name,
|
|
655
679
|
kind=kind, linestyle=linestyle,
|
|
656
|
-
col_wrap=col_wrap, capsize=capsize,
|
|
680
|
+
col_wrap=col_wrap, capsize=capsize,
|
|
681
|
+
hue=sig_legend,
|
|
682
|
+
**kwargs)
|
|
657
683
|
if set_refline:
|
|
658
684
|
f_grid.refline(x=0)
|
|
659
685
|
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.8
|
|
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.8
|
|
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
|