Building AI: 3 theorems you need to know – DXC Blogs

Building #AI: 3 theorems you need to know #MachineLearning

  • The mathematical theorem proving this is the so-called “no-free-lunch theorem” It tells us that if a learning algorithm works well with one kind of data, it will work poorly with other types of data.
  • In a way, a machine learning algorithm projects its own knowledge onto data.
  • In machine learning, overfitting occurs when your model performs well on training data, but the performance becomes horrible when switched to test data.
  • Any learning algorithm must also be a good model of the data; if it learns one type of data effectively, it will necessarily be a poor model — and a poor student – of some other types of data.
  • Good regulator theorem also tells us that determining if inductive bias will be beneficial or detrimental for modeling certain data depends on whether the equations defining the bias constitute a good or poor model of the data.

Editor’s note: This is a series of blog posts on the topic of “Demystifying the creation of intelligent machines: How does one create AI?” You are now reading part 3. For the list of all, see here: 1, 2, 3, 4, 5, 6, 7.
Continue reading “Building AI: 3 theorems you need to know – DXC Blogs”

Scikit-Learn Cheat Sheet: Python Machine Learning (Article)

Scikit-learn cheat sheet: #machinelearning with #Python -

  • Most of you who are learning data science with Python will have definitely heard already about , the open source Python library that implements a wide variety of machine learning, preprocessing, cross-validation and visualization algorithms with the help of a unified interface.
  • If you’re still quite new to the field, you should be aware that machine learning, and thus also this Python library, belong to the must-knows for every aspiring data scientist.
  • This  cheat sheet will introduce you to the basic steps that you need to go through to implement machine learning algorithms successfully: you’ll see how to load in your data, how to preprocess it, how to create your own model to which you can fit your data and predict target labels, how to validate your model and how to tune it further to improve its performance.
  • Scikit-learn is an open source Python library that implements a range of machine learning, preprocessing, cross-validation and visualization algorithms using a unified interface.
  • >>> from sklearn import neighbors, datasets, preprocessing >>> from sklearn.model_selection import train_test_split >>> from sklearn.metrics import accuracy_score >>> iris = datasets.load_iris() >>> X, y = iris.data[:, :2], iris.target >>> X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=33) >>> scaler = >>> X_train = scaler.transform(X_train) >>> X_test = scaler.transform(X_test) >>> knn = >>> knn.fit(X_train, y_train) >>> y_pred = knn.predict(X_test) >>> accuracy_score(y_test, y_pred) Your data needs to be numeric and stored as NumPy arrays or SciPy sparse matrices.

A handy scikit-learn cheat sheet to machine learning with Python, including code examples.
Continue reading “Scikit-Learn Cheat Sheet: Python Machine Learning (Article)”

AI can now replicate ANYONE’s voice in 60 seconds or less (don’t believe anything you hear from this day forward)

AI can now replicate ANYONE’s voice in 60 seconds or less...  #AI #tech #robotics #fraud

  • A Montreal-based company called Lyrebird has developed speech synthesis technology which can almost perfectly copy someone’s voice.
  • “We are able to learn a new voice with as little data because our model is able to capture similarities between the new voice and all the voices it already knows,” explains Alexandre de Brebisson, one of the Ph.D. students involved in the system’s development.
  • And what if someone else could deliver a speech for you using the technology to replicate your voice?
  • And there are many other ways in which someone could potentially “steal” another person’s voice and cause real damage to that person’s reputation.
  • The truth is, this type of technology dehumanizes us, since our voices are an integral part of what differentiates us from others.

A Montreal-based company called Lyrebird has developed speech synthesis technology which can almost perfectly copy someone’s voice. And it can do so with very little data, needing only one minute of audio to extract the DNA of a human voice. The name is well chosen, since the Australian lyrebird is famous for its ability to almost perfectly mimic sounds in its environment.
Continue reading “AI can now replicate ANYONE’s voice in 60 seconds or less (don’t believe anything you hear from this day forward)”

GitHub

Nice work by @hereismari getting started with @TensorFlow on Android!

  • If you want to make your own version of this app or want to know how to save your model and export it for Android or other devices check the very simple tutorial bellow.
  • A full example can be seen here

    Keep an in memory copy of eveything your model learned (like biases and weights) Example: , where w was learned from training.

  • Rewrite your model changing the variables for constants with value = in memory copy of learned variables.
  • Example: Also make sure to put names in the input and output of the model, this will be needed for the model later.
  • Example:

    Export your model with:

    tf.train.write_graph(, , .

mnist-android-tensorflow – Handwritten digits classification from MNIST with TensorFlow in Android; Featuring Tutorial!
Continue reading “GitHub”

Dropout with Theano – Rishabh Shukla

Dropout with Theano  #DeepLearning #NeuralNetworks

  • In very simple terms – Dropout is a highly efficient regularization technique, wherein, for each iteration we randomly remove some of the neurons in a DNN(along with their connections; have a look at Fig. 1).
  • Here is our main Dropout function with three arguments: – A RandomStream generator, – Any theano tensor(Weights of a Neural Net), and – a float value to denote the proportion of neurons to drop.
  • So, while the model is in training phase, we’ll use dropout for our model weights and in test phase, we would simply scale the weights to compensate for all the training steps, where we omitted some random neurons.
  • Starting from the first line, we are creating a theano tensor variable , for input(words) and another variable of type , which will take a float value to denote the proportion of neurons to be dropped.
  • A few more methods, that are increasingly being used in DNNs now a days(I am omitting the standard L1/L2 regularization here):

    The reason I wanted to write about this, is because if you are working with a low level library like Theano, then sometimes using modules like might get a bit tricky.

Implementing a Dropout Layer with Numpy and Theano along with all the caveats and tweaks.
Continue reading “Dropout with Theano – Rishabh Shukla”

Scikit-Learn Cheat Sheet: Python Machine Learning

Scikit-learn cheat sheet: #machinelearning with #Python -

  • Most of you who are learning data science with Python will have definitely heard already about , the open source Python library that implements a wide variety of machine learning, preprocessing, cross-validation and visualization algorithms with the help of a unified interface.
  • If you’re still quite new to the field, you should be aware that machine learning, and thus also this Python library, belong to the must-knows for every aspiring data scientist.
  • This  cheat sheet will introduce you to the basic steps that you need to go through to implement machine learning algorithms successfully: you’ll see how to load in your data, how to preprocess it, how to create your own model to which you can fit your data and predict target labels, how to validate your model and how to tune it further to improve its performance.
  • In short, this cheat sheet will kickstart your data science projects: with the help of code examples, you’ll have created, validated and tuned your machine learning models in no time.
  • In addition, you’ll make use of Python’s data visualization library  to visualize your results.

A handy scikit-learn cheat sheet to machine learning with Python, including code examples.
Continue reading “Scikit-Learn Cheat Sheet: Python Machine Learning”

Can you tell if this music was composed by artificial intelligence?

Can you tell if this music was composed by artificial intelligence?  #technology

  • Davos download: global economic warming
  • The results showed that more than half the listeners attributed DeepBach-generated harmonies to Bach, while music by Bach was correctly identified by 75 percent of the listeners. “
  • The article is published in collaboration with Futurism .
  • Music is mathematical, and composers like Bach often made music that followed a defined, step-like flow that is almost algorithmic.
  • The views expressed in this article are those of the author alone and not the World Economic Forum.

Baroque composer Johann Sebastian Bach is known to have written many chorale cantatas, polyphonic hymns based on Lutheran texts. Each is fairly simple, featuring a single melody accompanied by three harmonies, so Gaetan Hadjeres and Francois Pachet from Sony Computer Science Laboratories in Paris thought it would be interesting to see if a machine could create chorale cantatas indistinguishable from Bach’s.
Continue reading “Can you tell if this music was composed by artificial intelligence?”