-
Notifications
You must be signed in to change notification settings - Fork 12
/
classifier.py
40 lines (28 loc) · 894 Bytes
/
classifier.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from niaaml.pipeline_component import PipelineComponent
__all__ = ["Classifier"]
class Classifier(PipelineComponent):
r"""Class for implementing classifiers.
Date:
2020
Author:
Luka Pečnik
License:
MIT
See Also:
* :class:`niaaml.pipeline_component.PipelineComponent`
"""
def fit(self, x, y, **kwargs):
r"""Fit implemented classifier.
Arguments:
x (pandas.core.frame.DataFrame): n samples to classify.
y (pandas.core.series.Series): n classes of the samples in the x array.
"""
return
def predict(self, x, **kwargs):
r"""Predict class for each sample (row) in x.
Arguments:
x (pandas.core.frame.DataFrame): n samples to classify.
Returns:
pandas.core.series.Series: n predicted classes.
"""
return