首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

DOC2VEC:所涉及的参数以及WORD2VEC所涉及的参数

DOC2VEC:所涉及的参数 class gensim.models.doc2vec.Doc2Vec(documents=None, dm_mean=None, dm=1, dbow_words=0, dm_concat=0, dm_tag_count=1, docvecs=None, docvecs_mapfile=None, comment=None, trim_rule=None, **kwargs) Bases: gensim.models.word2vec.Word2Vec Class for training, using and evaluating neural networks described in http://arxiv.org/pdf/1405.4053v2.pdf Initialize the model from an iterable of documents. Each document is a TaggedDocument object that will be used for training. The documents iterable can be simply a list of TaggedDocument elements, but for larger corpora, consider an iterable that streams the documents directly from disk/network. If you don’t supply documents, the model is left uninitialized – use if you plan to initialize it in some other way. dm defines the training algorithm. By default (dm=1), ‘distributed memory’ (PV-DM) is used. Otherwise, distributed bag of words (PV-DBOW) is employed. Dm:训练算法:默认为1,指DM;dm=0,则使用DBOW。 size is the dimensionality of the feature vectors. · size:是指特征向量的维度,默认为100。大的size需要更多的训练数据,但是效果会更好. 推荐值为几十到几百。 window is the maximum distance between the predicted word and context words used for prediction within a document. window:窗口大小,表示当前词与预测词在一个句子中的最大距离是多少。 alpha is the initial learning rate (will linearly drop to min_alpha as training progresses). alpha: 是初始的学习速率,在训练过程中会线性地递减到min_alpha。

02

我对安全与NLP的实践和思考

通过对安全与NLP的实践和思考,有以下三点产出。首先,产出一种通用解决方案和轮子,一把梭实现对各种安全场景的安全检测。通用解决方案给出一类安全问题的解决思路,打造轮子来具体解决这一类问题,而不是使用单个技术点去解决单个问题。具体来说,将安全与NLP结合,在各种安全场景中,将其安全数据统一视作文本数据,从NLP视角,统一进行文本预处理、特征化、预训练和模型训练。例如,在Webshell检测中,Webshell文件内容,在恶意软件检测中,API序列,都可以视作长文本数据,使用NLP技术进行分词、向量化、预训练等操作。同理,在Web安全中,SQLi、XSS等URL类安全数据,在DNS安全中,DGA域名、DNS隧道等域名安全数据,同样可以视作短文本数据。因此,只要安全场景中安全数据可以看作单变量文本数据,这种通用解决方案和轮子就适用,轮子开源在我的github仓库FXY中,内置多种通用特征化方法和多种通用深度学习模型,以支持多种安全场景的特征化和模型训练,达到流水线式作业。

02
领券