Skip to content

Commit 3f3fd51

Browse files
committed
#110 added documentation and added referenced to keras and tf branches
1 parent 4c51034 commit 3f3fd51

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

keras_batchflow/base/batch_generators/batch_generator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class BatchGenerator:
3535
- **shuffle** - (optional) *bool*, if true, the input dataframe is shuffled before each new epoch.
3636
**Default: False**
3737
- **train_mode** - (optional) *bool*. If true, both X and Y are returned, otherwise only X is returned
38+
- **encoder_adapter** - (optional) *str* or a single instance of a class derived from
39+
keras_batchflow.base.batch_shapers.IEncoderAdaptor class. String values supported: 'numpy' and 'pandas'. If
40+
not provided, 'numpy' is used. This parameter sets format that encoders are using. Sklearn encoders are
41+
created for numpy arrays hence the default value is numpy. If your encoders require pandas format, use
42+
'pandas'. Alternatively, if your encoders need some special format, create your instance derived from
43+
IEncoderAdaptor class
3844
"""
3945

4046
def __init__(self, data: pd.DataFrame, x_structure, y_structure=None,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
from .batch_shaper import BatchShaper
2+
from .encoder_adaptor import IEncoderAdaptor
3+
from .numpy_encoder_adaptor import NumpyEncoderAdaptor
4+
from .pandas_encoder_adaptor import PandasEncoderAdaptor
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
from keras_batchflow.base.batch_shapers import BatchShaper
1+
from keras_batchflow.base.batch_shapers import BatchShaper
2+
from keras_batchflow.base.batch_shapers import IEncoderAdaptor
3+
from keras_batchflow.base.batch_shapers import NumpyEncoderAdaptor
4+
from keras_batchflow.base.batch_shapers import PandasEncoderAdaptor
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
from keras_batchflow.base.batch_shapers import BatchShaper
1+
from keras_batchflow.base.batch_shapers import BatchShaper
2+
from keras_batchflow.base.batch_shapers import IEncoderAdaptor
3+
from keras_batchflow.base.batch_shapers import NumpyEncoderAdaptor
4+
from keras_batchflow.base.batch_shapers import PandasEncoderAdaptor

0 commit comments

Comments
 (0)