CompStats 0.0.4__tar.gz → 0.0.5__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.
@@ -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.0.4'
14
+ __version__ = '0.0.5'
15
15
  from CompStats.bootstrap import StatisticSamples
16
16
  from CompStats.measurements import CI, difference_p_value
17
17
  from CompStats.performance import performance, difference, all_differences, plot_performance, plot_difference
@@ -24,10 +24,13 @@ from CompStats.measurements import CI
24
24
  def performance(data: pd.DataFrame,
25
25
  gold: str='y',
26
26
  score: Callable[[np.ndarray, np.ndarray], float]=accuracy_score,
27
+ num_samples: int=500,
28
+ n_jobs: int=-1,
27
29
  statistic_samples: StatisticSamples=None) -> StatisticSamples:
28
30
  """Bootstrap samples of a performance score"""
29
31
  if statistic_samples is None:
30
- statistic_samples = StatisticSamples(statistic=score)
32
+ statistic_samples = StatisticSamples(statistic=score, num_samples=num_samples,
33
+ n_jobs=n_jobs)
31
34
  columns = data.columns
32
35
  y = data[gold]
33
36
  for column in columns:
@@ -27,6 +27,7 @@ def test_performance():
27
27
  perf = performance(df, score=lambda y, hy: f1_score(y, hy, average='weighted'))
28
28
  assert 'BoW' in perf.calls
29
29
  assert 'y' not in perf.calls
30
+ assert perf.n_jobs == -1
30
31
 
31
32
 
32
33
  def test_plot_performance():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: CompStats
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  License-File: LICENSE
5
5
  Requires-Dist: numpy
6
6
  Requires-Dist: scikit-learn>=1.3.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: CompStats
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  License-File: LICENSE
5
5
  Requires-Dist: numpy
6
6
  Requires-Dist: scikit-learn>=1.3.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes