Original article URL: https://goo.gl/Qfq8Ah

on people who have and have not purchased your car, you should be able to make a prediction on whether or not someone would buy your car. A machine learning classifier can predict whether someone will purchase your car by comparing information on them with the information of hundreds or thousands of other people who may or may not have bought it. We also imported our data set, “Customer_Information.csv” (shown on the right). This set contains the information of 400 people, their gender, age, annual salary, and whether or not they bought the car. The independent variables are the age and estimated salary. When we are training our machine learning classifier to figure out who will buy our car we follow a similar process. We divide our data set into two different sets, a training set and a test set. The model uses the training set to find correlations between the dependent variable and independent variables. Then, we give it the test set (without the dependent variable) and it uses what it learned to make predictions on the dependent variable. In the snippet above, we use the train_test_split module from the sklearn.cross_validation library to divide our data set. Our data set is stored into 4 variables: X_train (training independent variables), y_train (training dependent variables), X_test (test independent variables), and y_test (actual answers to the test independent variables). In order to do this, we use the StandardScaler module from the sklearn.preprocessing library to scale all of our independent variables. It’s finally time to start training our algorithm and predicting the results of our training set! y_pred is the predictions made by the classifier for the test set (X_test). Over-fitting means that your model strictly follows the EXACT rules it found in the training set. For example, if you are trying to predict whether or not a 40 year-old man with a $35,000 salary purchased a car and the classifier hasn’t trained on this exact data point, it will likely default to saying they didn’t purchase it even though this might not be accurate. A quick way to check how many predictions were right/wrong is to use a confusion matrix: Confused? The number in the top left will represent how many times we predicted someone would buy a car and they did. The number in the top right will represent how many times we predicted someone would buy a car, but didn’t. Let’s look at this possible confusion matrix for our problem: Our confusion matrix informs us that we got 92 out of the 100 test predictions correct (63 + 29). Using the matplotlib library, we can create beautiful graphs to visualize the correlations the model made during the training and how well the predictions followed them. In the future, any time you face a difficult data-related problem, you can create your own handy Machine Learning model to help you make the best decisions possible ;) Portfolio: https://tks.life/profile/vedant.gupta where the future is written

Original word count: 1265
Summarized word count: 491
Percent reduction: 61.19%
Time reduction: 6 minutes to 2 minutes
['TECHNOLOGY']
This post has been viewed 227 times.

The TextSaver is a simple free tech tool to help save bits of text. You can use it to save notes, text messages, archive text messages from an iPhone or Android, save HTML, avoid PDFs, export messages, lists, phone numbers, addresses, really whatever you want. Please note that saved text is not hidden from the public unless you use the password utility. When using a password, the text will only be viewable to those with a password. Use it for fun, use it for war, use it to control the minds of your enemies.

Legal Disclaimer The website https://textsaver.flap.tv/ (hereinafter referred to as "TextSaver") is a platform designed to allow users to store and share bits of text. TextSaver and its owners do not review, approve, endorse, or make any representations about the legality, accuracy, reliability, completeness, or quality of the content posted by its users. The content reflects the views and responsibility of the person or entity that posts it and does not necessarily represent the views of TextSaver. By using TextSaver, you agree that TextSaver, its owners, affiliates, employees, or agents shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content available on or through TextSaver. Users are solely responsible for their content, including compliance with intellectual property laws, confidentiality obligations, and applicable local laws. TextSaver expressly disclaims all liability in relation to the content posted by users. If you believe that any content on TextSaver infringes upon your intellectual property rights or is otherwise unlawful, please contact us with detailed information, and we will take appropriate action in accordance with our policies and applicable laws.