What algorithm does core ml use? - swift

I have searched it everywhere but couldn’t end up with an solid answer. My question is what machine learning algorithm does core ml use? How do I answer to that question?

From the documentation:
Core ML supports a variety of machine learning models, including
neural networks, tree ensembles, support vector machines, and
generalized linear models.

Related

Resources on finding good Neural Network architectures for real applications

I have finished two neural network courses and done loads of reading on the subject. I am comfortable with Tensorflow and Keras and building advanced neural networks (multiple inputs, large data, special layers...). I also have a fairly deep understanding of the underlying mathematics.
My problem is that I know how to build neural networks but don't know the process by which an "expert" would create one for a specific application.
I can:
Collect loads of data and clean it up.
Train the neural network.
Fine tune hyper parameters.
Export it for actual applications.
What I am missing is how to come up with the layers in the neural network (how wide, what kind...). I know it is somewhat trial and error and looking at what has worked for others. But there must be a process that people can use to come up with architectures* that actually work very well. For example state of the art neural networks.
I am looking for a free resource that would help me understand this process of creating a very good architecture*.
*by architecture I mean the different layers that make up the network and their properties
I wrote my masters thesis about the topic:
Thoma, Martin. "Analysis and Optimization of Convolutional Neural Network Architectures." arXiv preprint arXiv:1707.09725 (2017).
Long story short: There are a couple of techniques for analysis (chapter 2.5) and algorithms that learn topoligies (chapter 3), but in practice it is mostly trial and error / gut feeling.

Is it possible to return tensorflow code from compiled Keras model?

I'll start this post by saying that I acknowledge this may not be the appropriate venue for this question, but wasn't sure where else to start. If there is a more appropriate SE channel, please feel free to suggest.
I've been using Keras for learning how to apply neural networks to different prediction problems. I'm interested in learning TensorFlow as a way to gain a deeper understanding of the inner working of these networks. Obviously, it's possible to switch the backend of Keras to TensorFlow and to use Keras as a high-level API to TensorFlow. However, is there a way to "recover" the TensorFlow code from a compiled Keras model? I'm thinking it would be extremely useful to be able to write a model that I'm familiar with in Keras, and automatically see it's "translation" to TensorFlow as a way to learn this library more quickly.
Any thoughts or suggestions would be helpful. Thanks for reading.
All that Keras is doing is to abstract both Theano and TensorFlow into one unified backend module. Then it uses the functions in the backend to implement the layers and methods you are able to use in Keras.
This in turn means that there is no compilation step involved in generating code for one particular backend. Both Theano and TensorFlow are python libraries, there is no reason for a translation step, Keras just uses the library you specify.
The best way to find out how a model in Keras is written in TensorFlow is probably to search for a simple network with the same dataset and compare examples in TensorFlow and Keras. Another way would be to read the Keras code and lookup the K.<function> in the TensorFlow backend module.
If you are interested in the platform specific code that the individual backends produce, e.g. the CUDA code, then the answer is: it depends. Both Theano and TensorFlow use temporary directories to store the code and the sources. For theano this is ~/.theano by default. But looking at this code will probably not make you any wiser in understanding neural networks and their mechanics.

Feature Extraction from Convolutional Neural Network (CNN) and use this feature to other classification algorithm

My question is can we use CNN for feature extraction and then can we use this extracted feature as an input to another classification algorithm like SVM.
Thanks
Yes, this has already been done and well documented in several research papers, like CNN Features off-the-shelf: an Astounding Baseline for Recognition and How transferable are features in deep neural networks?. Both show that using CNN features trained on one dataset, but tested on a different one usually perform very well or beat the state of the art.
In general you can take the features from the layer before the last, normalize them and use them with another classifier.
Another related technique is fine tuning, where after training a network, the last layer is replaced and retrained, but previous layers' weights are kept fixed.

Convolutional Neural Network (CNN) for Audio [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have been following the tutorials on DeepLearning.net to learn how to implement a convolutional neural network that extracts features from images. The tutorial are well explained, easy to understand and follow.
I want to extend the same CNN to extract multi-modal features from videos (images + audio) at the same time.
I understand that video input is nothing but a sequence of images (pixel intensities) displayed in a period of time (ex. 30 FPS) associated with audio. However, I don't really understand what audio is, how it works, or how it is broken down to be feed into the network.
I have read a couple of papers on the subject (multi-modal feature extraction/representation), but none have explained how audio is inputed to the network.
Moreover, I understand from my studies that multi-modality representation is the way our brains really work as we don't deliberately filter out our senses to achieve understanding. It all happens simultaneously without us knowing about it through (joint representation). A simple example would be, if we hear a lion roar we instantly compose a mental image of a lion, feel danger and vice-versa. Multiple neural patterns are fired in our brains to achieve a comprehensive understanding of what a lion looks like, sounds like, feels like, smells like, etc.
The above mentioned is my ultimate goal, but for the time being I'm breaking down my problem for the sake of simplicity.
I would really appreciate if anyone can shed light on how audio is dissected and then later on represented in a convolutional neural network. I would also appreciate your thoughts with regards to multi-modal synchronisation, joint representations, and what is the proper way to train a CNN with multi-modal data.
EDIT:
I have found out the audio can be represented as spectrograms. It as a common format for audio and is represented as a graph with two geometric dimensions where the horizontal line represents time and the vertical represents frequency.
Is it possible to use the same technique with images on these spectrograms? In other words can I simply use these spectrograms as input images for my convolutional neural network?
We used deep convolutional networks on spectrograms for a spoken language identification task. We had around 95% accuracy on a dataset provided in this TopCoder contest. The details are here.
Plain convolutional networks do not capture the temporal characteristics, so for example in this work the output of the convolutional network was fed to a time-delay neural network. But our experiments show that even without additional elements convolutional networks can perform well at least on some tasks when the inputs have similar sizes.
There are many techniques to extract feature vectors from audio data in order to train classifiers. The most commonly used is called MFCC (Mel-frequency cepstrum), which you can think of as a "improved" spectrogram, retaining more relevant information to discriminate between classes. Other commonly used technique is PLP (Perceptual Linear Predictive), which also gives good results. These are still many other less known.
More recently deep networks have been used to extract features vectors by themselves, thus more similarly the way we do in image recognition. This is a active area of research. Not long ago we also used feature extractors to train classifiers for images (SIFT, HOG, etc.), but these were replaced by deep learning techniques, which have raw images as inputs and extract feature vectors by themselves (indeed it's what deep learning is really all about).
It's also very important to notice that audio data is sequential. After training a classifier you need to train a sequential model as a HMM or CRF, which chooses the most likely sequences of speech units, using as input the probabilities given by your classifier.
A good starting point to learn speech recognition is Jursky and Martins: Speech and Language Processing. It explains very well all these concepts.
[EDIT: adding some potentially useful information]
There are many speech recognition toolkits with modules to extract MFCC feature vectors from audio files, but using than for this purpose is not always straightforward. I'm currently using CMU Sphinx4. It has a class named FeatureFileDumper, that can be used standalone to generate MFCC vectors from audio files.

What are interesting ideas for experimenting with Artificial Neural Networks? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm after a list of possible neural network implementations that can be experimented with. Possibly something that could take an hour to a week to write.
What other possibilities are there?
Here's the list so far:
Games
tic-tac-toe
Connect 4
Chess
Go
Sudoku
paper/scissors/rock
horse racing predictor
Visual recognition
Character recognition (typefaces, letters, numbers, etc)
Facial recognition
Audio recognition
Language detection
Male vs female
Word recognition
Language detection (natural, programming)
Pathfinding
"Artificial neural network driven mobile robots learn how to drive on roads in simulation." http://cig.felk.cvut.cz/projects/robo/, http://www.youtube.com/watch?v=lmPJeKRs8gE
Some links to more:
http://www.cs.colostate.edu/~anderson/res/project-ideas.html
You can combine Genetic Algorithms and Neural Networks to evolve simple neural configurations, such as Neural Networks that perform logic operations (including the phantomatic XOR!).
This is a topic I very much like because - if you think about it - it's a bare bones model of how our brains evolved (I am not saying we have logic gates in our head).
It is simple enough - and should be good fun!
In a wider way, all that cover pattern recognition and signal processing could take great advantage of neural networks.
Also, you could use neural networks to develop "pseudo-AI" for games (strategy, soccer games).
Anyway, as neural network is a tool more than a "solution", it can be used in economics, physics, navigation, signal processing, etc.
Also, many types of neural networks exist (perceptron, hopfield), the thing is to use them wisely according to the problem.
Neural networks are not panacea, just a (very interesting and powerful) tool.
what about face recognition?
Here are some problems that I think feed forward neural nets (with multiple hidden layers) might be able to solve.
Given the number of packets sent/recieved on the network interface, the volume of ambient noise, and the level of ambient light, attempt to predict the time of day.
Given a latitude and longitude, attempt to predict the elevation, or crime rate.
Given some simple metrics about the keywords in the title of an article, predict how many upvotes it has.
Given the digits of a random phone number, predict where the line terminus is located.
This is more challenging: visualize (ie, plot) the decision boundary surface of a 2-layer neural network. (With 1 layer the boundary is linear, so it's easy).