摘要: 一、anaconda安装记录 1.1 下载安装脚本:wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh 1.2 运行安装向导:bash Anaconda3-5.2.0-Linux-x86_64.sh 1.3 确 阅读全文
posted @ 2019-02-15 18:11 在下小白 阅读(1157) 评论(0) 推荐(0) 编辑
摘要: 参考博客:https://zhuanlan.zhihu.com/p/35356992 https://zhuanlan.zhihu.com/p/25707761 https://www.zhihu.com/question/37096933/answer/70426653 首先正则化项一般是模型复杂 阅读全文
posted @ 2018-12-04 16:35 在下小白 阅读(1700) 评论(0) 推荐(0) 编辑
摘要: 最近打比赛,apply操作极慢,队友使用了线程池,用多核开辟多线程跑,加速。 在阿里平台上,都没问题。 我是win10系统+jupyter notebook 多线程那个模块运行,会显示一直运行,p.close()会被卡死 这是linux的写法 在Windows上要想使用进程模块,就必须把有关进程的代 阅读全文
posted @ 2018-12-03 21:08 在下小白 阅读(6550) 评论(0) 推荐(0) 编辑
摘要: scipy.sparse.hstack(blocks, format=None, dtype=None)[source]¶ Stack sparse matrices horizontally (column wise) sequence of sparse matrices with compat 阅读全文
posted @ 2018-10-11 16:58 在下小白 阅读(413) 评论(0) 推荐(0) 编辑
摘要: for feature in short_cate_feature: enc.fit(data[feature].values.reshape(-1, 1)) base_train_csr = sparse.hstack((base_train_csr, enc.transform(train_x[ 阅读全文
posted @ 2018-10-10 17:30 在下小白 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 今天在计算机矩阵相关性,准备删除相关性高的列中,出现了这样的问题: During handling of the above exception, another exception occurred: 问题原因又说python版本过高,我确实是3.7有点高,还有其他的。 不清楚,直接import 阅读全文
posted @ 2018-10-08 21:43 在下小白 阅读(27495) 评论(1) 推荐(0) 编辑
摘要: def get_feature(df,all_data,cols,vec_col): enc = OneHotEncoder() df_x=np.int64(df[cols]) cv=CountVectorizer() for feature in vec_col: cv.fit(all_data[ 阅读全文
posted @ 2018-10-07 01:27 在下小白 阅读(2889) 评论(0) 推荐(0) 编辑
摘要: 原博客: https://blog.csdn.net/lanchunhui/article/details/72794317 数据集: [[0, 0, 3], [1, 1, 0], [0, 2, 1], [1, 0, 2]] 每一列代表一个属性,fit 操作之后: 对象enc的n_values_成员 阅读全文
posted @ 2018-09-20 20:10 在下小白 阅读(1182) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-20 19:57 在下小白 阅读(752) 评论(0) 推荐(0) 编辑
摘要: 老师搞不清,一个ndarray[df['columns']==a],返回的是什么,目前看来应该是df[] == a 的索引 阅读全文
posted @ 2018-09-17 21:45 在下小白 阅读(163) 评论(0) 推荐(0) 编辑