![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
sesiria
这个作者很懒,什么都没留下…
展开
-
MatchZoo 文本匹配工具包
MatchZoo是封装了一系列文本匹配的框架包含以下算法:官网地址:https://github.com/kouunn/MatchZooModel Detail:1. DRMMthis model is an implementation ofA Deep Relevance Matching Model for Ad-hoc Retrieval.model file: mo...原创 2019-11-24 09:39:42 · 958 阅读 · 0 评论 -
基于论文[From Word Embedding to Document Distance]的实验
代码参考:https://github.com/mkusner/wmd一,准备环境安装好anaconda笔者这里用的是python3 64bit的版本需要用到这个库,gensimconda install -c conda-forge gensim从参考代码的仓库上下载WMD代码:git clone git@github.com:mkusner/wmd.git...原创 2019-10-26 17:46:44 · 275 阅读 · 0 评论 -
[转] Python使用matplotlib,numpy,scipy进行散点的平滑曲线化方法
首先给出一个没有smooth过的曲线import matplotlib.pyplot as pltimport numpy as npT = np.array([6, 7, 8, 9, 10, 11, 12])power = np.array([1.53E+03, 5.92E+02, 2.04E+02, 7.24E+01, 2.72E+01, 1.10E+01, 4.70E+00]...转载 2019-10-19 20:43:36 · 1421 阅读 · 0 评论 -
Windows 7 64bit + Python 3.7.3 + Anaconda 3 安装Xgboost库
网上搜了一圈,各种安装Xgboost的方法都有,有自己下源码编译用Cmake+Windows SDK编译,或者用mingw-64编译,然后配环境的。甚至笔者自己下载二进制文件安装的都失败了。https://xgboost.readthedocs.io/en/latest/build.html#building-on-windows这文档里介绍的用mingw编译的xgboost,由于wind...原创 2019-10-06 22:10:49 · 356 阅读 · 0 评论 -
Pandas Numpy reference
for Pandas:https://pandas.pydata.org/pandas-docs/stable/getting_started/10min.htmlNumpy:http://jalammar.github.io/visual-numpy/原创 2019-10-01 14:09:06 · 189 阅读 · 0 评论 -
转: 局部敏感哈希(Locality sensitive hash)
原理解释:https://blog.csdn.net/chichoxian/article/details/80290782代码实现https://blog.csdn.net/chichoxian/article/details/80408094转载 2019-09-30 16:47:40 · 161 阅读 · 0 评论 -
Algorithm: Logistic Regression and Gradient Descent
The most classic model in machine learning : Logistic Regression.Some problems for two class classifyLogistic Regression is a base line for classify problemWhen we design a model for machine...原创 2019-09-29 15:57:35 · 694 阅读 · 0 评论 -
Algorithm: Linear Regression
The Linaer Regression with the properties:the decision boundary is linearit is a regression moedl to predict the value respect to the input data1. visualize the input feature with the related ...原创 2019-09-29 09:33:11 · 268 阅读 · 0 评论 -
Algorithm: Principle Component Analysis for High Dimension Reduction Data
The data preprocessing as standarlization or feature Scaling:https://en.wikipedia.org/wiki/Feature_scalingBefore we implement PCA, we will need to do some data preprocessing. In this assessment, s...原创 2019-09-24 12:41:05 · 935 阅读 · 0 评论 -
Algorithm: k-nearest neighbors and decison boundary(Cross Validation)
KNN Algorithm implementationreference:https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithmfrom matplotlib.colors import ListedColormapfrom sklearn import neighbors, datasetsiris = datas...原创 2019-09-18 14:52:32 · 418 阅读 · 0 评论 -
scipy curve_fit 使用例子
一个使用curve_fit来模拟曲线的例子# From https://docs.scipy.org/import numpy as npimport matplotlib.pyplot as pltfrom scipy.optimize import curve_fit# Define func of parameters a, b, c and variable xdef f...原创 2019-09-13 12:54:11 · 2575 阅读 · 0 评论 -
Algorithm :Gaussian Elimination for Matrix
最近在review linear Algebra, 高斯消元法来求梯形矩阵感觉很有用。就自己写了一个代码,实现如下:by python:# by sesiria 2019# algorithm for Gaussian Elimination for square matrix.import numpy as npclass MatrixIsSingular(Excepti...原创 2019-08-16 10:29:54 · 618 阅读 · 0 评论 -
Algorithm PageRank with eigenvalues and eigenvector
A python implementation with dampling factor for PageRank algorithm.# PACKAGE# Here are the imports again, just in case you need them.# There is no need to edit or submit this cell.import numpy ...原创 2019-08-25 11:56:47 · 536 阅读 · 0 评论 -
Algorithm for Gram-Schmidt Transform
Gram-Schmidt 算法的主要目的是将矩阵转换为Orthonormal Matrix# GRADED FUNCTIONimport numpy as npimport numpy.linalg as laverySmallNumber = 1e-14 # That's 1×10⁻¹⁴ = 0.00000000000001# Our first function wil...原创 2019-08-20 09:44:13 · 722 阅读 · 0 评论 -
python实现的简单html文本转纯text
一个python实现的简单转html转纯text的函数import refrom html import unescapedef html_to_plain_text(html): text = re.sub('<head.*?>.*?</head>', '', html, flags=re.M | re.S | re.I) text = ...原创 2019-04-03 09:47:34 · 7165 阅读 · 2 评论 -
转 VSCode配置python调试环境
转载自:https://www.cnblogs.com/qdscwyy/p/7756694.html 1.下载python解释器python 3.6.3 for windows安装到系统某个路径例如C:\Python36最好添加到Path,也可以不加2.在VSCode市场中安装Python插件3.同样是打开一个文件夹,新建一个.py文件4.同样是launch.json文...转载 2018-12-05 11:54:33 · 1475 阅读 · 0 评论 -
你是如何自学 Python 的?
转自知乎:https://www.zhihu.com/question/20702054这是我在过去几家公司招聘到工程师,Python入职培训的过程。时间分为4周,全部自学,仅提供大纲。适用于Web方向:1、Week1:读完《简明Python教程》,适应Python开发环境2、Week2:写个爬虫,需要深入了解re、urllib2、sqlite3、threading,Queue等几个模块。需要用上...转载 2018-03-13 21:38:03 · 370 阅读 · 0 评论