Skip to content

Keras

Compare
Choose a tag to compare
@mrconway mrconway released this 21 May 18:15
· 117 commits to master since this release

This release contains the following features:

  • You can now use the Keras Sequential model for classification and regression. Please refer to the KERASC and KERASR entries in the algos.yml configuration file. Note that the input_shape argument is automatically added by AlphaPy based on the shape of the training set, with a limit of 10 layers per model.

KERASC:
    # Keras Classification
    model_type : classification
    layers     : ["Dense(12, activation='relu')",
                  "Dense(1, activation='sigmoid')"]
    compiler   : {"optimizer" : 'rmsprop',
                  "loss" : 'binary_crossentropy',
                  "metrics" : 'accuracy'}
    params     : {"epochs" : 50,
                  "batch_size" : 10,
                  "verbose" : 1}
    grid       : {}

KERASR:
    # Keras Regression
    model_type : regression
    layers     : ["Dense(10, activation='relu')",
                  "Dense(1)"]
    compiler   : {"optimizer" : 'rmsprop',
                  "loss" : 'mse'}
    params     : {"epochs" : 50,
                  "batch_size" : 10,
                  "verbose" : 1}
    grid       : {}

  • Remove redundant RFE code and estimator classes. RFE is performed only when the coef_ or feature_importances_ attribute is present.

  • Report (log) only those metrics that are relevant to either classification or regression.

  • Added Brier Score and Cohen's Kappa for classification metrics.

  • Remove the scoring field from the algos.yml configuration file. Just use scoring_function in the model.yml file.