from ConfigSpace.configuration_space import ConfigurationSpace
from ConfigSpace.hyperparameters import CategoricalHyperparameter, \
UniformIntegerHyperparameter, UniformFloatHyperparameter
import sklearn.metrics
import autosklearn.classification
import autosklearn.pipeline.components.classification
from autosklearn.pipeline.components.base \
import AutoSklearnClassificationAlgorithm
from autosklearn.pipeline.constants import DENSE, SIGNED_DATA, UNSIGNED_DATA, \
PREDICTIONS
class MLPClassifier(AutoSklearnClassificationAlgorithm):
def __init__(self,
hidden_layer_depth,
num_nodes_per_layer,
activation,
alpha,
solver,
random_state=None,
):
self.hidden_layer_depth = hidden_layer_depth
self.num_nodes_per_layer = num_nodes_per_layer
self.activation = activation
self.alpha = alpha
self.solver = solver
self.random_state = random_state
def fit(self, X, y):
self.num_nodes_per_layer = int(sel