![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
qq_41823101
不会打代码
展开
-
python pandas报错'Series' object has no attribute 'reshape'解决办法
python pandas报错’Series’ object has no attribute 'reshape’ 数据归一化时候的错误: data = pd.read_csv("creditcard.csv") data['normAmount'] = StandardScaler().fit_transform(data['Amount'].reshape(-1, 1)) 在这里我们先可以...原创 2020-05-07 10:53:19 · 3565 阅读 · 0 评论 -
Python实现遗传算法求函数最值
Python实现遗传算法求函数最值 详细源代码:GA.py 1、算法过程图解 2、详细过程举例说明 (1)待求解方程 (2)确定编码方案 主要是确定编码长度: def segment_length(self): length = [] precision =[] for i in self.variable_range: ...原创 2020-04-28 20:18:13 · 7386 阅读 · 0 评论