14 Comments



In this Python for Data Science Tutorial, You will learn about how to do Logistic regression, a Machine learning method, using Scikit learn and Pandas scipy in python using Jupyter notebook.
Checking for Independence in Logistic regression.
Checking for Missing Values
checking for target is ordinal or binary
Deploying and Evaluating logistic model

This is the 31th Video of Python for Data Science Course! In This series I will explain to you Python and Data Science all the time! It is a deep rooted fact, Python is the best programming language for data analysis because of its libraries for manipulating, storing, and gaining understanding from data. Watch this video to learn about the language that make Python the data science powerhouse. Jupyter Notebooks have become very popular in the last few years, and for good reason. They allow you to create and share documents that contain live code, equations, visualizations and markdown text. This can all be run from directly in the browser. It is an essential tool to learn if you are getting started in Data Science, but will also have tons of benefits outside of that field. Harvard Business Review named data scientist “the sexiest job of the 21st century.” Python pandas is a commonly-used tool in the industry to easily and professionally clean, analyze, and visualize data of varying sizes and types. We’ll learn how to use pandas, Scipy, Sci-kit learn and matplotlib tools to extract meaningful insights and recommendations from real-world datasets.

Download Link for Cars Data Set:

Download Link for Enrollment Forecast:

Download Link for Iris Data Set:

Download Link for Snow Inventory:

Download Link for Super Store Sales:

Download Link for States:

Download Link for Spam-base Data Base:

Download Link for Parsed Data:

Download Link for HTML File:

Nguồn: https://otoxetai.vn

Xem thêm bài viết khác: https://otoxetai.vn/van-tai

Author

khang@mmtgroup.vn

14 thoughts on “Logistic Regression Machine Learning Method Using Scikit Learn and Pandas Python – Tutorial 31

  1. why didn't you split the data into train and test . whatever the error metrics you checked that is for the data which was used in the model.

  2. I am unable to get anything working in the data set that I am using to build the logistic regression model after the step "Deploying and evaluating your model". I get the following error.

    —————————————————————————
    NotFittedError Traceback (most recent call last)
    <ipython-input-14-e080ceade2d3> in <module>()
    —-> 1 y_pred = LogReg.predict(X)
    2 from sklearn.metrics import classification_report
    3 print(classification_report(Y, y_pred))

    ~Anaconda3libsite-packagessklearnlinear_modelbase.py in predict(self, X)
    322 Predicted class label per sample.
    323 """
    –> 324 scores = self.decision_function(X)
    325 if len(scores.shape) == 1:
    326 indices = (scores > 0).astype(np.int)

    ~Anaconda3libsite-packagessklearnlinear_modelbase.py in decision_function(self, X)
    296 if not hasattr(self, 'coef_') or self.coef_ is None:
    297 raise NotFittedError("This %(name)s instance is not fitted "
    –> 298 "yet" % {'name': type(self).__name__})
    299
    300 X = check_array(X, accept_sparse='csr')

    NotFittedError: This LogisticRegression instance is not fitted yet

    ​Not sure what is going on. I imported all the necessary dependencies etc. and followed the instructions step by step but this is not working. In my data set, the X (independent variables) are in float64 formats. The Y (binary dependent variable) is in int64 format. Is there anything going wrong with the formats? CAN YOU PLEASE HELP!

  3. Thank you for this video. Very helpful and clear. However, please share the files via Github or some other platform that's not 4Shared if possible. 4Shared is pretty inconvenient because they won't let me download the data unless I sign up with them and even after I did that, they made me wait on their page to download (navigating away from the page also stopped their download timer). Totally put off by that.

  4. Thanks for the video. It was very well explained. How can we plot the values precession, recall and support?

  5. Hello sir,

    In classification report, I am getting 0.00 for precision, recall, f1score for true values (row as 1).
    Please help me in finding where am I going wrong.

Leave a Reply

Your email address will not be published. Required fields are marked *