摘要:
# coding-utf-8 import numpy as np import pandas as pd import matplotlib.pyplot as plt import random import pickle class LR: def __init__(self, data, l 阅读全文
摘要:
-i https://pypi.tuna.tsinghua.edu.cn/simple 配置全局清华源 python -m pip install --upgrade pip pip config set global.index-url https://pypi.tuna.tsinghua.edu 阅读全文
摘要:
在file中找到settings,再找project Interpret。确认pycharm的环境变量包含python的安装环境。 如果project Interpreter中出现下你安装过的numpy和opencv-python信息,在pycharm中导入import cv2就成功了。 阅读全文
摘要:
https://www.cnblogs.com/chenxi188/p/10862503.html 阅读全文
摘要:
def hmm_viterbi(A,B,pi,O): δ = np.zeros((len(O),len(A))) #第一个局部 Ψ = np.zeros((len(O),len(A))) #第二个局部 # 1、初始化t=1时刻维特比的两个局部变量 δ[0] = pi*B[:,O[0]] # 2、递归 阅读全文
摘要:
#coding=utf-8 import numpy as np import os import random from tfidf_model import TfIdf # a = np.array([0, 1, 2, 3, 1, 2, 2]) # print(a[[2,4,2,2,2,2]]) 阅读全文
摘要:
#coding=utf-8 import numpy as np import jieba class TfIdf: def __init__(self,doc): self.doc = doc self.get_dic() def get_dic(self): stop_path = 'stop_ 阅读全文
摘要:
文章参照 链接:https://www.cnblogs.com/pinard/p/6945257.html # coding=utf-8 import re import numpy as np class Hmm(object): def __init__(self, train_path): s 阅读全文
摘要:
https://www.cnblogs.com/xzh0717/p/11717854.html#/c/subject/p/11717854.html 阅读全文
摘要:
1.求和 items.stream().mapToLong(object::get).sum() 2.字符集拆分为id package cn.fw.finance.common.util; import java.util.Collection; import java.util.HashSet; 阅读全文