tpot_classification module¶
-
class
tpot_classification.TpotClassifier(data_path, gabor=False, reduction_method=None)[source]¶ Bases:
objectTrains a machine learning model with tpot, which can then be used to predict attractiveness of pictures of humans.
Parameters: - data_path – Path to the folder that has the image folder and users.csv
- make_data_set – Takes the images from the data folder, finds faces in them and transforms those into 64x64 grayscale images. Making the data set takes a long time.
- gabor – This determines if gabor filter is used in training.
- reduction_method – Which method to use for dimensionality reduction. Supported types are ‘pca’ and ‘lda’.
-
static
create_data(data_path)[source]¶ Makes a 64x64 grayscale image dataset of faces.
Parameters: data_path – Path to the folder that has the image folder and users.csv
-
predict(image)[source]¶ Predicts the attractiveness of a picture with a human in it.
Parameters: image – The image with the human in it. Returns: The prediction.