Giter VIP home page Giter VIP logo

dkgr'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

Watchers

 avatar

dkgr's Issues

Pretrained embeddings, reward implementation and evaluation metrics

Thanks for releasing the codes.
Here are some details I'm wondering. Would you please make me some explanation?
Firstly, the pretrained embeddings are not used by the two agents. So does it mean that there is no association between cluster embeddings and entity embeddings?
Secondly, the reward mechanism shown in the code is not implemented as the paper said. Could you please tell me what the correct implementation looks like?
Thirdly, MRR and MAP are not given by the code. Does the auc output actually mean MAP?
I'd appreciate it if you can solve my puzzles or you can offer a piece of correct version of that project. Thank you very much in advance.

Are entity-agent and cluster-agent walking independently on the graph?

Hi,

Regarding the code between line 265-303 in 'trainer.py', are entity-agent and cluster-agent walking independently on the graph?
When I look through this part, I didn't see any synchronization between two agents.
If I'm not correct, could you please tell me which variable is for synchronization?
Otherwise, may I know the rationale behind it? And how do we ensure entities in each step are in the correct corresponding cluster?

Thank you so much in advance!

Below is the code between line 265-303 in 'trainer.py':

		for i in range(self.path_length):
			loss, cluster_state_emb, logits, idx, chosen_relation, scores = self.c_agent.cluster_step(
				prev_possible_clusters, next_possible_clusters,
				cluster_state_emb, prev_cluster, end_cluster,
				current_clusters_t, range_arr,
				first_step_of_test, entity_state_emb
			)

			c_all_losses.append(loss)
			c_all_logits.append(logits)
			c_all_action_id.append(idx)
			cluster_scores.append(scores)

			cluster_state = cluster_episode.next_action(idx)  ## important !! switch to next state with new cluster
			prev_possible_clusters = next_possible_clusters.clone()
			next_possible_clusters = torch.tensor(cluster_state['next_clusters']).long().to(self.device)
			current_clusters_t = torch.tensor(cluster_state['current_clusters']).long().to(self.device)
			prev_cluster = chosen_relation.to(self.device)

			loss, entity_state_emb, logits, idx, chosen_relation = self.e_agent.step(
				next_possible_relations,
				next_possible_entities, entity_state_emb,
				prev_relation, query_relation,
				current_entities_t, range_arr,
				first_step_of_test, cluster_state_emb
			)

			entity_state, whether_e_agent_follows_c_agent = entity_episode(idx, prev_cluster.cpu(), i)  ## important !! switch to next state with new entity and new relation
			next_possible_relations = torch.tensor(entity_state['next_relations']).long().to(self.device)
			next_possible_entities = torch.tensor(entity_state['next_entities']).long().to(self.device)
			current_entities_t = torch.tensor(entity_state['current_entities']).long().to(self.device)
			prev_relation = chosen_relation.to(self.device)

			entity_episode.get_stepwise_approximated_reward(current_entities_t,	current_clusters_t, prev_entities)  ## estimate the reward by taking each step
			prev_entities = current_entities_t.clone()

			e_all_losses.append(loss)
			e_all_logits.append(logits)
			e_all_action_id.append(idx)

Positive reward function and picture

Hi, there,
Could you please share the code which be used for checking the positive reward rate between the CURL and MINERVA? We are intereseted in the reward function, thank you.

Clustering the dataset

Hello, could you clarify the clustering process of the dataset? I was testing with the graph.txt of nell trying to extract the rest of the files (training and the embeddings and the JSON files) and couldn't get the same results as running on the existing nell folder, I used TransE and ComplEX for the KG embedding and to get the clusters but it didn't workπŸ˜….

I m working on an end-to-end framework and wanted to include your approach.

Thanks in advance.

Prediction

Hello,
Could you please tell me if I want to get a prediction of a certain fact whether it's valid or not, or a link prediction what methods should I call? I am a bit lost with all the entities and cluster episodes πŸ˜…

Thanks in advance ✨✨

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.