コード例 #1
0
class GroupUpHyperparameter(hyperparams.Hyperparams):
    verbose = UniformBool(default=False,
                          semantic_types=['http://schema.org/Boolean',
                                          'https://metadata.datadrivendiscovery.org/types/ControlParameter'])
    use_columns = hyperparams.Set(
        elements=hyperparams.Hyperparameter[int](-1),
        default=(),
        semantic_types=['https://metadata.datadrivendiscovery.org/types/ControlParameter'],
        description="A set of column indices to force primitive to operate on. If any specified column cannot be parsed, it is skipped.",
    )
    # exclude_columns = hyperparams.Set(
    #     elements=hyperparams.Hyperparameter[int](-1),
    #     default=(),
    #     semantic_types=['https://metadata.datadrivendiscovery.org/types/ControlParameter'],
    #     description="A set of column indices to not operate on. Applicable only if \"use_columns\" is not provided.",
    # )
    return_result = hyperparams.Enumeration(
        values=['append', 'replace', 'new'],
        default='replace',
        semantic_types=['https://metadata.datadrivendiscovery.org/types/ControlParameter'],
        description="Should parsed columns be appended, should they replace original columns, or should only parsed columns be returned? This hyperparam is ignored if use_semantic_types is set to false.",
    )
    # use_semantic_types = hyperparams.UniformBool(
    #     default=False,
    #     semantic_types=['https://metadata.datadrivendiscovery.org/types/ControlParameter'],
    #     description="Controls whether semantic_types metadata will be used for filtering columns in input dataframe. Setting this to false makes the code ignore return_result and will produce only the output dataframe"
    # )
    add_index_columns = hyperparams.UniformBool(
        default=True,
        semantic_types=['https://metadata.datadrivendiscovery.org/types/ControlParameter'],
        description="Also include primary index columns if input data has them. Applicable only if \"return_result\" is set to \"new\".",
    )
コード例 #2
0
class MiceHyperparameter(Hyperparams):
    verbose = UniformBool(
        default=False,
        semantic_types=[
            'http://schema.org/Boolean',
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ])
コード例 #3
0
class EncHyperparameter(hyperparams.Hyperparams):
    text2int = UniformBool(
        default=False,
        description=
        'Whether to convert everything to numerical. For text columns, each row may get converted into a column',
        semantic_types=[
            'http://schema.org/Boolean',
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ])
    n_limit = UniformInt(
        lower=5,
        upper=100,
        default=12,
        description='Limits the maximum number of columns to generate',
        semantic_types=[
            'http://schema.org/Integer',
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    categorical_features = Enumeration(
        values=['95in10'],
        default='95in10',
        description='rule to declare categorical',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ])
コード例 #4
0
class KnnHyperparameter(Hyperparams):
    # A reasonable upper bound would the size of the input. For now using 100.
    k = UniformInt(lower=1, upper=100, default=5,
                   description='Number of neighbors',
                   semantic_types=['http://schema.org/Integer',
                                   'https://metadata.datadrivendiscovery.org/types/TuningParameter'])
    verbose = UniformBool(default=False,
                          semantic_types=['http://schema.org/Boolean',
                                          'https://metadata.datadrivendiscovery.org/types/ControlParameter'])
コード例 #5
0
class EchoRegressor_Hyperparams(hyperparams.Hyperparams):
    # regularization strength
    alpha = Uniform(
        lower=0,
        upper=10,
        default=1,
        q=.1,
        description='regularization strength',
        semantic_types=[
            "http://schema.org/Float",
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])

    #
    diagonal = UniformBool(
        default=False,
        description=
        'assume diagonal covariance, leading to sparsity in data basis (instead of covariance eigenbasis)',
        semantic_types=[
            "http://schema.org/Integer",
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
コード例 #6
0
class EchoIB_Hyperparams(hyperparams.Hyperparams):
    n_hidden = UniformInt(
        lower=1,
        upper=401,
        default=200,
        description='number of hidden factors learned',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    beta = Uniform(
        lower=0,
        upper=1000,
        default=.1,
        q=.01,
        description=
        'Lagrange multiplier for beta (applied to regularizer I(X:Z)): defining tradeoff btwn label relevance : compression.',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    epochs = UniformInt(
        lower=1,
        upper=10000,
        default=100,
        description='number of epochs to train',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    batch = UniformInt(
        lower=10,
        upper=1000,
        default=50,
        description='batch_size',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])

    lr = LogUniform(
        lower=0.00001,
        upper=0.101,
        default=0.001,
        description='learning rate for Adam optimization',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])

    activation = Enumeration(
        values=['relu', 'tanh', 'elu'],
        default='tanh',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ],
        description="activation to use for intermediate activations")

    convolutional = UniformBool(
        default=False,
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ],
        description="whether to use a convolutional architecture")

    task = Enumeration(
        values=['CLASSIFICATION', 'REGRESSION'],
        default='CLASSIFICATION',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ],
        description='task type')

    use_as_modeling = UniformBool(
        default=False,
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ],
        description=
        "whether to return constructed features AND predictions (else, used for modeling i.e. only predictions"
    )

    units = UniformInt(
        lower=10,
        upper=401,
        default=200,
        description='# neurons in FC intermediate layers',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])

    layers = UniformInt(
        lower=1,
        upper=8,
        default=2,
        description='# of layers',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])

    error_on_no_input = hyperparams.UniformBool(
        default=True,
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ],
        description=
        "Throw an exception if no input column is selected/provided. Defaults to true to behave like sklearn. To prevent pipelines from breaking set this to False."
    )
    gpus = Uniform(
        lower=0,
        upper=5,
        q=1,
        default=1,
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/ResourcesUseParameter'
        ],
        description='GPUs to Use')
コード例 #7
0
ファイル: sdne.py プロジェクト: vivian0111/dsbox_graphs
class SDNE_Hyperparams(hyperparams.Hyperparams):
    dimension = UniformInt(
        lower=10,
        upper=200,
        default=10,
        #q = 5,
        description='dimension of latent embedding',
        semantic_types=[
            "http://schema.org/Integer",
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    epochs = UniformInt(
        lower=1,
        upper=500,
        default=50,
        #q = 5e-8,
        description='number of epochs to train',
        semantic_types=[
            "http://schema.org/Integer",
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    beta = UniformInt(
        lower=1,
        upper=20,
        default=5,
        #q = 1,
        description=
        'seen edge reconstruction weight (to account for sparsity in links for reconstructing adjacency.  matrix B in Wang et al 2016',
        semantic_types=[
            "http://schema.org/Integer",
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    alpha = Uniform(
        lower=1e-8,
        upper=1,
        default=1e-5,
        #q = 5e-8,
        description='first order proximity weight',
        semantic_types=[
            "http://schema.org/Integer",
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    lr = Uniform(
        lower=1e-5,
        upper=1e-2,
        default=5e-4,
        #q = 5e-8,
        description='learning rate (constant across training)',
        semantic_types=[
            "http://schema.org/Integer",
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])
    depth = UniformInt(
        lower=1,
        upper=10,
        default=3,
        #q = 5,
        description='number of hidden layers',
        semantic_types=[
            "http://schema.org/Integer",
            'https://metadata.datadrivendiscovery.org/types/ControlParameter'
        ])
    return_list = UniformBool(
        default=False,
        description='for testing',
        semantic_types=[
            'https://metadata.datadrivendiscovery.org/types/TuningParameter'
        ])