Giter Club home page Giter Club logo

hpolibconfigspace's Introduction

HPOlibConfigSpace

A simple python module to manage configuration spaces for algorithm configuration and hyperparameter optimization tasks. Includes various scripts to translate between different text formats for configuration space description. Documentation can be found at hpolibconfigspace.readthedocs.org Distributed under GPL3.0, see LICENSE except all files in the directory HPOlibConfigSpace.nx, which are copied from the networkx package and licensed under a BSD license.

Build Status Code Health Stories in Ready Documentation Status

hpolibconfigspace's People

Contributors

keggensperger avatar mfeurer avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hpolibconfigspace's Issues

get_array after get_default_configuration contains wrong values

I was trying to setup a simple all-continuous PCS (code below).

import ConfigSpace as CS

cs = CS.ConfigurationSpace()

for i in range(5):
    cs.add_hyperparameter(CS.UniformFloatHyperparameter('x%i'%i, i-1, i+1, i ))

default = cs.get_default_configuration()
print(cs.get_hyperparameters())
print(default.get_dictionary())
print(default.get_array())

Running above code, I get the following output (slightly reformatted to improve readability):

[   x0, Type: UniformFloat, Range: [-1.0, 1.0], Default: 0.0,
    x1, Type: UniformFloat, Range: [0.0, 2.0], Default: 1.0,
    x2, Type: UniformFloat, Range: [1.0, 3.0], Default: 2.0,
    x3, Type: UniformFloat, Range: [2.0, 4.0], Default: 3.0,
    x4, Type: UniformFloat, Range: [3.0, 5.0], Default: 4.0]
{'x2': 2.0, 'x3': 3.0, 'x4': 4.0, 'x0': 0.0, 'x1': 1.0}
[ 0.5  0.5  0.5  0.5  0.5]

The last line should be [0,1,2,3,4], but instead consists of 0.5 everywhere.

PCS parser crashes

when there are two conditions which affect the same child:

@1:0:restarts {F,L,D,x,+,no}[x]
@1:S:Luby:aryrestarts {1,2}[1]
@1:2:Luby:restarts [1,65535][1000]il
@1:2:Luby:restarts | @1:0:restarts in {L}
@1:2:Luby:restarts | @1:S:Luby:aryrestarts in {2}

via e-mail from @mlindauer

create configuration from HPOlib pkl

I want to create configuration from a HPOlib-pkl-file :

hpolib_pkl = cPickle.load(open(path_to_pkl,"r"))
config = configuration_space.Configuration(config_space, hpolib_pkl["trials"][0]["params"])

But it crashes with the error message:

Value 1.0, <type 'str'> for instantiation of hyperparameter 'random_forest:max_features, Type: UniformFloat, Range: [0.5, 5.0], Default: 1' is not a legal value

Did I miss something? Are the dictionaries for a parameter instantiation created by HPOlib in a different format than HPOlibConfigSpace expects?

The HPOlib dictionary looks as follows:

In [350]: hpolib_pkl["trials"][0]["params"]
Out[350]: OrderedDict([('classifier', 'random_forest'), ('imputation:strategy', 'mean'), ('preprocessor', 'None'), ('random_forest:bootstrap', 'True'), ('random_forest:criterion', 'gini'), ('random_forest:max_depth', 'None'), ('random_forest:max_features', '1.0'), ('random_forest:max_leaf_nodes', 'None'), ('random_forest:min_samples_leaf', '1'), ('random_forest:min_samples_split', '2'), ('random_forest:n_estimators', '100'), ('rescaling:strategy', 'min/max')])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.