PythonPredictions / cobra

Licence: MIT license
A Python package to build predictive linear and logistic regression models focused on performance and interpretation

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cobra

Mylearn
machine learning algorithm
Stars: ✭ 125 (+443.48%)
Mutual labels:  linear-regression, logistic-regression
Deep Math Machine Learning.ai
A blog which talks about machine learning, deep learning algorithms and the Math. and Machine learning algorithms written from scratch.
Stars: ✭ 173 (+652.17%)
Mutual labels:  linear-regression, logistic-regression
The Python Workshop
A New, Interactive Approach to Learning Python
Stars: ✭ 150 (+552.17%)
Mutual labels:  linear-regression, logistic-regression
Deeplearning
Deep Learning From Scratch
Stars: ✭ 66 (+186.96%)
Mutual labels:  linear-regression, logistic-regression
machine learning course
Artificial intelligence/machine learning course at UCF in Spring 2020 (Fall 2019 and Spring 2019)
Stars: ✭ 47 (+104.35%)
Mutual labels:  linear-regression, logistic-regression
Isl Python
Solutions to labs and excercises from An Introduction to Statistical Learning, as Jupyter Notebooks.
Stars: ✭ 108 (+369.57%)
Mutual labels:  linear-regression, logistic-regression
Machine learning
Estudo e implementação dos principais algoritmos de Machine Learning em Jupyter Notebooks.
Stars: ✭ 161 (+600%)
Mutual labels:  linear-regression, logistic-regression
Uc Davis Cs Exams Analysis
📈 Regression and Classification with UC Davis student quiz data and exam data
Stars: ✭ 33 (+43.48%)
Mutual labels:  linear-regression, logistic-regression
SGDLibrary
MATLAB/Octave library for stochastic optimization algorithms: Version 1.0.20
Stars: ✭ 165 (+617.39%)
Mutual labels:  linear-regression, logistic-regression
Python-AndrewNgML
Python implementation of Andrew Ng's ML course projects
Stars: ✭ 24 (+4.35%)
Mutual labels:  linear-regression, logistic-regression
Ds and ml projects
Data Science & Machine Learning projects and tutorials in python from beginner to advanced level.
Stars: ✭ 56 (+143.48%)
Mutual labels:  linear-regression, logistic-regression
srqm
An introductory statistics course for social scientists, using Stata
Stars: ✭ 43 (+86.96%)
Mutual labels:  linear-regression, logistic-regression
25daysinmachinelearning
I will update this repository to learn Machine learning with python with statistics content and materials
Stars: ✭ 53 (+130.43%)
Mutual labels:  linear-regression, logistic-regression
Dat8
General Assembly's 2015 Data Science course in Washington, DC
Stars: ✭ 1,516 (+6491.3%)
Mutual labels:  linear-regression, logistic-regression
Brihaspati
Collection of various implementations and Codes in Machine Learning, Deep Learning and Computer Vision ✨💥
Stars: ✭ 53 (+130.43%)
Mutual labels:  linear-regression, logistic-regression
Machine Learning Models
Decision Trees, Random Forest, Dynamic Time Warping, Naive Bayes, KNN, Linear Regression, Logistic Regression, Mixture Of Gaussian, Neural Network, PCA, SVD, Gaussian Naive Bayes, Fitting Data to Gaussian, K-Means
Stars: ✭ 160 (+595.65%)
Mutual labels:  linear-regression, logistic-regression
100 Days Of Ml Code
100 Days of ML Coding
Stars: ✭ 33,641 (+146165.22%)
Mutual labels:  linear-regression, logistic-regression
Ml
A set of machine learning experiments in Clojure
Stars: ✭ 30 (+30.43%)
Mutual labels:  linear-regression, logistic-regression
Deeplearning.ai
该存储库包含由deeplearning.ai提供的相关课程的个人的笔记和实现代码。
Stars: ✭ 181 (+686.96%)
Mutual labels:  linear-regression, logistic-regression
Machine-Learning-Models
In This repository I made some simple to complex methods in machine learning. Here I try to build template style code.
Stars: ✭ 30 (+30.43%)
Mutual labels:  linear-regression, logistic-regression

https://github.com/PythonPredictions/cobra/raw/master/material/logo.png

https://github.com/PythonPredictions/cobra/actions/workflows/development_CI.yaml/badge.svg?branch=develop

Cobra is a Python package to build predictive models using linear or logistic regression with a focus on performance and interpretation. It consists of several modules for data preprocessing, feature selection and model evaluation. The underlying methodology was developed at Python Predictions in the course of hundreds of business-related prediction challenges. It has been tweaked, tested and optimized over the years based on feedback from clients, our team, and academic researchers.

Main features

  • Prepare a given pandas DataFrame for predictive modelling:

    • partition into train/selection/validation sets
    • create bins from continuous variables
    • regroup categorical variables based on statistical significance
    • replace missing values
    • add columns where categories/bins are replaced with average of target values (linear regression) or with incidence rate (logistic regression)
  • Perform univariate feature selection based on RMSE (linear regression) or AUC (logistic regression)

  • Compute correlation matrix of predictors

  • Find the suitable variables using forward feature selection

  • Evaluate model performance and visualize the results

Getting started

These instructions will get you a copy of the project up and running on your local machine for usage, development and testing purposes.

Requirements

This package requires only the usual Python libraries for data science, being numpy, pandas, scipy, scikit-learn, matplotlib, seaborn, and tqdm. These packages, along with their versions are listed in requirements.txt and can be installed using pip:

pip install -r requirements.txt

Note: if you want to install Cobra with e.g. pip, you don't have to install all of these requirements as these are automatically installed with Cobra itself.

Installation

The easiest way to install Cobra is using pip:

pip install -U pythonpredictions-cobra

Documentation and extra material

  • A blog post on the overall methodology.
  • A research article by Geert Verstraeten (co-founder Python Predictions) discussing the preprocessing approach we use in Cobra.
  • HTML documentation of the individual modules.
  • A step-by-step tutorial for logistic regression.
  • A step-by-step tutorial for linear regression.
  • Check out the Data Science Leuven Meetup talk by one of the core developers (second presentation). His slides and related material are also available.

Contributing to Cobra

We'd love you to contribute to the development of Cobra! There are many ways in which you can contribute, the most common of which is to contribute to the source code or documentation of the project. However, there are many other ways you can contribute (report issues, improve code coverage by adding unit tests, ...). We use GitHub issues to track all bugs and feature requests. Feel free to open an issue in case you found a bug or in case you wish to see a new feature added.

For more details, check out our wiki.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].