cavalab / srbench

A living benchmark framework for symbolic regression
https://cavalab.org/srbench/
GNU General Public License v3.0
203 stars 74 forks source link

Competition2022---Only update the submission/TaylorGP folder #107

Closed KGAE-CUP closed 2 years ago

KGAE-CUP commented 2 years ago

Competition Checklist:

I have verified that:

Refer to the competition guide if you are unsure about any steps. If you don't find an answer, ping us!

lacava commented 2 years ago

@KGAE-CUP check my PR to your fork : https://github.com/KGAE-CUP/srbench/pull/2

need to rebase again to resolve conflicts/ updates to CI

KGAE-CUP commented 2 years ago

@KGAE-CUP check my PR to your fork : KGAE-CUP#2

need to rebase again to resolve conflicts/ updates to CI

@lacava OK, Thank you for your reply! The above test code is in numpy format and there is no variable name, so it reported an error when I added the code of variable name replacement. If I delete the variable name replacement code, will it affect the later real competition?

janoPig commented 2 years ago

@KGAE-CUP I think the mapping should be like this for k, v in reversed(mapping.items()): because x_1 replace x_10 to someName0 and x_11 to someName1

lacava commented 2 years ago

The above test code is in numpy format and there is no variable name, so it reported an error when I added the code of variable name replacement. If I delete the variable name replacement code, will it affect the later real competition?

yes, the function returned needs to use the correct variable names. see @janoPig 's comment. to add detail it should be something like

def model(est, X):
    mapping = {'x_'+str(i):k for i,k in enumerate(X.columns)}
    new_model = est.model_
    for k,v in reversed(mapping.items()):
        new_model = new_model.replace(k,v)