GithubHelp home page GithubHelp logo

ck8275411 / metapath2vec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from myazi/metapath2vec

0.0 0.0 0.0 593 KB

License: Apache License 2.0

Shell 5.30% C++ 21.07% Python 24.46% C 47.96% Makefile 1.20%

metapath2vec's Introduction

Metapath2vec介绍

Metapath2vec是一种node2vec向量表示方法. 首次提出了在异构网络上通过元路径游走(metapath)的方式生成游走序列(训练样本),同word2vec类似以最大化同构边𝑁𝑡(𝑉)下node上下文共现概率为目标,使用skip-gram模型和负采样方式学习损失函数.

matepath2vec

数据

源数据:./data/zhengpai_tuwen

data

二部图数据:./data/net_train

随机游走序列:./data/in_train

结果向量:./data/out_train

使用

sh run.sh

构建网络

通过作者->文章->文章tag数据生成作者&文章tag的二部图(也可以保留文章,学习文章向量),维护id映射关系、作者到tag和tag到作者两个map数据结构

随机游走生成序列样本

通过作者&tag的二部图,以及作者到tag和tag到作者map,随机游走出 author1->tag1->author2->tag2->...->authorn->tagn

metapath2vec训练

使用word2vec方式训练产出所有author和tag的向量表示

相似性测试与评估

metapath2vec's People

Contributors

myazi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.