-
Notifications
You must be signed in to change notification settings - Fork 12
/
feature_encoder.py
50 lines (36 loc) · 1.07 KB
/
feature_encoder.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
41
42
43
44
45
46
47
48
49
50
__all__ = ["FeatureEncoder"]
class FeatureEncoder:
r"""Class for implementing feature encoders.
Date:
2020
Author:
Luka Pečnik
License:
MIT
Attributes:
Name (str): Name of the feature encoder.
"""
Name = None
def __init__(self, **kwargs):
r"""Initialize feature encoder."""
return None
def fit(self, feature):
r"""Fit feature encoder.
Arguments:
feature (pandas.core.frame.DataFrame): A column (categorical) from DataFrame of features.
"""
return None
def transform(self, feature):
r"""Transform feature's values.
Arguments:
feature (pandas.core.frame.DataFrame): A column (categorical) from DataFrame of features.
Returns:
pandas.core.frame.DataFrame: A transformed column.
"""
return None
def to_string(self):
r"""User friendly representation of the object.
Returns:
str: User friendly representation of the object.
"""
return "{name}"