Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression parameter problem #17

Open
wangsy15 opened this issue Jun 1, 2023 · 0 comments
Open

Regression parameter problem #17

wangsy15 opened this issue Jun 1, 2023 · 0 comments

Comments

@wangsy15
Copy link

wangsy15 commented Jun 1, 2023

Thank you for providing Python code, great work!
I am a beginner, and I attempted to reproduce the Background Inspiration system using the d_bacres1. txt and d_bacres2. txt files you provided, but failed. My code is attached below. I found that there are many parameters that can be set in ellyn(). Which are necessary? How can I determine the range of these parameters? At the same time, I found that the results of each run are random. Is there a way to fix the output results?
Looking forward to your reply, thank you!

from ellyn import ellyn
import numpy as np
import  pandas  as pd

df = pd.DataFrame()
#with open("D:\software\software\\anaconda3\envs\ellyn-master\data\\d_bacres1.txt") as file:
with open("d_bacres1.txt") as file:
    for item in file:
        data = np.array(list(map(float,item.split(',')))).reshape((3, 1)).T
        #print(item)
        data1 = pd.DataFrame(data)
        #df = df.append(data1,ignore_index=True)
        df = pd.concat([df, data1], ignore_index=True)
df1 = pd.DataFrame() #创建一个空的dataframe
#with open("D:\software\software\\anaconda3\envs\ellyn-master\data\\d_bacres2.txt") as file:
with open("d_bacres2.txt") as file:
    for item in file:
        data = np.array(list(map(float,item.split(',')))).reshape((3, 1)).T
        #print(item)
        data1 = pd.DataFrame(data)
        #df = df.append(data1,ignore_index=True)
        df1 = pd.concat([df1, data1], ignore_index=True)

inpu = df.iloc[:,1:3].values 
oupu = df.iloc[:,0].values

learner = ellyn(g=100, popsize=100, selection = 'tournament',tourn_size=4,cross_ar=0.8,mut_ar=0.2,verbosity=1,op_list=['n','v','+','-','*','/'])
learner.fit(inpu, oupu)
@wangsy15 wangsy15 changed the title Regression parameter problem and whether it is possible not to input derivatives Regression parameter problem Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant