From the course: Python in Excel: Data Outputs in Custom Data Visualizations and Algorithms
Unlock this course with a free trial
Join today to access over 25,400 courses taught by industry experts.
Determining trends for logistic regression with Python code
From the course: Python in Excel: Data Outputs in Custom Data Visualizations and Algorithms
Determining trends for logistic regression with Python code
- [Instructor] We are going to use the logistic regression function from the linear model section of SK Learn and the standard scaler function from the pre-processing section of the same library in addition to Pandas and NumPy. In Excel, we already imported all the libraries we're using in this course at once through the libraries sheet. Let's note in the blue cell the libraries we're using specifically for logistic regression. In Codespace, we create a data frame object stored in variable df that's exactly the same as the data table referenced in the logistic regression model in Excel. In Excel, let's create a Python code cell for the data frame object to reference the cells B2 through C12 directly on the same sheet. Now let's create our logistic regression model in Python. We'll create a logit variable and instead it equal to the logistic regression function, where we'll set the fit intercept penalty and class weight parameters inside it. Now let's scale the X values in our logistic…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Introducing AI and machine learning algorithms2m 32s
-
(Locked)
Determining trends for linear regression with Excel functions5m 4s
-
(Locked)
Leveraging Excel Solver for logistic regression2m 49s
-
(Locked)
Determining trends for logistic regression with Python code4m 17s
-
(Locked)
Grouping data with hierarchical clustering5m 5s
-
(Locked)
Grouping data with the K-Means algorithm2m 51s
-
(Locked)
Determining anomalies with anomaly detection algorithms6m 43s
-
(Locked)
Challenge: Running algorithms with Python in Excel1m 5s
-
(Locked)
Solution: Running algorithms with Python in Excel5m 10s
-
-
-