Coverage for src/bob/fusion/base/algorithm/Empty.py: 73%

11 statements  

« prev     ^ index     » next       coverage.py v7.6.5, created at 2024-11-14 22:15 +0100

1#!/usr/bin/env python 

2 

3from __future__ import absolute_import, division 

4 

5import logging 

6 

7from .Algorithm import Algorithm 

8 

9logger = logging.getLogger(__name__) 

10 

11 

12class Empty(Algorithm): 

13 """Empty algorithm 

14 This algorithm does not change scores by itself and only applies the 

15 preprocessors.""" 

16 

17 def __init__(self, **kwargs): 

18 super(Empty, self).__init__(classifier=self, **kwargs) 

19 

20 def fit(self, X, y): 

21 pass 

22 

23 def decision_function(self, scores): 

24 return scores.flat