Git Product home page Git Product logo

dynamictriad's People

Contributors

luckiezhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dynamictriad's Issues

boost_pylib

I know how to assign boostroot but CMake cannot detect the value of boost_pylib. Could you please help me?

I got the following errors:

/usr/bin/ld: cannot find -lboost_python-2.7
collect2: error: ld returned 1 exit status
CMakeFiles/mygraph.dir/build.make:188: recipe for target 'mygraph.so' failed
make[2]: *** [mygraph.so] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/mygraph.dir/all' failed
make[1]: *** [CMakeFiles/mygraph.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

Appreciated in advance :)

error at bash build.sh

Excuse me, after I read your paper, your works are so cheerful & interesting. Hence I want to implement it, to see the progress. so I follow your "read.me" instruction. But when I dealing with the environment, the cmake always annoyed me. Now, the problem is:

Scanning dependencies of target dynamic_triad [ 50%] Building CXX object CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0, from /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:2: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it by " \ ^ /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:8:22: fatal error: Eigen/Core: No such file or directory compilation terminated. CMakeFiles/dynamic_triad.dir/build.make:62: recipe for target 'CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o' failed make[2]: *** [CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/dynamic_triad.dir/all' failed make[1]: *** [CMakeFiles/dynamic_triad.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

My platform is aliyun server, Ubuntu16.04 and python2.7.
I have been google this problem but it seems didn't work.
So, can you help me to give me some advise to solve this problem? thanks.

CMakeLists.txt has not been tested/written for your compiler

After I ran bash build.sh and setup the environment variables, I got the following error:

building mygraph module ...
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:17 (MESSAGE):
  CMakeLists.txt has not been tested/written for your compiler.


-- Configuring incomplete, errors occurred!
See also "/Users/corwin/Desktop/project/DynamicTriad/core/mygraph-build/CMakeFiles/CMakeOutput.log".

My platform is macOS Mojave 10.14.3 and python2.7 with virtualenv.
PYTHON_LIBRARY and PYTHON_INCLUDE_DIR were set to default. EIGEN3_INCLUDE_DIR and BOOST_ROOT were set to be the path of downloaded and extracted directories. Name for boost_python library was set to the name of BOOST's directory(boost_1_68_0).

Can you give me some advise to solve this problem? Thanks a lot.

How to use other dataset?

Demo can be run successfully. However, How to run other dataset? Such as DBLP.

  1. How did you preprocess the original dataset before you generated the pickle file? Do you mind sharing the approaches or preprocessed code that you used?

  2. I noticed that 35 files represents 35 years. However, you mentioned that each time step is a 4-year period. Would you explain more details about how you defined a timestamp?


vertices: 51,060 researchers;
edges: 794,552 coauthor relationships.
Each time step is a 4-year period and there is a 2-year interval between the start time of consecutive time steps.
At time step t, we create an edge between two users weighted by the number of coauthorships between them during that period.


  1. Which function in "stdtest" will load these 35 files?

  2. The result prints out a embedding vector with a shape of (2000, 48). What's the relationship between them?

btw, your work is great. Hope I have a chance to cite your paper.

Thanks in advance,

About academic dataset

I analyzed the published data set, the number of static edges is only 714470, which is inconsistent with the paper, is it different from the used dataset in the paper?

Build errors

When I try to build it, I have following errors. Please help.

Scanning dependencies of target dynamic_triad
make[2]: Leaving directory /home/luwei.ylw/DynamicTriad/core/algorithm/build' make -f CMakeFiles/dynamic_triad.dir/build.make CMakeFiles/dynamic_triad.dir/build make[2]: Entering directory /home/luwei.ylw/DynamicTriad/core/algorithm/build'
[ 50%] Building CXX object CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o
/usr/bin/c++ -Ddynamic_triad_EXPORTS -I/home/luwei.ylw/DynamicTriad/core/algorithm/.. -I/home/luwei.ylw/anaconda3/envs/python27_conda/include/python2.7 -I/home/luwei.ylw/anaconda3/envs/python27_conda/lib/python2.7/site-packages/numpy/core/include -I/home/luwei.ylw/eigen-eigen-323c052e1731 -O2 -fopenmp -O3 -DNDEBUG -fPIC -std=gnu++11 -o CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o -c /home/luwei.ylw/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp
In file included from /home/luwei.ylw/anaconda3/envs/python27_conda/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /home/luwei.ylw/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:2:
/home/luwei.ylw/anaconda3/envs/python27_conda/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with "
^
[100%] Linking CXX shared library dynamic_triad_cimpl.so
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/dynamic_triad.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -fopenmp -O3 -DNDEBUG -shared -Wl,-soname,dynamic_triad_cimpl.so -o dynamic_triad_cimpl.so CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o -lpython2.7 -l boost_python-2.7
/usr/bin/ld: cannot find -lpython2.7
/usr/bin/ld: cannot find -lboost_python-2.7
collect2: error: ld returned 1 exit status
make[2]: *** [dynamic_triad_cimpl.so] Error 1
make[2]: Leaving directory /home/luwei.ylw/DynamicTriad/core/algorithm/build' make[1]: *** [CMakeFiles/dynamic_triad.dir/all] Error 2 make[1]: Leaving directory /home/luwei.ylw/DynamicTriad/core/algorithm/build'
make: *** [all] Error 2

should I use CPU or GPU ?

hi Lukiezhou,

I tried to run a data (65000 vertices, 700000 edges) using GPU (tesla p100 16gb), the program crashed, while there was no problem for small data.
In your paper, you conducted experiments on larger data, did you use CPU or GPU?

Dependence Conflict

Now I'm using py2.7 as your instruction.
When I was trying to install "graph-tool", it returned that:

UnsatisfiableError: The following specifications were found to be in conflict:

  • enum34
  • graph-tool

When I attempted to un-install enum34, I was required to remove py2.7 together.
Do you know how to solve this conflict?

Thanks,

C++ error

Hey,

I'm getting the following error trying to run the code:

UserWarning: dynamic_triad_cimpl.so not found, falling back to python implementation
warnings.warn("dynamic_triad_cimpl.so not found, falling back to python implementation")
Traceback (most recent call last):
File "DynamicTriad/core/init.py", line 178, in
main()
File "DynamicTriad/core/init.py", line 100, in main
edgecnt = [g.num_edges() for g in ds.gtgraphs]
File "/home/thisistheend/DynamicTriad/core/utils_py.py", line 189, in next
ret = self._load_item(self.__iter)
File "/home/thisistheend/DynamicTriad/core/utils_py.py", line 196, in _load_item
self.__items[step - self.offset] = self.__factory(step)
File "/home/thisistheend/DynamicTriad/core/dataset/dataset_utils.py", line 109, in
lambda i: gconv.mygraph2graphtool(self._mygraphs[i], convert_to='undirected'))
File "/home/thisistheend/DynamicTriad/core/utils_py.py", line 159, in getitem
return self._load_item(key)
File "/home/thisistheend/DynamicTriad/core/utils_py.py", line 196, in _load_item
self.__items[step - self.offset] = self.__factory(step)
File "/home/thisistheend/DynamicTriad/core/dataset/dataset_utils.py", line 107, in
self._mygraphs = utils.OffsetList(self.localstep, self.nsteps, lambda step: self._load_graph(step))
File "/home/thisistheend/DynamicTriad/core/dataset/dataset_utils.py", line 128, in _load_graph
graphs.append(self._load_unit_graph(self._unit2time(u)))
File "/home/thisistheend/DynamicTriad/core/dataset/adjlist.py", line 41, in _load_unit_graph
g = mgutils.load_adjlist(fn)
File "/home/thisistheend/DynamicTriad/core/mygraph_utils.py", line 85, in load_adjlist
g = mygraph.Graph(node_type, weight_type)
Boost.Python.ArgumentError: Python argument types in
Graph.init(Graph, str, str)
did not match C++ signature:
init(_object*, int, int)

Does anyone know how to solve this problem?

Thanks,
Uriel

About stdtest.py

Does stdtest.py have to use original pickle file that you provided?
Or this script only depends on the output?

Based on the demo.sh, it seems that data/academic_toy/academic_toy.pickle are still used in stdtest.py.

Do you have additional instruction on how to implement this code on training or evaluating other dataset?

Hope to hear from you soon.
Thanks,

bash build.sh error (CMake Error at CMakeLists.txt:57 (include_directories))

Am getting the above error
Have installed all the required dependencies using conda install, in a virtual conda environment

-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Using custom python path /home/vishweshk/.conda/envs/triads/lib/libpython2.7.so.1.0 and /home/vishweshk/.conda/envs/triads/include/python2.7
-- Found PythonLibs: /home/vishweshk/.conda/envs/triads/lib/libpython2.7.so.1.0 (found suitable version "2.7.13", minimum required is "2.7") 
-- Found Boost 1.70.0 at /home/vishweshk/.conda/envs/triads/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET
-- Found boost_headers 1.70.0 at /home/vishweshk/.conda/envs/triads/lib/cmake/boost_headers-1.70.0
Boost 1.54.0 found.
CMake Error at CMakeLists.txt:57 (include_directories):
  include_directories given empty-string as include directory.


-- Found Boost 1.70.0 at /home/vishweshk/.conda/envs/triads/lib/cmake/Boost-1.70.0
--   Requested configuration: QUIET COMPONENTS python
-- Found boost_python 1.70.0 at /home/vishweshk/.conda/envs/triads/lib/cmake/boost_python-1.70.0
-- No suitable boost_python variant has been identified!
--   libboost_python27.so.1.70.0 (shared, BUILD_SHARED_LIBS not ON, set Boost_USE_STATIC_LIBS=OFF to override)
--   libboost_python27.a (static, Boost_USE_STATIC_LIBS=OFF)
Boost 1.54.0 found.
Found Boost components:
   python

Despite Boost being found , why is the BOOST_INCLUDE_DIR variable giving an empty string?

bash build.sh error

when i run bash build.sh, i get this error:

[100%] Linking CXX shared library dynamic_triad_cimpl.so
/usr/bin/ld: cannot find -lboost_python-2.7
collect2: error: ld returned 1 exit status
CMakeFiles/dynamic_triad.dir/build.make:83: recipe for target 'dynamic_triad_cimpl.so' failed
make[2]: *** [dynamic_triad_cimpl.so] Error 1
CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/dynamic_triad.dir/all' failed
make[1]: *** [CMakeFiles/dynamic_triad.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

so, how do i fix it, ths~

experimental results

I have been debugging the experimental parameters for many times. The accuracy of this model for link prediction on Academic data set has been around 0.6. How to set the parameters to get a better result?
I hope you can reply to me as soon as possible. Thank you.

How to set the paths before running "bash build.sh"

How to set the paths before running "bash build.sh"? Would you give me more specific instructions?

PYTHON_LIBRARY? (default: /usr/lib64/libpython2.7.so.1.0, use a space ' ' to leave it empty)
PYTHON_INCLUDE_DIR? (default: /usr/include/python2.7, use a space ' ' to leave it empty)
EIGEN3_INCLUDE_DIR? (default: /usr/include, use a space ' ' to leave it empty)
BOOST_ROOT? (default: , use a space ' ' to leave it empty) ~/boost_1_54_1

Many Thanks,

error at running demo.sh

I built the program and ran the test script well.
when I ran the demo, it got some errors on the initialization of class Graph, seems like that parameters do not match the c code. Dependency I installed are Python2.7(Anaconda), Boost1.54.0 and Eigen3.2.10.

here is the log:
File "core/cython_src/utils_cy.pyx", line 230, in utils_cy.OffsetList._load_item
self.__items[step - self.offset] = self.__factory(step)
File "./core/dataset/dataset_utils.py", line 107, in
self._mygraphs = utils.OffsetList(self.localstep, self.nsteps, lambda step: self._load_graph(step))
File "./core/dataset/dataset_utils.py", line 128, in _load_graph
graphs.append(self._load_unit_graph(self._unit2time(u)))
File "./core/dataset/adjlist.py", line 41, in _load_unit_graph
g = mgutils.load_adjlist(fn)
File "./core/mygraph_utils.py", line 85, in load_adjlist
g = mygraph.Graph(node_type, weight_type)
Boost.Python.ArgumentError: Python argument types in
core.mygraph.Graph(str, str)
did not match C++ signature:
Graph(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)

error while executing scripts/test.py

I am getting the following error while running test.py. I have installed all the dependencies.

here is the log:
Checking mygraph submodule ...
Traceback (most recent call last):
File "scripts/test.py", line 13, in
raise RuntimeError("mygraph submodule not avaiable: {}".format(str(e)))
RuntimeError: mygraph submodule not avaiable: /home/raavan/mountedDrives/dynamicGraphs/DynamicTriad-master/core/mygraph.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE

Baseline Methods

How to verify the performance of static models (such as deep walk) in Academic .
I hope you can reply to me as soon as possible. Thank you.

Dataset problem

Would you like to make public the other two processed data sets mentioned in the paper?
If the data sets collected are in other formats, must be converted to .pickle format before they can be tested.
For example, the format of the data set I collected is .mat format. How should I deal with it?
I hope you can reply to me as soon as possible. Thank you.

two questions about the paper

In the paper,
Eq(3):
image
for specific i, j, t, α(i, j, t) is a vector and can be calculated, why use accumulative symbolimage?

Eq(11):
after the transformation of Eq(3), the EM algprithms can be regarded as the following form
(1-α_k^(t,i,j) )≤C_(i,j,k)^t, how the inequality is derived?In addition, α_k^(t,i,j) is 1 when (i,j,k) is closed at t+1. What about other cases?

error when load pickle running demo.sh

hello , i've finish configuring the env with python2.7 boost1.54 eigen3.2.8 and cmake 3.14 and pass the env test like this
image
but when i run demo.sh under the root path, it tell me i've got no mygraph module like this
image
besides, i've try import core.mygraph as mygraph in python env and got no error and finally locate the error at data = cPickle.load(open(infn, 'r')) in academic2adjlist.py.
could you please give me some hint how this could happen , i've not use pickle format before and may have blind zone about this.
look forward to your reply and thanks for your help~

Could you explain more about how to do the link prediction evaluation in the paper?

Could you explain more about how to do the link prediction evaluation (predict links for t + 1) in the paper?

I am very confused about using Logistic Regression (LR) after obtaining vertex embeddings. Because you were trying to compare DeepWalk, nod2vec and TNE methods. Does it mean for every method, you will train different LR?

About online training

Hi Lekui,

Thanks for your excellent work.

In

# online training disabled
, it said "online training disabled". I'm wondering what is the definition of online training here, and how to enable it.

Besides, in your paper, did you train the model with one graph per timestep, and then use the previous trained model as well as the graph at next timestep to get the next model (the downstream tasks are then evaluated by the models/embeddings obtained at each timestep), and so on...?
Or did you train the model with all graphs in one go, which gives the "overall" pre-trained model and then use this model to somehow generate embeddings at each timestep, which are then used to evaluate downstream tasks? From

for i in range(args.niters):
, It seems that all edges from all dynamic graphs are used together to train the model.

Thanks in advance.

About the performance of DynamicTriad on Academic Full dataset

Hi There,

I ran the experiments on the full academic graph.
Here are the results I got from running the stdtest.py

task: node label predict from current time step
f1 mean: 0.758781494117 std: 0.00493563473657
task: node label predict from previous time step
f1 mean: 0.74218857501 std: 0.00703456767329
task: link prediction from current time step
f1 mean: 0.965581668386 std: 0.000262895950964
task: link prediction from previous time step
f1 mean: 0.881259501445 std: 0.000573836561633
task: changed link prediction from current time step
f1 mean: 0.788477965543 std: 0.000976565646762
task: changed link prediction from previous time step
f1 mean: 0.768144620087 std: 0.0013686381365

The parameter setting I was used is:
python . -I 10 -d data/academic_full -n 16 -K 48 -l 4 -s 2 -o
output_academic_full --beta-smooth 1 --beta-triad 1
--cachefn cache_full -b 5000

python -m stdtests -f output_academic_full -d data/academic.pickle
-m 1980 -s 2 -l 4 -n 16 -t all --datasetmod core.dataset.citation
--cachefn cache_full

I was wondering why my results are quite different from the
reported table (F1-scores) under this parameter setting?
Is there any parameter setting I didn't use it correctly? Thanks.

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.