xuanyi-fu / ai_project_logistic_regression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logistic Regression Tool

This is a tool built for performing regression analysis on a given dataset using logistic regression. It supports both automatic logistic regression model generated by the scikit-learn library and manual model specified by the user.

Table of Contents

  • Prerequisites
  • Setting up the environment
  • Using the tool
  • Technical skills

Prerequisites

Before using the tool, you will need to have the following libraries and packages installed:

matplotlib for creating static, animated, and interactive visualizations numpy for comprehensive mathematical functions PySimpleGUI for fast and simple GUI programming scikit-learn for the built-in, ready-to-use logistic regression model

Setting up the environment

First, make sure you have python3 installed on your device. Then, use the pip install command to install the necessary libraries and packages listed in the Prerequisites section.

$ pip install -r requirements.txt

Using the tool

To use the tool, run the main.py file in the root directory of the project using the python command. A GUI will appear, allowing you to import your dataset, specify the regularization strength of the model, choose the test size, and plot the data points.

You can also choose to use a manual logistic regression model by specifying custom weights and bias values. The dimensions of the weights and bias should match the dimensions of the data points. For example, if the data points are in a NxM matrix, the weights should be an Mx1 vector and the bias should be an Nx1 vector.

After running the model, the cost value will be calculated and displayed in the GUI, and the results will be stored in a metrics.json file. If you chose to use the automatic logistic regression model, a file containing the fitted weights will also be generated and saved.

Technical Skills

  • Customizable cost value calculation using manual logistic regression model with user-specified weights and bias values through the GUI
  • Cost function using log loss, with real-time recalculation of cost value based on user input parameters
  • Support for automatic logistic regression model generation using scikit-learn
  • Data visualization using matplotlib
  • GUI implementation using PySimpleGUI
  • Comprehensive mathematical functions using numpy

About


Languages

Language:Python 100.0%