fs陈晓亮

请问astype(float)报错如何解决?

请问astype(float)报错是什么原因?如何解决?

fs陈晓亮

2022-06-15

0.0000 0 1
  • 关注作者
  • 收藏

Sklearn聚类算法之Agglomerative Clustering

请问有人用过Sklearn聚类算法之Agglomerative Clustering吗?有没有模型的使用方法呢?

fs陈晓亮

2022-06-07

0.0000 1 0
  • 关注作者
  • 收藏

python绘制地图

QQ图片20211024132042.jpg请问为什么我有5个数值,但是地图显示只有4个点的?

fs陈晓亮

2021-10-24

0.9922 1 1
  • 关注作者
  • 收藏

power view无法加载

已安装插件IntelVideo[g1d658ww],但power view无法加载。

fs陈晓亮

2021-07-03

64.8406 2 1
  • 关注作者
  • 收藏

为什么seaborn画出的图是空白的?

import seaborn as snsscatter = sns.pairplot(data=drug_csv, x_vars=['Na'], y_vars=['K'], hue='Drug', height=7)scatter.set(ylim=(0.02,0.08))

fs陈晓亮

2021-04-16

199.7757 1 17
  • 关注作者
  • 收藏

字典根据值筛选key

dict2:{'一起': 0.20100756305184242, '万块': 0.20100756305184242, '三人': 0.20100756305184242, '下海经商': 0.20100756305184242, '东挪西撮': 0.10050378152592121, '事对': 0.10050378152592121, '以沫': 0.10050378152592121,

fs陈晓亮

2021-03-31

300.0000 1 4
  • 关注作者
  • 收藏

怎样用正则表达式分别保留文本数据中的中文,英文和数字?

怎样用正则表达式分别保留文本数据中的中文,英文和数字?

fs陈晓亮

2021-03-25

92.2756 1 12
  • 关注作者
  • 收藏

英文分词报错

QQ图片20210324114041.pngfrom nltk.tokenize import word_tokenizestring=df['title'][0]string#输出结果为'Economy Gains 227,000 Jobs in January Under President Trump - Breitbart'word_tokenize(string)报错提示为-------

fs陈晓亮

2021-03-24

92.2756 1 8
  • 关注作者
  • 收藏

词根还原WordNetLemmatizer报错

1.png2.pngimport nltknltk.download()from nltk.stem import SnowballStemmerfrom nltk.stem import WordNetLemmatizerwnl = WordNetLemmatizer()wnl.lemmatize('countries')报错提示如下:------------------------------

fs陈晓亮

2021-03-19

300.0000 1 5
  • 关注作者
  • 收藏

过抽样1的比例

假设一个数据集,0和1的比例是12:1,用smote类进行过抽样,一般1的比例应该提升到多少,smote的默认值是1:1。

fs陈晓亮

2021-03-18

109.0909 1 9
  • 关注作者
  • 收藏

SMOTE(random_state=0,ratio={1:10000})的ratio参数设置失败

TypeError Traceback (most recent call last) in ----> 1 smote=SMOTE(random_state=0,ratio={1:10000}) 2 x_smote,y_smote=smote.

fs陈晓亮

2021-03-14

68.3351 1 1
  • 关注作者
  • 收藏

AttributeError:'feature_select' object has no attribute 'select_list' 代码不明白为什么报错

def get_kind(x: pd.Series, diff_limit: int = 10): x = x.astype('str') x = x.str.extract(r'(^(\-|)(?=.*\d)\d*(?:\.\d*)?$)')[0] x.dropna(inplace=True) if x.nunique() > diff_limit: kin

fs陈晓亮

2021-03-14

68.3351 1 4
  • 关注作者
  • 收藏

使用xgboost模型填补缺失值时报错

fit的时候报错了,报错原因为ValueError: The label must consist of integer labels of form 0, 1, 2, ..., [num_class - 1].请问怎么解决?代码.docxdata.xlsximport pandas as pdimport numpy as npimport matplotlib.pyplot as plt%ma

fs陈晓亮

2021-03-04

80.0000 1 9
  • 关注作者
  • 收藏