Пример #1
0
    # x3 = x[:, 3]
    #
    # t = expr01
    # func0 = sympy.utilities.lambdify(terminals, t)
    # re = func0(*x.T)
    # p = BasePlot(font=None)
    # p.scatter(y, re, strx='Experimental $E_{gap}$', stry='Calculated $E_{gap}$')
    # import matplotlib.pyplot as plt
    #
    # plt.show()


if __name__ == '__main__':
    store = Store(r'C:\Users\Administrator\Desktop\band_gap_exp\4.symbol')
    data = Call(r'C:\Users\Administrator\Desktop\c', index_col=None)
    data_import = data.xlsx().sr

    X = data_import["delt_x"].values
    input_x = data_import[["delt_x", "G"]].values

    Pexp = data_import["Pexp"].values
    Pmix = data_import["Pmix"].values

    G = data_import["G"].values
    y = data_import["PG_y"].values
    y = y * G
    testfunc = input_x[:, 0] * input_x[:, 1]
    t = np.corrcoef(y, input_x[:, 0] * input_x[:, 1])

    dim1 = Dim([0, 0, 0, 0, 0, 0, 0])
    target_dim = [Dim([0, 0, 0, 0, 0, 0, 0])]
Пример #2
0
exps1 = exps1.subs(subbb1)
exps1 = exps1.subs(subbb2)
# exps1 = sympy.simplify(exps1)

exps2 = exps2.subs(subbb1)
exps2 = exps2.subs(subbb2)
# exps2 = sympy.simplify(exps2)

exps3 = exps3.subs(subbb1)
exps3 = exps3.subs(subbb2)
# exps3 = sympy.simplify(exps3)

from mgetool.imports import Call

data = Call(r'C:\Users\Administrator\Desktop\cl', index_col=None)
values_data = data.xlsx().values_data
E_values = values_data["E"].values
Rct_values = values_data["Rct"].values
Rp_values = values_data["Rp"]
taup_values = (values_data["Rp"] * values_data["Cp"]).values
R0_values = -(Rct_values**2 + Rct_values * Rp_values) / Rp_values
F_values = 96485
T_values = 298
R_values = 8.314
q_values = 8 * 10e-5

beta_values = 0.5

std_Rct = np.std(Rct_values)
std_taup = np.std(taup_values)
std_R0 = np.std(R0_values)
Пример #3
0
import matplotlib.pyplot as plt
import numpy as np
import sklearn
from bgp.selection.backforward import BackForward
from mgetool.exports import Store
from mgetool.imports import Call
from sklearn import svm
from sklearn.model_selection import GridSearchCV, LeaveOneOut

warnings.filterwarnings("ignore")

# 数据导入
store = Store(r'/data/home/wangchangxin/data/zlj/')
data = Call(r'/data/home/wangchangxin/data/zlj/', index_col=None)
all_import = data.xlsx().data

x_name = all_import.index.values
y = all_import["y"].values
x_frame = all_import.drop("y", axis=1)
x = x_frame.values
# # 预处理
# minmax = MinMaxScaler()
# x = minmax.fit_transform(x)
# 数据划分
xtrain, xtest = x[3:], x[:3]
ytrain, ytest = y[3:], y[:3]

xtrain, ytrain = sklearn.utils.shuffle(xtrain, ytrain, random_state=3)

# x = minmax.inverse_transform(x_new)
Пример #4
0
                                   mutpb=mutpb,
                                   ngen=ngen,
                                   stats=stats,
                                   halloffame=hof,
                                   pset=pset,
                                   store=store)

    return hof


if __name__ == '__main__':
    # 输入
    store = Store(r'D:\sy')
    data = Call(r'D:\sy')

    data_import = data.xlsx().featuredata
    name_abbr = data_import.columns.values
    x_name = name_abbr[:-1]
    # data_import = data_import.iloc[np.where(data_import['f1'] <= 1)[0]]

    X_frame = data_import[x_name]
    y_frame = data_import['y']

    X = X_frame.values
    y = y_frame.values

    # 处理
    # scal = preprocessing.MinMaxScaler()
    # X = scal.fit_transform(X)

    X, y = shuffle(X, y, random_state=0)