GA_for_Feature_Selection
使用遗传算法结合决策树做特征选择
Using genetic algorithm for feature selection with decision tree
原始遗传算法参考
import numpy as np
import pandas as pd
import random
data_train = pd.read_csv('\data_train.csv')
data_test = pd.read_csv('\data_test.csv')
#合并训练集测试集
data = data_train.append(data_test).drop(['id'], axis=1)
feature_names = data.columns
pop_size = 20 # 种群数量
max_value = 10 #
1