
DataMining & MachineLearning
BrownWong
None
展开
-
禁止keras预分配GPU内存
keras使用theano或者tensorflow作为后端时,都会预分配GPU内存,即先占满当前GPU的所有内存,而你使用nvidia-smi显示的就是预分配的GPU内存,往往是满的。如果你不想要程序预分配内存,即需要多少内存就动态分配多少内存时,你就需要如下设置:import tensorflow as tfimport keras.backend.tensorflow_backend as K原创 2018-01-16 11:20:08 · 1419 阅读 · 0 评论 -
CRF++之txt模型详解
例子解析下面是一个crfpp训练出来的txt模型样例:version: 100cost-factor: 1maxid: 2978536xsize: 1BEMOU00:%x[-3,0]U01:%x[-2,0]U02:%x[-1,0]U03:%x[0,0]U04:%x[1,0]U05:%x[2,0]U06:%x[3,0]U07:%x[-3,0]/%x[-2原创 2018-01-30 21:14:25 · 870 阅读 · 2 评论 -
用keras搭建bilstm crf
# coding: utf-8from keras.models import Sequentialfrom keras.layers import Embeddingfrom keras.layers import LSTMfrom keras.layers import Bidirectionalfrom keras.layers import Densefrom keras.lay原创 2018-01-04 13:38:14 · 20712 阅读 · 10 评论 -
CRF++相关
本文只是补充,更详细关于CRF++信息请参考:CRF++: Yet Another CRF toolkit1. 特征模板CRF++的特征模板:unigram模板会生成状态特征;(包含单特征和组合特征)bigram模板即转移特征。一个模板(unigram模板文件中的一行)会生成 L*N个特征函数,这里L是输出类标种类数,N是模板表示的唯一字符串个数。比如对于%x[0,1],假设第1列特征表示词性原创 2017-11-03 17:54:53 · 415 阅读 · 0 评论 -
Caffe在Ubuntu下配置
ubuntu16.04+cuda8.0+cudnn8.0+caffe 具体的版本由自己电脑决定 Ubuntu-16.04.1-desktop-amd64 (64位ubuntu) cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb cudnn-8.0-linux-x64-v5.1.tgz caffe-master直接GPU版本的配置 首先是安原创 2017-04-13 16:05:52 · 543 阅读 · 0 评论 -
文本分类
文本分类:预处理特征选择 DF (Document Frequency)信息增益 (Information Gain, IG)熵 (Entropy)相对熵 (Relative Entropy)χ² 统计量 (Chi-Square)互信息 (Mutual Information)Robertson & Sparck Jones公式发生比 (Odds)Term Strength性原创 2016-11-01 12:38:39 · 10959 阅读 · 1 评论 -
tensorflow MLP
多层感知机分类# -*- coding: utf-8 -*-import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_dataimport matplotlib.pyplot as plt# 获得训练数据mnist = input_data.read_data_sets("MNIST_data/原创 2017-02-01 13:52:27 · 1226 阅读 · 0 评论 -
tensorflow逻辑回归
# -*- coding: utf-8 -*-import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data__author__ = 'BrownWong'# 获得训练数据mnist = input_data.read_data_sets("MNIST_data/", one_hot=True原创 2017-01-31 23:20:15 · 638 阅读 · 0 评论 -
tensorflow线性回归
# -*- coding: utf-8 -*-import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt__author__ = 'BrownWong'# 产生数据number_of_points = 200x_point = []y_point = []a = 0.22b = 0.78for i原创 2017-01-30 22:26:51 · 404 阅读 · 0 评论 -
Tensorflow tensor操作代码片
1. 计算加法# -*- coding: utf-8 -*-import tensorflow as tf__author__ = 'Brown'"""计算加法"""x = tf.constant(1, name='x')y = tf.Variable(x+9, name='y')model = tf.initialize_all_variables()with tf.Session(原创 2017-01-30 15:56:26 · 517 阅读 · 0 评论 -
control confounding in study
如何判断两个现象的因果关系 著作权归作者所有。 商业转载请联系作者获得授权,非商业转载请注明出处。 作者:程毅南 链接:https://www.zhihu.com/question/20532054/answer/15399462 来源:知乎 简化版:1. 两件事(A与B)相互关联(Association)2. A的发生可以预测B的发生(Prediction)3.转载 2016-02-22 11:20:10 · 949 阅读 · 0 评论 -
Data dredging
基本概念 Data dredging, sometimes referred to as “data fishing” is a data mining practice in which large volumes of data are analyzed seeking any possible relationships between data. The traditional scie转载 2016-02-22 09:21:28 · 851 阅读 · 0 评论 -
Multiple comparisons problem
维基百科 多重比较谬误(Multiple Comparisons Fallacy),是一种概率谬误,系指广泛比较二个不同群体的所有差异,从中找出具有差异的特征,然后宣称它就是造成二个群体不同的原因。知乎 著作权归作者所有。 商业转载请联系作者获得授权,非商业转载请注明出处。 作者:stevenliuyi 链接:https://www.zhihu.com/questi转载 2016-02-21 22:04:43 · 2291 阅读 · 0 评论 -
multi-way-array-aggregation
http://slidewiki.org/deck/1562_multi-way-array-aggregation#tree-0-deck-1562-1-view转载 2015-12-12 20:43:56 · 414 阅读 · 0 评论 -
gensim训练词向量word2vec
1. gensim的word2vec简单使用Code Example:from gensim.models import word2vecsents = ['I am a good student'.split(),'Good good study day day up'.split()]model = word2vec.Word2Vec(sents, size=100,原创 2018-01-18 18:42:38 · 5565 阅读 · 2 评论