artificial-intelligence

How to build a knowledge graph?

ぃ、小莉子 提交于 2019-12-20 08:15:21
问题 I prototyped a tiny search engine with pagerank that worked on my computer. I am interested in building a knowledge graph on top of it, and it should return only queried webpages that are within the right context, similarly to how Google found relevant answers to search questions. I saw a lot of publicity around knowledge graph but not a lot of literature and almost no pseudocode like guideline of building one. Does anyone know good references on how such knowledge graph works internally, so

Porter Stemmer Algorithm Not returning the expected output? when modified into def

丶灬走出姿态 提交于 2019-12-20 04:21:04
问题 I'm using the PorterStemmer Python Port The Porter stemming algorithm (or ‘Porter stemmer’) is a process for removing the commoner morphological and inflexional endings from words in English. Its main use is as part of a term normalisation process that is usually done when setting up Information Retrieval systems. For the following.. The other thing you need to do is reduce each word to its stem. For example, the words sing , sings , singing all have the same stem, which is sing . There is a

Calculate the error using a sigmoid function in backpropagation

↘锁芯ラ 提交于 2019-12-19 19:38:43
问题 I have a quick question regarding backpropagation. I am looking at the following: http://www4.rgu.ac.uk/files/chapter3%20-%20bp.pdf In this paper, it says to calculate the error of the neuron as Error = Output(i) * (1 - Output(i)) * (Target(i) - Output(i)) I have put the part of the equation that I don't understand in bold. In the paper, it says that the Output(i) * (1 - Output(i)) term is needed because of the sigmoid function - but I still don't understand why this would be nessecary. What

Genetic algorithm for optimization in game playing agent heuristic evaluation function

守給你的承諾、 提交于 2019-12-19 11:43:19
问题 This is in response to an answer given in this question: How to create a good evaluation function for a game?, particularly by @David (it is the first answer). Background : I am using a genetic algorithm to optimize the hyper parameters in a game playing agent that is using minimax / alpha beta pruning (with iterative deepening). In particular, I would like to optimize the heuristic (evaluation) function parameters using a genetic algorithm. The evaluation function I use is: f(w) = w * num_my

2D waypoint pathfinding: combinations of WPs to go from curLocation to targetLocation

北慕城南 提交于 2019-12-19 10:29:34
问题 Please take a moment to understand my situation. If it is not comprehendable, please tell me in a comment. I have an ArrayList of Waypoints. These waypoints are not in any order. A waypoint has the following properties: {int type, float z, float y, float x, float rotation} This applies to a 3 dimensional world, but since my pathfinding should not care about height (and thus treat the world as a 2 dimensional one), the y value is ignored. Rotation is not of importance for this question. In

AttributeError: module 'tensorflow.python.training.checkpointable' has no attribute 'CheckpointableBase'

人盡茶涼 提交于 2019-12-19 09:42:20
问题 I've been working on learning artificial intelligence and how to code with Python.I was working on a project and I decided to update some packages of Python which were not new to work on then something happened and I can't compile my codes.I deleted Anaconda3 and set it up again but not worked. I've been seeing this problem which I wrote as a topic.If someone helps me,I would be appriciated to get some help. >>> import tensorflow as tf File "C:\Users\AliGalip\Anaconda3Yeni\lib\site-packages

How to determine subject, object and other words?

别来无恙 提交于 2019-12-19 05:48:41
问题 I'm trying to implement application that can determine meaning of sentence, by dividing it to smaller pieces. So I need to know what words are subject, object etc. so that my program can know how to handle this sentence. 回答1: This is an open research problem. You can get an overview on Wikipedia, http://en.wikipedia.org/wiki/Natural_language_processing. Consider phrases like "Time flies like an arrow, fruit flies like a banana" - unambiguously classifying words is not easy. 回答2: You should

Tensorflow reshaping a tensor

一笑奈何 提交于 2019-12-19 04:47:12
问题 I'm trying to use tf.nn.sparse_softmax_cross_entropy_with_logits and I have followed the answer by user Olivier Moindrot [here][1] but I'm getting a dimension error I'm building a segmentation network, so the input image is 200x200 and the output image is 200x200. The classification is binary, so foreground and background. After I build the CNN pred = conv_net(x, weights, biases, keep_prob) pred looks like this <tf.Tensor 'Add_1:0' shape=(?, 40000) dtype=float32> The CNN has a couple of conv

Tensorflow reshaping a tensor

泪湿孤枕 提交于 2019-12-19 04:47:08
问题 I'm trying to use tf.nn.sparse_softmax_cross_entropy_with_logits and I have followed the answer by user Olivier Moindrot [here][1] but I'm getting a dimension error I'm building a segmentation network, so the input image is 200x200 and the output image is 200x200. The classification is binary, so foreground and background. After I build the CNN pred = conv_net(x, weights, biases, keep_prob) pred looks like this <tf.Tensor 'Add_1:0' shape=(?, 40000) dtype=float32> The CNN has a couple of conv

How to combine the outputs of multiple naive bayes classifier?

好久不见. 提交于 2019-12-19 04:10:59
问题 I am new to this. I have a set of weak classifiers constructed using Naive Bayes Classifier (NBC) in Sklearn toolkit. My problem is how do I combine the output of each of the NBC to make final decision. I want my decision to be in probabilities and not labels. I made a the following program in python. I assume 2 class problem from iris-dataset in sklean. For demo/learning say I make a 4 NBC as follows. from sklearn import datasets from sklearn.naive_bayes import GaussianNB import numpy as np