用于计算ela特性的r包flacco的python接口。
pflacco的Python项目详细描述
pflacco:r包flacco的python接口
对于不喜欢R的人来说。
摘要
基于特征的连续和约束优化问题的景观分析现在也可以在python中使用。 这个包为pascal kerschke的r包flacco提供了一个python接口。 以下是原始flacco软件包的说明:
flacco is a collection of features for Explorative Landscape Analysis (ELA) of single-objective, continuous (Black-Box-)Optimization Problems. It allows the user to quantify characteristics of an (unknown) optimization problem's landscape.
Features, which used to be spread over different packages and platforms (R, Matlab, python, etc.), are now combined within this single package. Amongst others, this package contains feature sets, such as ELA, Information Content, Dispersion, (General) Cell Mapping or Barrier Trees.
Furthermore, the package provides a unified interface for all features -- using a so-called feature object and (if required) control arguments. In total, the current release (1.7) consists of 17 different feature sets, which sum up to approximately 300 features.
In addition to the features themselves, this package also provides visualizations, e.g. of the cell mappings, barrier trees or information content
设置
在python中通常很简单:
python -m pip install flacco
快速启动
frompflacco.pflaccoimportcreate_initial_sample,create_feature_object,calculate_feature_set,calculate_features# Arbitrary objective functiondefobjective_function(x,dim):return[entry[0]**2-entry[1]**2forentryinx]# Create inital sample using latin hyper cube samplingsample=create_initial_sample(100,2,type='lhs')# Calculate the objective values of the initial sample using an arbitrary objective function (here y = x1^2 - x2^2)obj_values=objective_function(sample,2)# Create feature objectfeat_object=create_feature_object(sample,obj_values,blocks=3)# Calculate a single feature setcm_angle_features=calculate_feature_set(feat_object,'cm_angle')print(cm_angle)# Calculate all featuresela_features=calculate_features(feat_object)print(ela_features)
联系人
我赞同并感谢每一次评论和参与。请在raphael.prager@uni-muenster.de下随时与我联系