Code Monkey home page Code Monkey logo

dysat's People

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

dysat's Issues

Unable to reproduce results on ML-10M

Thank you so much for sharing the open source code.
However, I downloaded the ml-10m data set you provided.
On this dataset, I tried to use Enron's parameter settings for experiments, and I found that the results of the algorithm are lower than those given in the paper.
Can you provide your parameters on the ml-10m data set?
Thanks again for your work and time.
I wish you all the best!

dataset

Thank you for reading! The work was so interesting and it was attractive to me.
I am wondering if you could kindly send me the source dataset about it. I promise they will be used only for research purposed.
No matter whether you agree or not, best wishes to you. I would appreciate it if you could help me.
Thanks and regards.

how to change the embedding size?

I have a question about how to change the embedding size, I change the temporal_layer_config and structural_layer_config from 128 to 16 and the code doesnt work. If I only change the temporal_layer_config to 16, the result embedding size is still 128.

two erros when running run_script.py

sorry to bother you, I found the following errors when running run_script.py, one is " Unresolved reference 'raw_input' ", One is the error "from layers import *" in the first line of model.py," ModuleNotFoundError: No module named 'layers' ", how to solve them?
thanks very much for your reply.

Only increase learning rate from 1e-3 to 1e-2, AUC significantly better than results reported, why?

Hi,
Thanks for your contribution! I cloned your codes (python3 version) and trained the model using Enron_new you provided. When setting learning rate=0.001 (default value), the final AUC is around 0.86 (as you reported). However, when I increased the learning rate to 0.01 and regenerated context pairs and eval data, the final AUC reached 0.89. I have tested several times in the same environment as requirement.txt.
Did you try to tune the learning rate when you training this dataset? If not, this is a free and significant improvement, right?

No module named 'networkx.classes.reportviews'

I want to run my data with your code, my data's type is (u, v, t) and I follow the preprocess.ipynb in enron and create my graphs, my timestamp is float not date type and (u,v) is index , but I meet an error "No module named 'networkx.classes.reportviews' "when I use load_graphs to load my graphs.

slice_id = 0
for (a, b, t) in new_links:
prev_slice_id = slice_id
slice_id = time_dict[t]
datetime_object = t
if slice_id == 1+prev_slice_id and slice_id > 0:
slices_links[slice_id].add_nodes_from(slices_links[slice_id-1].nodes(data=True))
if a not in slices_links[slice_id]:
slices_links[slice_id].add_node(a)
if b not in slices_links[slice_id]:
slices_links[slice_id].add_node(b)
slices_links[slice_id].add_edge(a,b, date=datetime_object)

def new_remap(slices_graph):
slices_graph_remap = []
for slice_id in slices_graph:
G = nx.MultiGraph()
for x in slices_graph[slice_id].nodes():
G.add_node(x)
for x in slices_graph[slice_id].edges(data=True):
G.add_edge(x[0], x[1], date=x[2]['date'])
assert (len(G.nodes()) == len(slices_graph[slice_id].nodes()))
assert (len(G.edges()) == len(slices_graph[slice_id].edges()))
slices_graph_remap.append(G)
return slices_graph_remap

slices_links_remap = new_remap(slices_links)
np.savez('graphs.npz', graph=slices_links_remap)

Did anyone have the same error?

The weight of the edge

First of all thank you for your work. It is mentioned in the paper that undirected weighted graphs can be handled, but the weight of the edge can be processed is not withdrawn in the code. The data given in the code also has no weight. So how can you deal with weighted charts?

code issue

When I run train.py, there is a problem following:
absl.flags._exceptions.DuplicateFlagError: The flag 'log_dir' is defined twice. First from absl.logging, Second from flags. Description from first occurrence: directory to write logfiles into

DySAT w/o temporal attention is better in Enron

Thanks for your contribution. I find that DySAT w/o temporal attention is better in Enron.

I change code to delete Temporal Attention part in file models.py.

# 5: Temporal Attention forward
        temporal_inputs = structural_outputs
        outputs= temporal_inputs
        # for temporal_layer in self.temporal_attention_layers:
        #     outputs = temporal_layer(temporal_inputs)  # [N, T, F]
        #     temporal_inputs = outputs
        #     self.attn_wts_all.append(temporal_layer.attn_wts_all)
        return outputs

And run
python train.py --dataset Enron_new --time_steps 16

get results w/o temporal attention :

default results (val) [0.8700378071833649, 0.8700378071833649]
default results (val) [0.8851606805293006, 0.8851606805293006]
default results (test) [0.90290357641944, 0.90290357641944]
default results (test) [0.9008850473577972, 0.9008850473577972]

while DySat with temporal attention has results

default results (val) [0.9040642722117203, 0.9040642722117203]                                                                                                                          
default results (val) [0.9064272211720227, 0.9064272211720227]                                                                                                                          
default results (test) [0.8758863412866829, 0.8758863412866829]                                                                                                                         
default results (test) [0.8781636561254593, 0.8781636561254593]

It seems that DySAT w/o temporal attention performs better than one with temporal attention. Is there something wrong ?

How to build the graph snapshots?

I can only see you load graph snapshots .npz file in your code, but I want to know how to build it from your raw dataset.
I want to build graph snapshots in my own dataset, so I need your help. Thanks!

ModuleNotFoundError: No module named 'layers'

Hello,

When I run "run_script.py", I got the following error. I really don know how to solve it.
1589572668670

I created a virtual environment and installed all the modules in the requirement.txt.

The code seems not to be the same as in the paper

In preprocess.py it generates context pairs during 1 to T, and the model learned from 1 to T to predict link in time T?

def get_context_pairs(graphs, num_time_steps):
    """ Load/generate context pairs for each snapshot through random walk sampling."""
    load_path = "data/{}/train_pairs_n2v_{}.pkl".format(FLAGS.dataset, str(num_time_steps - 2))
    try:
        context_pairs_train = dill.load(open(load_path, 'rb'))
        print("Loaded context pairs from pkl file directly")
    except (IOError, EOFError):
        print("Computing training pairs ...")
        context_pairs_train = []
        for i in range(0, num_time_steps):
            context_pairs_train.append(run_random_walks_n2v(graphs[i], graphs[i].nodes()))
        dill.dump(context_pairs_train, open(load_path, 'wb'))
        print ("Saved pairs")

    return context_pairs_train

maybe for i in range(0, num_time_steps - 1):?

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.