Is there a way to input a numeric data in cnn and the output is also regression? - methods

Currently I am working in a project where I predict the future gold prices using cnn method. I have been searching for a way so that I can use numbers as input (historical prices) and I need to get the output in a regression not classification. I searched everywhere for the past few months but I found it hard to understand. If someone can assist me with a way for that please I would be grateful.

Related

Trouble understanding exon-chaining problem

I'm currently trying to build a music generator. In order to improve my deal with patterns in music, I have read this article, which states that "This algorithm (exon-chaining algorithm) can be modified to accommodate the pattern selection problem by replacing the weight of an interval with its duration".(page 9).
However, I'm having trouble understanding the meaning of the exon-chaining problem. I have looked for this problem in many different presentations and articles but still couldn't find satisfying information. I would really appreciate it if someone could explain it to me.
Thanks in advance.

Machine Learning/Artificial Intelligence - Classify column based on the value / pattern

I have been trying some frameworks and algorithms, and I can't find one that do what I want - which is classify the column of the data based on the value.
I tried to use Bayes algorithm, but it isn't very precise because I can't expect that the data that is being searched for is in the training set - but I can expect that the pattern is in the training.
I don't have background in Machine Learning / AI, but I was looking for some working example before really going deeper in the implementation.
I built a smaller ARFF to exemplify. Also tried lots of Weka classifying algorithms but none of them gave me good results.
#relation recommend
#attribute class {name,email,taxid,phone}
#attribute text String
#data
name,'Erik Kolh'
name,'Eric Candid'
name,'Allan Pavinan'
name,'Jubaru Guttenberg'
name,'Barabara Bere'
name,'Chuck Azul'
email,'erik#gmail.com'
email,'steven#spielberg.com'
email,'dogs#cats.com'
taxid,'123611216'
taxid,'123545413'
taxid,'562321677'
taxid,'671312678'
taxid,'123123216'
phone,'438-597-7427'
phone,'478-711-7678'
phone,'321-651-5468'
My expectation is train a huge dataset like the above one and get recommendations based on the pattern, e.g.:
joao#bing.com -> email
Joao Vitor -> name
400-123-5519 -> phone
Can you please suggest any algorithms, examples or ideas to research?
I couldn't find a good fit, maybe it's just lack of vocabulary.
Thank you!
What you are trying to do is called named entity recognition (NER). Weka is most likely not a real help here. The library Mallet (http://mallet.cs.umass.edu) might be a good fit. I would recommend a Conditional Random Field (CRF) based approach.
If you would like to stay with weka, you need to change your feature space. Then Naive bayes will be do ok on your data as presented
E.g. add a features for
whether the word has only characters
whether it is alphanumeric
whether it is numeric data
number of Numbers,
whether it starts captilized
... (just be creative)

How to convert a matrix of SIFT features into a archive readable by Support Vector Machine?

I'm just starting a project using OpenCv to extract SIFT features from multiple images. Then I will make a database for training machine with SVM.
Untill now, I studied this code which is very basic. But i would like to know, how should i proceed to convert the matrix of features into a normalized, readable archive for SVM?
What is the best approach to extract features from hundreds of images? (later objective)
Thank you!
If you can elaborate more on the specific problem you are trying to solve, it would be easier to answer.
However, I can suggest using the Bag of Words approach of which you can read about here:
http://gilscvblog.wordpress.com/2013/08/23/bag-of-words-models-for-visual-categorization/

Train Mahout to interpret data

I have a set of questions which belong to a Customer Satisfaction Survey. The answers of users are in the form of a CSV file. Based on the answers to the questions, boolean values of 0 and 1 are assigned to each user's response depicting bad and good experience respectively.
My task is use Mahout to train a model with a set of questions such that it is able to analyse and answer questions fed to it later. And since the input data is huge, I've got to use MapReduce in conjunction with it.
Unfortunately, I am unable to make the head and tail of Mahout and have no idea how to proceed. Can someone please guide me on which model I should train and how should I go about doing it?
P. S. I have no knowledge of machine learning. So please try to explain the jargon, if used.

OpenCV: Fingerprint Image and Compare Against Database

I have a database of images. When I take a new picture, I want to compare it against the images in this database and receive a similarity score (using OpenCV). This way I want to detect, if I have an image, which is very similar to the fresh picture.
Is it possible to create a fingerprint/hash of my database images and match new ones against it?
I'm searching for a alogrithm code snippet or technical demo and not for a commercial solution.
Best,
Stefan
As Pual R has commented, this "fingerprint/hash" is usually a set of feature vectors or a set of feature descriptors. But most of feature vectors used in computer vision are usually too computationally expensive for searching against a database. So this task need a special kind of feature descriptors because such descriptors as SURF and SIFT will take too much time for searching even with various optimizations.
The only thing that OpenCV has for your task (object categorization) is implementation of Bag of visual Words (BOW).
It can compute special kind of image features and train visual words vocabulary. Next you can use this vocabulary to find similar images in your database and compute similarity score.
Here is OpenCV documentation for bag of words. Also OpenCV has a sample named bagofwords_classification.cpp. It is really big but might be helpful.
Content-based image retrieval systems are still a field of active research: http://citeseerx.ist.psu.edu/search?q=content-based+image+retrieval
First you have to be clear, what constitutes similar in your context:
Similar color distribution: Use something like color descriptors for subdivisions of the image, you should get some fairly satisfying results.
Similar objects: Since the computer does not know, what an object is, you will not get very far, unless you have some extensive domain knowledge about the object (or few object classes). A good overview about the current state of research can be seen here (results) and soon here.
There is no "serve all needs"-algorithm for the problem you described. The more you can share about the specifics of your problem, the better answers you might get. Posting some representative images (if possible) and describing the desired outcome is also very helpful.
This would be a good question for computer-vision.stackexchange.com, if it already existed.
You can use pHash Algorithm and store phash value in Database, then use this code:
double const mismatch = algo->compare(image1Hash, image2Hash);
Here 'mismatch' value can easly tell you the similarity ratio between two images.
pHash function:
AverageHash
PHASH
MarrHildrethHash
RadialVarianceHash
BlockMeanHash
BlockMeanHash
ColorMomentHash
These function are well Enough to evaluate Image Similarities in Every Aspects.

Resources