4 Reasons Why MongoDB Atlas is great for Machine Learning

In the past, machine learning against relevant data required some heavy lifting. Most of the machine learning for something like “sentiment analytics” against social media tweets and posts required a new way of thinking about data. Traditional rows and columns in a relational database can store the text of a message but do not do so well with a thumbs up or thumbs down icon… or an emoji or a meme.

As a human, we can easily look at the above images and we immediately know the sentiment for each image. For a computer, it’s not so easy. Suppose we are trying to learn how our products are perceived on social media. To start the process we pay for a massive dump of millions upon millions of relevant social media posts. Now we have to sort through all the data, match our specific products and we find there is a lot of icons and images. We have to store the data somewhere and then we have to process the images with machine learning to make sense of them. Next, we have to store the meaning of each image in a social media post back in a database of some sort to report how many of our customers feel a particular way about our products.

Traditional approaches to this problem utilized technologies like Hadoop and Spark. These technologies require complex infrastructure and intricate machine learning programs to deduce the meaning and provide the answer. The infrastructure investment is also significant both in cost and time. The specialized skill sets required are also not easy to find. And yet, even with the huge investment of time and capital, the payout in understanding may be worth the effort.

Hadoop’s initial release date was April 1, 2006, and it offered a new way of managing a problem with large amounts of unstructured or semi-structured data that didn’t really fit in the traditional relational database. It gave us a way of moving what at been previously thought impossible to actually possible, and gave us a new term: “Big Data”

Eight years later, in May of 2014, the initial release of Apache Spark made great advancements in speed and simplicity over the initial Hadoop Map Reduce. Machine learning with Spark MLlib and Spark ML offered the complete solution. It was possible with Hadoop and Spark ML to take any type of data, process it, and make assessments and predictions with machine learning.

Big Data Jobs

A great deal has changed since Spark made its debut. Now we have the option of using the cloud to handle the infrastructure and scale-out and up when we have a big job and then scale back down when we are done. The benefit is zero-configuration, no upfront investment in hardware, and we only pay for what we use.

A second great leap forward took place in the advent of machine learning frameworks like Google’s TensorFlow. Not only is the infrastructure hosted as a service but now the machine learning platform itself is offered as a service.

The payoff is immense. The new cloud machine learning paradigm offers a low-cost simple solution. Instead of heavy upfront investments in hardware and months of development, the machine learning process is now done with a few skilled developers, a small amount of code, all running on a hosted platform.

Trending AI Articles:

1. Preparing for the Great Reset and The Future of Work in the New Normal

2. Feature Scaling in Machine Learning

3. Understanding Confusion Matrix

4. 8 Myths About AI in the Workplace

TensorFlow was developed by the Google Brain team for internal Google use. It was released under the Apache License 2.0 on November 9, 2015. In Jan 2019, Google announced TensorFlow 2.0. In May 2019, Google announced TensorFlow Graphics for deep learning in computer graphics. TensorFlow 2.0 became officially available in Sep 2019.

TensorFlow is an end-to-end open-source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications. Google claims, “Robust ML production anywhere. Easily train and deploy models in the cloud, on-prem, in the browser, or on-device no matter what language you use.”

What about the database? Much of today’s modern data is already stored as JSON documents, and with a simple process, most log entries and social media posts can be quickly converted to JSON. Once it is in JSON format, a modern document database is all you need to store the data. The proper queries against that data are all that is required to prepare it for machine learning. Even the icons can be base64 encoded and stored in the document if you like.

I decided to create my own machine learning project for a customer using Google TensorFlow and MongoDB Atlas. The customer (a convenience store operator) wanted to be able to predict the number of gallons sold based on gas price and temperature data. The question posed was “With only the input of the current temperature what would be the best price to maximize profit?” I was able to create the whole project without any prior knowledge of TensorFlow in about two weeks.

I put the finished project on GitHub here: https://github.com/brittonlaroche/realm-tensorflow If you are interested in learning AI / ML with TensorFlow and MongoDB Atlas and have zero experience I highly encourage you to take a look at the GitHub link, you could learn a lot in a short period of time.

Why MongoDB?

Reason Number 1: Flexible Data Model

MongoDB is one of the best databases for machine learning for several reasons. The first reason is that MongoDB stores JSON documents and has a flexible schema. Unlike a relational database where you have to define a schema and tables with column definitions, MongoDB allows you to load data directly without any upfront schema design. This means that you can load data from any new source and get to work immediately. Because of this basic flexibility, after I completed the work with the gas price data I then loaded in real estate data and performed machine learning on house prices without changing one single line of code.

Reason Number 2: Powerful Query Language

Once the data is loaded, MongoDB provides you with a powerful query language and secondary indexes to give you fast access to very specific values that you would want to use. You have the option to filter sort and aggregate the data, selecting and transforming the fields you need to use. This is a necessary step to prepare the data used for machine learning. This level of query sophistication not available in most NoSQL datastores.

Reason Number 3: Store and Retrieve Trained Models as JSON Documents

MongoDB is the perfect place to store, share, and retrieve the trained models. It is possible to not only store our models but keep a history of our models in the database allowing us to restore a trained model from a previous version if we chose to do so. You can create a simple trigger to store a copy of your model in a history collection. The history collection keeps a history of each of your trained models over time inside MongoDB. More importantly, sharing trained models reduce the time it takes to use those models for machine learning predictions. If I want to use an existing model for a prediction or for reinforcement learning I simply query MongoDB for the model and load it saving all the time it took to originally train the model.

Reason Number 4: MongoDB Atlas offers Database as a Service Across all Modern Cloud Providers

On June 28, 2016, MongoDB Atlas was released. Atlas is the simplest, most robust, and most cost-effective way to run MongoDB in the Cloud. Atlas is a database as a service that makes running MongoDB almost effortless, whether you run a single replica set, or a sharded cluster hosting hundreds of terabytes. As of October 2020, MongoDB Atlas was the first cloud database to enable customers to run applications simultaneously on all major cloud providers. Using multi-cloud clusters, customers can easily take advantage of the unique capabilities and reach of different cloud providers. This means customers can take advantage of the benefits of deploying applications across multiple cloud providers without the added operational complexity of managing data replication and migration across clouds. For instance, you can run your online store in Azure and have the data replicated to GCP in realtime for machine learning. Additionally, MongoDB Atlas allows you to create a free tier in any of the major cloud providers (AWS, GCP, and Azure) in just 7 minutes.

I desired to have a visually appealing demo, so I began my journey by looking into a way to provide machine learning capabilities through a web browser. I found the TensorFlow playground application where I could build my own neural network to solve classification problems utilizing my laptop’s GPU and the web browser. You can play with it as well by clicking the link below.

The playground application allows you to build and train a neural network in your web browser. Following on the heels of the successful playground application, Google released deeplearn.js in August of 2017 to allow developers to used javascript in the browser to do machine learning. In April of 2018, Google took what they had learned from deeplearn.js, and released it into the TensorFlow family by officially releasing TensorFlow.js.

I chose TensorFlow.js to showcase the power of machine learning with MongoDB Atlas and Realm in the Browser for the following reasons:

  1. Zero Installation: No Drivers / No Installations
  2. Interactive: It’s Interactive, you can play with the data.
  3. Sensors: It has access to Sensors, Webcams, and Smart Phone Data with standard APIs to access the sensors
  4. Distributed: Data can be processed and remain on the client

For these reasons, I selected TensorFlow.js and the browser for a very powerful customer demonstration. Gone are the days where you had to install a complex Hadoop infrastructure with Spark and write complex functions and logic just to do machine learning. Today With MongoDB Atlas, Tensorflow.js, and a browser you can do highly interactive machine learning with zero installation and very little complexity. The barriers to machine learning have been removed.

The result was a rather polished demo with the webpage hosted serverless in MongoDB Realm. I recorded a 7-minute demo to share with the customer. After a follow-up meeting and a hands-on demonstration, the customer signed up and began the process of integrating machine learning into their applications. I have posted the video of the application below:

After being in awe of machine learning for so long I was quite gratified to use it and see how easy it was to get started and be productive with TensorFlow.js and MongoDB. I did not have to install any infrastructure or write any complex machine learning. I was able to write my first program in 88 lines of code and run it in my browser over a weekend. This is the code below…

<html>
<head>
<!-------------------------------------------------------------------------
-- Version Date Author Comments
---------------------------------------------------------------------------
-- 1.0 10/05/2020 Britton LaRoche Initial Version
--
---------------------------------------------------------------------------
-->
https://unpkg.com/realm-web@0.9.0/dist/bundle.iife.js
https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js
<script>
const appId = "YOUR-APP-ID"; // Set Realm app ID here.
const appConfig = {
id: appId,
timeout: 1000,
};
async function run() {
let user;
try {
const app = new Realm.App(appConfig);
const credentials = Realm.Credentials.anonymous(); // create an anonymous credential
user = await app.logIn(credentials);
console.dir(user);
result = await user.functions.fnc_loadCSV("https://raw.githubusercontent.com/brittonlaroche/realm-tensorflow/main/data/fuel_sales_price.csv","InventoryDemo","FuelSales");
console.dir(result);
const mongo = app.services.mongodb("mongodb-atlas");
const db = mongo.db("InventoryDemo");
const coll = db.collection("FuelSales");
items = await coll.find({});
console.log("Items Length: " + items.length);
console.dir(items);
      //---------------------------------------------------------
//-- Data prep
//---------------------------------------------------------
      var numDocs = items.length;
var xInput =[];
var yOutput = [];
var priceTemp = [];
var totalSales = 0;
for (i=0;i<numDocs;i++){
//priceTemp = [items[i].price, items[i].high_temperature];
//totalSales = items[i].sales_total;
xInput[i] = items[i].price;
yOutput[i] = items[i].sales_quantity;
}
      //---------------------------------------------------------
//-- Tensor flow / ML Prediction Below
//---------------------------------------------------------
      // Define a model for linear regression.
const model = tf.sequential();
model.add(tf.layers.dense({units: 1, useBias: true, activation: 'linear', inputShape: [1]}));
      model.compile({loss: 'meanSquaredError', optimizer: 'sgd'});
      // Generate some synthetic data for training.
//const xs = tf.tensor2d([1, 2, 3, 4], [4, 1]);
//const ys = tf.tensor2d([1, 3, 5, 7], [4, 1]);
console.dir(xInput);
console.dir(yOutput);
const xs = tf.tensor2d(xInput, [numDocs, 1]);
const ys = tf.tensor2d(yOutput, [numDocs, 1]);
      // Train the model using the data.
model.fit(xs, ys, {epochs: 100}).then(() => {
// Use the model to do inference on a data point the model hasn't seen before:
model.predict(tf.tensor2d([3.25], [1, 1])).print();
// Open the browser devtools to see the output
});
} finally {
if (user) {
user.logOut();
}
}
}
run().catch(console.dir);
</script>
<p>Check the console</p>
Collapse
</head>
<body>
</body>
</html>

The above code ran and made a prediction, and I was amazed at how easy the process had been. Obviously, the model wasn’t trained properly and the prediction was not correct, but it did perform as expected, it just needed more training.

If you are interested in learning more about machine learning with TensorFlow.js watch a video playlist with 3 sections. I highly recommend watching the following 3 videos, about 7 minutes each. It will be the best 21 minutes you can spend to learn all the core concepts:

If you are interested in learning more I suggest you try it yourself. In a couple of hours, you can recreate the entire demo and perform your own fully functional demo with a free tier of Atlas. It costs nothing and you will learn a great deal. Check out the GitHub here: https://github.com/brittonlaroche/realm-tensorflow

I hope this article was helpful and I was able to communicate the wide-open possibilities available to you today with TensorFlow, the Google AI platform, and MongoDB Atlas.

Don’t forget to give us your ? !


4 Reasons Why MongoDB Atlas is great for Machine Learning was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/4-reasons-why-mongodb-atlas-is-great-for-machine-learning-1140406be3a?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/4-reasons-why-mongodb-atlas-is-great-for-machine-learning

Machine Learning and Generalization ErrorVC Bound in Practice

In the former article, we saw how we could replace M in our inequality with the growth function, and thereby the VC dimensions. The VC…

Via https://becominghuman.ai/machine-learning-and-generalization-error-vc-bound-in-practice-7ff80a85c1db?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/machine-learning-and-generalization-errorvc-bound-in-practice

Using Machine Learning to Recognize Objects on Hand Drawn Wireframes

For the past few years, I have been tinkering with machine learning on the side but have struggled to find ways to include it into my day job as a Sr. UX designer.

I recently saw a presentation where the UX team at Airbnb took a hand-drawn wireframe sketch and fed it into a computer using a webcam. The computer was able to recognize the wireframe objects and turn them into HTML code https://airbnb.design/sketching-interfaces/. I was awestruck.

Airbnb’s presentation led me to the question of how easy or difficult it would be to reproduce their results? Since, to my knowledge, there are no code repositories or in-depth papers to reference, this left me with few clues on getting started.

Big Data Jobs

Scope:

My initial goal was to detect a placeholder image and paragraph text on a hand-drawn wireframe fed into the computer via a scanner or webcam. A future iteration could include using the object detection size and location information from the machine learning model to dynamically insert HTML code into a web page.

Wireframe sketch with (4) placeholder image boxes and (3) paragraph text blocks.

Model:

My first step was to create a custom object detection model. Using labelImg, I marked the locations of each placeholder image and placeholder text. I did this process for both the training images and validation images.

Label Img: python program for annotating images.

After annotating the images, it was time to train the model. I used the ImageAI library in Python to create the model. Depending on the number of images and epochs, this can be a real strain on the computer CPU / disk space and can take several hours, if not days, on a standard non-GPU computer.

Trending AI Articles:

1. Preparing for the Great Reset and The Future of Work in the New Normal

2. Feature Scaling in Machine Learning

3. Understanding Confusion Matrix

4. 8 Myths About AI in the Workplace

Training the model

Results:

After training, the object detection model was ready for testing. Using a flatbed scanner, I scanned a wireframe sketch that was not part of the training or validation set. I ran the model against my scanned wireframe image to get a sense of how accurate the model was.

Wireframe sketch used to test the model.

The image below shows that the model detected both the placeholder image and the paragraph text; however, the paragraph text’s detection probability is low at 51.6%. Adding additional images to the training and verification sets could produce a more accurate model.

The model was able to detect both the placeholder image and placeholder text.

Thoughts:

While it’s easy to dismiss Airbnb’s work up as presentational fluff that gets shown to executives (been there, done that), I think their work is more substantial. Airbnb demonstrated how machine learning could automate the busy work of converting wireframe sketches into code when the design standards are well defined — leaving their designers more time to work on value-added activities. As ML continues to improve, we will see fundamental changes to both the designs themselves and the tools and workflows used for design.

Don’t forget to give us your ? !


Using Machine Learning to Recognize Objects on Hand Drawn Wireframes was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/using-machine-learning-to-recognize-objects-on-hand-drawn-wireframes-6dce077e9d61?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/using-machine-learning-to-recognize-objects-on-hand-drawn-wireframes

Support Vector Machine for Hand Written Alphabet Recognition in R

We attempt to break down a problem of hand written alphabet image recognition into a simple process rather than using heavy packages. This is an attempt to create the data and then build a model using Support Vector Machines for Classification.

Originally from KDnuggets https://ift.tt/36gpK4g

source https://365datascience.weebly.com/the-best-data-science-blog-2020/support-vector-machine-for-hand-written-alphabet-recognition-in-r

KDnuggets News 21:n04 Jan 27: The Ultimate Scikit-Learn Machine Learning Cheatsheet; Building a Deep Learning Based Reverse Image Search

The Ultimate Scikit-Learn Machine Learning Cheatsheet; Building a Deep Learning Based Reverse Image Search; Data Engineering — the Cousin of Data Science, is Troublesome; Going Beyond the Repo: GitHub for Career Growth in AI & Machine Learning; Popular Machine Learning Interview Questions

Originally from KDnuggets https://ift.tt/2MqKteH

source https://365datascience.weebly.com/the-best-data-science-blog-2020/kdnuggets-news-21n04-jan-27-the-ultimate-scikit-learn-machine-learning-cheatsheet-building-a-deep-learning-based-reverse-image-search

What to Learn to Become a Data Scientist in 2021

As data becomes the new ‘Gold’ for businesses, data scientists are set to find their value in this gold. This write-up clearly defines the job requirements and company expectations that this phenomenally evolving role entails.

Originally from KDnuggets https://ift.tt/3sWaWkV

source https://365datascience.weebly.com/the-best-data-science-blog-2020/what-to-learn-to-become-a-data-scientist-in-2021

On the beauty of a neuron expressivity matrix

On the Beauty of a Neuron Expressivity Matrix

A biological neuron is a very powerful computational device (read here to know how much powerful). Current mathematical models like threshold, ReLU and other artificial neurons are much simpler than the real neuron. Still, we don’t fully understand even the simple ones. It took many years to realize that ReLU works better than sigmoid in practice. Where else are we mistaken?

Maybe, before making neural networks bigger and bigger we need to better understand the first principles?

Common view, that a neuron is just a parametric function y =f(x,w). And by varying parameters (weights, w) we change this function. How can we say that one model(parameterization) is better than the other? The expressivity of a model is one of the criteria.

Big Data Jobs

The expressivity of a neuron is the number of functions it can realize. Imagine it as a table where the first column shows every possible input and the next columns encode different functions. Here is an example for a binary input x of size N and a binary output.

Let’s find this expressivity for a simple case: the threshold neuron with binary inputs and weights.

Try to think about the analytical expression yourself. Here is the code at google collab to test your answers. Read the solution below.

Let’s answer the easier question first: how many functions there are at all? How many ways to map binary vectors of size N to a binary number?

Our input is a binary vector of size N and can take 2^N (two power N) possible states. The output has only two states, so the number of possible functions is 2^2^N. In a general case, if you want to map X elements to Y elements, then there are Y^X possible mappings (functions).

Trending AI Articles:

1. Preparing for the Great Reset and The Future of Work in the New Normal

2. Feature Scaling in Machine Learning

3. Understanding Confusion Matrix

4. 8 Myths About AI in the Workplace

Now, the solution for a neuron.

  1. First, let’s count the number of functions with fixed weights but a varying threshold. We select weights w with exactly q ones (picture below) and enumerate all thresholds (t=0,1,2,…,N). We receive q+2 functions. Plus 2 because we get two additional functions: for t>q the neuron is not active (y=0), and for t=0 the neuron is always active y=1.

2. Next, vary the weights. The number of ways to choose q ones among N is С(q,N) (the number of combinations q from N).

Thus for a fixed number of ones we have C(q,N)q+2 distinct functions. We do not multiply combinations by “+2” because they all give the same functions (y=0 or y=1).

3. Finally, weights can have any number of ones. Thus, we sum over all q and get the answer:

Later I accidentally saw that it can be simplified to:

You can try to prove this equality. Note, that it is smaller than the total number of parameters ((N+1)*2^N), which means that different parameter combinations give the same functions.

Also, we see that expressivity is much lower than the total amount of functions 2^(2^N). That is why we need to assemble many neurons into the network to receive greater expressivity together.

And now to the beauty. Let’s plot these functions. Here is the picture for N=10.

Vertically are shown all x, enumerated from 000..0 to 111…1, horizontally — all functions that correspond to some parameters w, t. Blue shows the active neuron (y=1), white — inactive (y=0).

Here is the animation for various N for a fixed threshold(t=3). Note, the weights (w) are enumerated from 000..0 to 111…1 from the top left corner, similarly to x.

These pictures create beautiful patterns, something similar to fractals. Indeed, the expressivity matrix can be generated recursively: the matrix of size N depends on the matrix of size N-1.

Most likely, the expressivity of a threshold function for binary inputs and weights was found many decades ago and the solution is archived somewhere in the papers. But these pictures are hard to get without a computer. I have not seen them before, and perhaps no one had. You will be among the first ðŸ™‚ If someone saw them earlier, let me know in the comments.

We can easily increase the expressivity almost twice. Just use the weights as plus-minus one (w=-1, w=1) with the threshold in the range [-N, N].

The most beautiful case is when both the inputs and the weights are {-1, 1} and the threshold is put to zero (t=0). Here the expressivity equals the number of possible input vectors 2^N, thus we get a square matrix. The case for N=12 is shown at the top of the article. For other N see the animation:

If we take a discrete case w=1,2,3,…, it appears there is an upper bound when discretization does not give new functions. For a binary, input this bound is [-N, N], so it makes sense to take only 2N+1 states of weights. The real weights will not improve expressivity further. That is the maximum we can squeeze from this model.

Motivation

Why do we care about the expressivity of a neuron and such a simple threshold model with discrete parameters?

First of all, it gives a better infinitive understanding of what learning is. For classification with a teacher, there is some unknown function f*. The teacher shows examples (x, y) generated from this function y =f*(x). The goal is to find f* or at least the most similar to it. The neuron (or a neural network) gives possible candidates (our expressivity) what this function might look like. If the teacher gives all 2^N examples (for a binary vector) this would be the same as if it gives the function f* itself. In this case, our goal is to find the parameters w,t that realize the most similar function to f* (remember, it is just a column in the expressivity matrix). The greater the expressivity, like in the neural networks, the more similar function we can. However, data is always not enough. So we need to find the function that is the most similar to what we know (in-sample or the training error). As well, it should be close to what we do not know (out-of-sample, generalization, or the test error). Interestingly, larger expressivity is not necessarily better, it could harm the generalization. There is a balance that is called bias-variance tradeoff that lies in the heart of a statistical learning theory.

For unsupervised learning the target function f* is not set by a teacher, we need to define it ourselves. For example, for data compression, we need to choose the function that on average would activate the neuron at 50% times. In this case, it has the maximum entropy and preserves the most information about the input x.

Lastly, models with discrete parameters are more efficient in hardware realization. The trend to move deep learning models into portable devices is on the rise. Still, most methods rely on backpropagation for learning. Understanding the basic principles of discrete parametric functions may lead to more efficient models of learning. In addition, it even can give hints to how the real neurons learn. Hopefully ðŸ™‚

Also, we need to remind ourselves that we might ask the wrong questions. Commonly assumed, that learning is the change of parameters of a function according to some criteria. Mostly, people try to improve learning algorithms and complicate architecture (parametrization). What if there is something deeper and more fundamental?

Maybe we need to understand at first how to write information in distributed systems like neural networks? The next articles of this blog will elaborate more on this question.

This is the 6th article in the blog series “AI Territory”.

Later, I plan to publish a paper related to the content of this article but wider and with more details.

Do not miss, and subscribe to Facebook and Twitter.

Read other articles here.

Don’t forget to give us your ? !


On the beauty of a neuron expressivity matrix was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/on-the-beauty-of-a-neuron-expressivity-matrix-63e9797e25e3?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/on-the-beauty-of-a-neuron-expressivity-matrix

Why Youre Using Spotify Wrong

And how you can hijack the recommendation algorithm to improve your mood.

Have you ever had the eerie experience of typing just one word into a search query and having the rest auto complete perfectly? That has a happened to me even while searching the most seemingly random and esoteric of topics. It’s… uncomfortable.

The age of machine learning and big data have paved the path to create algorithms that know what you want even before you do. While it is unfortunate that most of our smartest technology seems geared to sell us more stuff, many of the same algorithms can be used deliberately to your advantage.

Big Data Jobs

Spotify is the perfect example.

When I became a Spotify user back in 2013, my music taste was as diverse as Trump’s cabinet; which is to say, not very. My music taste ranged from the Anti-Flag and Bad Religion to Yellowcard and Zebrahead. Yet in the years since then, Spotify has identified what I liked about punk rock music and slowly introduced more variety to my recommendations.

They’re probably clapping at the latest episode of A Prairie Home Companion

The Spotify recommendation algorithm is amazing and has been written about extensively elsewhere. I would recommend this piece on Medium’s OneZero if you’re interested in learning more about it.

I don’t want to talk about how it works. I want to show you how to use it. The amazingly accurate recommendation algorithm can be your personal tool to happiness, relaxation, or whatever emotion you would like to classically condition yourself to feel.

For me, I built a mood boosting playlist. 2020 was a rough year and having a playlist that I could listen to that almost guaranteed I felt better was a lifesaver. While building a playlist is easy, curating one that harnesses THE POWER OF THE MACHINES is a bit trickier.

Here’s how I did it

Trending AI Articles:

1. Preparing for the Great Reset and The Future of Work in the New Normal

2. Feature Scaling in Machine Learning

3. Understanding Confusion Matrix

4. 8 Myths About AI in the Workplace

Step One

First you need some variety. If your whole playlist is punk rock, that’s mostly what you’ll get as recommendations. Create a temporary playlist with the express purpose of tricking Spotify into thinking you have a wide variety of music that you like. You want the algorithm to “wake up” and get to work trying to figure out what you’re doing.

I started with some songs from Vini Vici, Roberto Cacciapaglia, Solomon Burke, Canned Heat, Alice et Moi, and Joe Cuba. The idea is to have as varied a playlist as possible that Spotify can start to analyze. Look for songs you like in genres you don’t typically listen to. If you don’t listen to this new playlist, you wont get new recommendations based off of the diverse songs.

Step Two

Create a conditioning playlist. This is where you will put the good recommendations. It could be named anything. Mine is “Relaxed Music”. It’s empty now, you’ll add songs that make you feel your targeted emotion. Not a lot to say about this so we’ll move on.

Step Three

Use the Discover Weekly playlist. You have to listen to the songs that Spotify will start to recommend. Do this regularly. Think of it as the inputs to your conditioning playlist.

This step can be tricky to get right. Really? Listening to a playlist is tricky? Yes.

Here’s why.

You’re not trying to analyze the songs. You’re trying to get lost in the moment and then temporarily take note of the soundtrack. For me, I listen to my headphones while I clean the kitchen at night. I’ve done it almost every night for a few years now (adulting) and so it is a task I don’t have to think about. I can almost meditate while I’m cleaning on auto-pilot.

Now when you’re lost in that moment but you can feel yourself feeling happy, relaxed, or comforted, quickly save that song to your conditioning playlist.

Step 4

Now listen to your conditioning playlist. Sometimes when I find a song that has me feeling my conditioned feeling, I’ll jump to my conditioning playlist while I finish cleaning. This will have the duel effect of telling Spotify that this is the type of song you’re looking for, as well as telling your brain that this is the playlist that you listen to when you feel happy. Classical conditioning.

Additionally, listen to this playlist when you’re doing something you really enjoy. For me, I like to have it on when we have friends over. Again, you want your brain to keep associating this playlist with a feeling and if you can create that feeling, use the playlist to reenforce it.

Step 5

Keep listening to your Discover Weekly and building your conditioning playlist. Over time, just like a slobbery Pavlovian dog, you’ll find that you can shape your mood with your playlist.

https://open.spotify.com/playlist/1UKEN6Kmazvt81jV25c1Xc?si=VkWZfJGbQDidwioz3GXo4w for the interested.

Conclusion

Artificial intelligence works much the same way as non-artificial intelligence. It makes connections and then reenforces connections that get used often. By being deliberate with the recommendation algorithm and to your own listening habits, you can quickly leverage one of the best recommendation tools in the world along with the largest library of music ever compiled to have fresh songs delivered to you regularly.

It will boost your mood and you might even diversify your tastes as a side benefit.

What do you think? Are there other algorithms that can be deliberately used to actually help you feel better? Are there non-machine recommended songs you would suggest for boosting your mood? Leave a comment. I would love to hear from you.

Don’t forget to give us your ? !


Why You’re Using Spotify Wrong was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Via https://becominghuman.ai/why-youre-using-spotify-wrong-b827eb47c249?source=rss—-5e5bef33608a—4

source https://365datascience.weebly.com/the-best-data-science-blog-2020/why-youre-using-spotify-wrong

Design a site like this with WordPress.com
Get started