FeatureWrap

Import FeatureWrap

To import FeatureWrap model use:

>>> from TINTOlib.featureWrap import FeatureWrap
>>> model = FeatureWrap()

Hyperparameters & Configuration

When creating the FeatureWrap class, some parameters can be modified. The parameters are:

Parameters

Description

Default value

Valid values

problem

The type of problem, this will define how the images are grouped.

‘supervised’

[‘supervised’, ‘unsupervised’, ‘regression’]

size

The width and height of the final image, in pixels (rows x columns).

[8,8]

[int, int]

bins

The number of bins or intervals used for grouping numeric data

10

int

zoom

Multiplication factor that determines the size of the saved image relative to the original size. Values greater than 1 will increase the size of the saved image proportionally.

1

int

verbose

Show in terminal the execution.

False

[True, False]

Code example:

>>> model = FeatureWrap(size=[10,10], bins=20)

All the parameters that aren’t expecifically setted will have their default values.

Functions

FeatureWrap has the following functions:

Function

Description

Output

saveHyperparameters(filename)

Allows to save the defined parameters (scale, fea_dist_method, image_dist_method….).

.pkl file with the configuration

loadHyperparameters(filename)

Load FeatureWrap configuration previously saved with saveHyperparameters(filename)

  • filename: .pkl file path

generateImages(data, folder)

Generate one image per instance and group by class in different folder

  • data: path of the CSV or pandas dataframe

  • folder: path of the folder to save results

Folders with synthetic images

Citation

Paper: https://doi.org/10.1007/978-3-319-70139-4_87

Code Repository: