from featurebox.selection.corr import Corr from mgetool.exports import Store from mgetool.imports import Call from mgetool.show import corr_plot from mgetool.tool import name_to_name # import seaborn as sns if __name__ == "__main__": import os os.chdir(r'band_gap') store = Store() data = Call() all_import = data.csv().all_import name_and_abbr = data.csv().name_and_abbr data_import = all_import data225_import = data_import X_frame = data225_import.drop(['exp_gap'], axis=1) y_frame = data225_import['exp_gap'] X = X_frame.values y = y_frame.values # # """calculate corr""" corr = Corr(threshold=0.90, muti_grade=2, muti_index=[2, len(X)]) corr.fit(X_frame) cof_list = corr.count_cof() # """get x_name and abbr"""
this is a description """ import numpy as np import pandas as pd from bgp.selection.corr import Corr from mgetool.exports import Store from mgetool.imports import Call from mgetool.tool import name_to_name # import seaborn as sns if __name__ == "__main__": store = Store(r'C:\Users\Administrator\Desktop\band_gap_exp\2.corr') data = Call(r'C:\Users\Administrator\Desktop\band_gap_exp') all_import = data.csv().all_import name_init, abbr_init = data.pickle_pd().name_and_abbr data_import = all_import data225_import = data_import.iloc[np.where( data_import['group_number'] == 225)[0]] X_frame = data225_import.drop(['exp_gap', 'group_number'], axis=1) y_frame = data225_import['exp_gap'] X = X_frame.values y = y_frame.values """calculate corr""" corr = Corr(threshold=0.90, muti_grade=2, muti_index=[2, len(X)]) corr.fit(X_frame) cof_list = corr.count_cof() """get x_name and abbr"""
import numpy as np from mgetool.exports import Store from mgetool.imports import Call from mgetool.tool import tt from bgp.base import SymbolSet from bgp.skflow import SymbolLearning if __name__ == "__main__": import os os.chdir(r'band_gap') data = Call() name_and_abbr = data.csv().name_and_abbr SL_data = data.SL_data si_transformer = data.si_transformer store = Store() x, x_dim, y, y_dim, c, c_dim, X, Y = SL_data x_g = np.arange(x.shape[1]) x_g = list(x_g[1:]) x_g = x_g.reshape(-1, 2) pset0 = SymbolSet() pset0.add_features(x, y, x_dim=x_dim, y_dim=y_dim, x_group=x_g) pset0.add_constants(c, c_dim=c_dim, c_prob=0.05) pset0.add_operations(power_categories=(2, 3, 0.5, 1 / 3, 4, 1 / 4), # categories=("Mul",), categories=("Add", "Mul", "Sub", "Div", "exp", "ln"),