上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 53 下一页
摘要: 因为注释已经很详细了,所以直接上代码: 1 from sklearn.datasets import load_iris 2 from sklearn.model_selection import train_test_split 3 #k临近算法 4 from sklearn.neighbors 阅读全文
posted @ 2020-03-23 23:46 博二爷 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 切词: 1 from pyhanlp import * 2 content = "现如今,机器学习和深度学习带动人工智能飞速的发展,并在图片处理、语音识别领域取得巨大成功。" 3 CoreStopWordDictionary = JClass("com.hankcs.hanlp.dictionary 阅读全文
posted @ 2020-03-23 22:58 博二爷 阅读(1620) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 # -*- coding:UTF-8 -*- 2 from numpy import * 3 import jieba as jb 4 import time 5 # 计算权值,并存储为txt 6 # 计算所有文本包含的总词数 7 def wordsCount(dataSet): 8 w 阅读全文
posted @ 2020-03-19 11:33 博二爷 阅读(528) 评论(0) 推荐(0) 编辑
摘要: 因为里面有很详细的解释,所以就不做过多阐释: 1 from pyhanlp import * 2 import numpy as np 3 import re 4 5 '''创建数据集:单词列表postingList, 所属类别classVec''' 6 def Handle_data(conten 阅读全文
posted @ 2020-03-14 22:07 博二爷 阅读(552) 评论(0) 推荐(0) 编辑
摘要: 只需要: 1 im = Image.fromarray(np.uint8(“你的数组”)) 2 im.convert('RGB').save("MY.jpg",format = 'jpeg') 阅读全文
posted @ 2020-03-14 17:53 博二爷 阅读(1271) 评论(0) 推荐(0) 编辑
摘要: 简单分词: 1 from pyhanlp import * 2 content = "现如今,机器学习和深度学习带动人工智能飞速的发展,并在图片处理、语音识别领域取得巨大成功。" 3 Get_value=HanLP.segment(content) 4 print(Get_value) 输出: 加词 阅读全文
posted @ 2020-03-14 17:51 博二爷 阅读(701) 评论(0) 推荐(1) 编辑
摘要: 代码: 1 import scipy.stats as ss 2 3 obs=[107,198,192,125,132,248]#真实值 4 exp=[167]*6#期望值 5 ''' 6 关于p值意义: 7 P>0.05 碰巧出现的可能性大于5% ,不能否定无效假设,两组差别无显著意义 8 P<0 阅读全文
posted @ 2020-03-11 19:24 博二爷 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 2 # encoding: utf-8 3 4 """ 5 @author: zkjiang 6 @site: https://www.github.com 7 @software: PyCharm 8 @file: TFIDF.py 9 @time: 阅读全文
posted @ 2020-03-10 23:52 博二爷 阅读(653) 评论(1) 推荐(0) 编辑
摘要: 思路: 1、查找指定字段如(公司名称) 2、根据公司名称,从后往前,慢慢提取 public static String Get_code(String dy_name,String table_name) throws SQLException { String code=""; int len=d 阅读全文
posted @ 2020-03-10 18:01 博二爷 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 #urllib is used to download the utils file from deeplearning.net 2 import urllib.request 3 response = urllib.request.urlopen('http://deeplearnin 阅读全文
posted @ 2020-03-08 22:29 博二爷 阅读(559) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 53 下一页