/Logistic-Regression

Implementing a logistic regression program to predict whether a patient has heart disease or not based on some features.

Primary LanguagePython

Logistic-Regression-

Implementing a logistic regression program to predict whether a patient has heart disease or not based on some features.

Write a python program in which you: a- Use these 4 features (trestbps, chol, thalach & oldpeak) as input and the output to be predicted is the “target”. b- Split the dataset into training and testing sets. c- Use sklearn’s logistic regression to build a model that fits the training data. Then, use that model to predict the output of the test data and print the error of the model. d- Implement logistic regression (from scratch) using gradient descent to optimize the parameters of the hypothesis function. e- Use the optimized hypothesis function to make predictions on new data. f- Calculate the cost (error) in every iteration to see how the error of the hypothesis function changes with every iteration of gradient descent. g- Plot the cost against the number of iterations.