from featurebox.symbol.base import SymbolSet, SymbolTree from featurebox.symbol.functions.dimfunc import Dim, dless from featurebox.symbol.calculation.translate import group_str, compile_context, general_expr_dict from featurebox.symbol.flow import MutilMutateLoop, OnePointMutateLoop from featurebox.symbol.preprocess import MagnitudeTransformer from featurebox.tools.exports import Store from featurebox.tools.imports import Call from featurebox.tools.tool import tt if __name__ == "__main__": import os os.chdir(r'band_gap') data = Call() all_import = data.csv().all_import name_and_abbr = data.csv().name_and_abbr store = Store() data_import = all_import data225_import = data_import select = [ 'cell volume', 'cell density', 'lattice constants a', 'lattice constants c', 'covalent radii', 'ionic radii(shannon)', 'core electron distance(schubert)', 'fusion enthalpy', 'cohesive energy(Brewer)', 'total energy', 'effective nuclear charge(slater)', 'valence electron number', 'electronegativity(martynov&batsanov)', 'atomic volume(villars,daams)' ]
from featurebox.selection.exhaustion import Exhaustion from featurebox.selection.quickmethod import dict_method_reg from featurebox.tools.exports import Store from featurebox.tools.imports import Call from featurebox.tools.show import BasePlot from featurebox.tools.tool import name_to_name warnings.filterwarnings("ignore") """ this is a description """ if __name__ == "__main__": store = Store( r'C:\Users\Administrator\Desktop\band_gap_exp\3.sum\method', ) data = Call(r'C:\Users\Administrator\Desktop\band_gap_exp') data_import = data.csv().all_import name_init, abbr_init = data.pickle_pd().name_and_abbr select = [ 'cell volume', 'electron density', 'lattice constants a', 'lattice constants c', 'radii covalent', 'radii ionic(shannon)', 'distance core electron(schubert)', 'latent heat of fusion', 'energy cohesive brewer', 'total energy', 'charge nuclear effective(slater)', 'valence electron number', 'electronegativity(martynov&batsanov)', 'volume atomic(villars,daams)' ] select = [ 'cell volume', 'electron density', ] + [j + "_%i" % i for j in select[2:] for i in range(2)]
from sklearn.ensemble import RandomForestRegressor, AdaBoostRegressor from sklearn.feature_selection import RFECV from sklearn.linear_model import BayesianRidge from sklearn.model_selection import GridSearchCV from sklearn.preprocessing import MinMaxScaler from sklearn.tree import DecisionTreeRegressor from featurebox.featurizers.compositionfeaturizer import WeightedAverage from featurebox.selection.corr import Corr from featurebox.tools.exports import Store from featurebox.tools.imports import Call # 数据导入 store = Store(r'C:\Users\Administrator\Desktop\skk') data = Call(r'C:\Users\Administrator\Desktop\skk') all_import = data.csv().skk # """for element site""" element_table = pd.read_excel( r'C:\Users\Administrator\Desktop\band_gap_exp\element_table.xlsx', header=4, skiprows=0, index_col=0) element_table = element_table.iloc[5:, 7:] # 其他数据获取 feature_select = [ 'lattice constants a', 'lattice constants b', 'lattice constants c', 'radii atomic(empirical)',