artificial-intelligence

AI of spaceship's propulsion: land a 3D ship at position=0 and angle=0

对着背影说爱祢 提交于 2019-11-27 20:04:55
问题 This is a very difficult problem about how to maneuver a spaceship that can both translate and rotate in 3D, for a space game. The spaceship has n jets placing in various positions and directions. Transformation of i -th jet relative to the CM of spaceship is constant = Ti . Transformation is a tuple of position and orientation (quaternion or matrix 3x3 or, less preferable, Euler angles). A transformation can also be denoted by a single matrix 4x4. In other words, all jet are glued to the

Neural Network to predict nth square

两盒软妹~` 提交于 2019-11-27 19:23:36
问题 I am trying to use multi-layer neural network to predict nth square. I have the following training data containing the first 99 squares 1 1 2 4 3 9 4 16 5 25 ... 98 9604 99 9801 This is the code: import numpy as np import neurolab as nl # Load input data text = np.loadtxt('data_sq.txt') # Separate it into datapoints and labels data = text[:, :1] labels = text[:, 1:] # Define a multilayer neural network with 2 hidden layers; # First hidden layer consists of 10 neurons # Second hidden layer

How to adaptively add and use face images collected while authentication to improve performance of face authentication?

醉酒当歌 提交于 2019-11-27 19:03:52
问题 My current project is to build a face authentication system. The constraint I have is: during enrollment, the user gives single image for training. However, I can add and use images given by the user while authentication. The reason I want to add more images into training is, the user environment is not restricted - different lighting conditions, different distance from camera, from different MP cameras. The only relief is the pose is almost frontal. I think, the above problem is similar to

How to convert the output of an artificial neural network into probabilities?

删除回忆录丶 提交于 2019-11-27 17:27:22
I've read about neural network a little while ago and I understand how an ANN (especially a multilayer perceptron that learns via backpropagation) can learn to classify an event as true or false. I think there are two ways : 1) You get one output neuron. It it's value is > 0.5 the events is likely true, if it's value is <=0.5 the event is likely to be false. 2) You get two output neurons, if the value of the first is > than the value of the second the event is likely true and vice versa. In these case, the ANN tells you if an event is likely true or likely false. It does not tell how likely it

is there any way to import a json file(contains 100 documents) in elasticsearch server.?

时光怂恿深爱的人放手 提交于 2019-11-27 17:24:23
Is there any way to import a JSON file (contains 100 documents) in elasticsearch server? I want to import a big json file into es-server.. You should use Bulk API . Note that you will need to add a header line before each json document. $ cat requests { "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } } { "field1" : "value1" } $ curl -s -XPOST localhost:9200/_bulk --data-binary @requests; echo {"took":7,"items":[{"create":{"_index":"test","_type":"type1","_id":"1","_version":1,"ok":true}}]} As dadoonet already mentioned, the bulk API is probably the way to go. To transform your

Meaning of an Epoch in Neural Networks Training

☆樱花仙子☆ 提交于 2019-11-27 17:17:30
while I'm reading in how to build ANN in pybrain , they say: Train the network for some epochs. Usually you would set something like 5 here, trainer.trainEpochs( 1 ) I looked for what is that mean , then I conclude that we use an epoch of data to update weights, If I choose to train the data with 5 epochs as pybrain advice, the dataset will be divided into 5 subsets, and the wights will update 5 times as maximum. I'm familiar with online training where the wights are updated after each sample data or feature vector, My question is how to be sure that 5 epochs will be enough to build a model

How to compute precision, recall, accuracy and f1-score for the multiclass case with scikit learn?

点点圈 提交于 2019-11-27 16:42:56
I'm working in a sentiment analysis problem the data looks like this: label instances 5 1190 4 838 3 239 1 204 2 127 So my data is unbalanced since 1190 instances are labeled with 5 . For the classification Im using scikit's SVC . The problem is I do not know how to balance my data in the right way in order to compute accurately the precision, recall, accuracy and f1-score for the multiclass case. So I tried the following approaches: First: wclf = SVC(kernel='linear', C= 1, class_weight={1: 10}) wclf.fit(X, y) weighted_prediction = wclf.predict(X_test) print 'Accuracy:', accuracy_score(y_test,

Estimating the number of neurons and number of layers of an artificial neural network [closed]

主宰稳场 提交于 2019-11-27 16:41:42
I am looking for a method on how to calculate the number of layers and the number of neurons per layer. As input i only have the size of the input vector, the size of the output vector and the size of the trainig set. Usually the best net is determined by trying different net topologies and selecting the one with the least error. Unfortunately I can not do that. This is a really hard problem. The more internal structure a network has, the better that network will be at representing complex solutions. On the other hand, too much internal structure is slower, may cause training to diverge, or

source of historical stock data [closed]

会有一股神秘感。 提交于 2019-11-27 16:33:09
I'm trying to make a stock market simulator (perhaps eventually growing into a predicting AI), but I'm having trouble finding data to use. I'm looking for a (hopefully free) source of historical stock market data. Ideally, it would be a very fine-grained (second or minute interval) data set with price and volume of every symbol on NASDAQ and NYSE (and perhaps others if I get adventurous). Does anyone know of a source for such info? I found this question which indicates Yahoo offers historical data in CSV format, but I've been unable to find out how to get it in a cursory examination of the

Crossover operation in genetic algorithm for TSP

杀马特。学长 韩版系。学妹 提交于 2019-11-27 14:53:29
问题 I'm trying to solve the Travelling Salesman Problem (TSP) with Genetic algorithm. My genome is a permutation of a vertex in graph (path for salesman). How should I perform the crossover operation over my genomes? Where can I find implementations of my problem in C#? 回答1: You should check "Genetic Algorithm Solution of the TSP Avoiding Special Crossover and Mutation" by Gokturk Ucoluk. It gives an overview of the special crossover operators for permutations and proposes a clever representation