def get_pyrbm(n_features, rng): pyvotune.dense_input(PyRBMFeatureExtractor) pyvotune.non_terminal(PyRBMFeatureExtractor) pyvotune.pfloat(range=(0., 1.0), name='learning_rate', rng=rng)(PyRBMFeatureExtractor) pyvotune.pfloat(range=(0., 1.0), name='momentum', rng=rng)(PyRBMFeatureExtractor) pyvotune.pfloat(range=(0., 1.0), name='l2_weight', rng=rng)(PyRBMFeatureExtractor) pyvotune.pfloat(range=(0., 1.0), name='sparsity', rng=rng)(PyRBMFeatureExtractor) pyvotune.pfloat(range=(0., 1.0), name='scale', rng=rng)(PyRBMFeatureExtractor) pyvotune.pbool(name='binary', rng=rng)(PyRBMFeatureExtractor) pyvotune.pbool(name='reconstruction', rng=rng)(PyRBMFeatureExtractor) pyvotune.pint(range=(1, 10), name='n_training_epochs', rng=rng)(PyRBMFeatureExtractor) pyvotune.pint(range=(1, 20), name='n_gibbs', rng=rng)(PyRBMFeatureExtractor) pyvotune.pint(range=(1, 1000), name='batch_size', rng=rng)(PyRBMFeatureExtractor) pyvotune.pint(range=(5, 1500), name='n_hidden', rng=rng)(PyRBMFeatureExtractor) return [PyRBMFeatureExtractor]
def get_decomposers(n_features, rng): pyvotune.dense_input(PCA) pyvotune.non_terminal(PCA) pyvotune.pbool(name='whiten', rng=rng)(PCA) pyvotune.non_terminal(ProjectedGradientNMF) pyvotune.pint(range=(1, n_features), name='n_components', rng=rng)(ProjectedGradientNMF) pyvotune.choice(choices=['nndsvd', 'nndsvda', 'nndsvdar'], name='init', rng=rng)(ProjectedGradientNMF) pyvotune.choice(choices=['data', 'components', None], name='sparseness', rng=rng)(ProjectedGradientNMF) pyvotune.pfloat(range=(1, 10), name='beta', rng=rng)(ProjectedGradientNMF) pyvotune.pfloat(range=(0.01, 10), name='eta', rng=rng)(ProjectedGradientNMF) pyvotune.pint(range=(1, 600), name='max_iter', rng=rng)(ProjectedGradientNMF) pyvotune.pint(range=(100, 4000), name='nls_max_iter', rng=rng)(ProjectedGradientNMF) # PCA & ProbabilisticPCA are initialized together since ProbabilisticPCA # wraps PCA return [PCA, ProbabilisticPCA, ProjectedGradientNMF]
def get_decomposers(n_features, rng): pyvotune.dense_input(PCA) pyvotune.non_terminal(PCA) pyvotune.pbool(name='whiten', rng=rng)(PCA) pyvotune.non_terminal(ProjectedGradientNMF) pyvotune.pint( range=(1, n_features), name='n_components', rng=rng)(ProjectedGradientNMF) pyvotune.choice( choices=['nndsvd', 'nndsvda', 'nndsvdar'], name='init', rng=rng)(ProjectedGradientNMF) pyvotune.choice( choices=['data', 'components', None], name='sparseness', rng=rng)(ProjectedGradientNMF) pyvotune.pfloat( range=(1, 10), name='beta', rng=rng)(ProjectedGradientNMF) pyvotune.pfloat( range=(0.01, 10), name='eta', rng=rng)(ProjectedGradientNMF) pyvotune.pint( range=(1, 600), name='max_iter', rng=rng)(ProjectedGradientNMF) pyvotune.pint( range=(100, 4000), name='nls_max_iter', rng=rng)(ProjectedGradientNMF) # PCA & ProbabilisticPCA are initialized together since ProbabilisticPCA # wraps PCA return [PCA, ProbabilisticPCA, ProjectedGradientNMF]
def get_theano(n_features, rng): pyvotune.dense_input(TheanoRBMFeatureExtractor) pyvotune.non_terminal(TheanoRBMFeatureExtractor) pyvotune.pfloat(range=(0., 1.0), name='learning_rate', rng=rng)(TheanoRBMFeatureExtractor) pyvotune.pint(range=(1, 10), name='training_epochs', rng=rng)(TheanoRBMFeatureExtractor) pyvotune.pint(range=(1, 1000), name='batch_size', rng=rng)(TheanoRBMFeatureExtractor) pyvotune.pint(range=(1, 1000), name='n_resamples', rng=rng)(TheanoRBMFeatureExtractor) pyvotune.pint(range=(5, 1500), name='n_hidden', rng=rng)(TheanoRBMFeatureExtractor) return [TheanoRBMFeatureExtractor]
def get_image_features(n_features, rng): pyvotune.dense_input(PatchExtractor) pyvotune.non_terminal(PatchExtractor) pyvotune.param( typename="patchsize", checker_fn=patchsize_checker, checker_args={ 'min_width': 2, 'max_width': 200, 'min_height': 2, 'max_height': 200 }, generator_fn=patchsize_generator, generator_args={ 'min_width': 2, 'max_width': 200, 'min_height': 2, 'max_height': 200 }, name="patch_size")(PatchExtractor) pyvotune.pint(range=(1, 100), name='max_patches', rng=rng)(PatchExtractor) return [PatchExtractor]
def get_preprocessors(n_features, rng): pyvotune.dense_input(Scaler) pyvotune.non_terminal(Scaler) pyvotune.pbool(name="with_std", rng=rng)(Scaler) pyvotune.non_terminal(Normalizer) pyvotune.choice(choices=["l1", "l2"], name="norm", rng=rng)(Normalizer) pyvotune.non_terminal(Binarizer) pyvotune.pfloat(range=(0, 10000), name="threshold", rng=rng)(Binarizer) return [Scaler, Normalizer, Binarizer]