Git Product home page Git Product logo

pyspark-pipeline-model's Introduction

PySpark_Pipeline_Model_on_Databricks

Introduction:

This project is an example solution of a Machine Learning problem using PySpark in Databricks.

Databricks is an organization and big data processing platform. It provides a just-in-time cloud-based platform for big data processing clients.

The data used in this project is formed by credit card applications. The problem consists of predicting whether an application will be approved or not, therefore it is a binary classification problem.

The solution presented is made using tools especially well suited for parallel processing.

Data:

The data used for this project is a set of credit card applications.
https://archive.ics.uci.edu/ml/datasets/credit+approval

Requirements:

Pandas API on Spark: High-level API in Python for Apache Spark. It allows users to take advantage of the scalability and distributed computing capabilities of Spark while using the familiar and easy-to-use data structures and data analysis tools of Pandas.

PySpark MLlib: A scalable machine learning library built on top of Spark. It consists of common learning algorithms and utilities. It is mainly used to take advantage of the parallel processing capabilities of Spark.

Description:

After reading the dataset located in the Databricks FileStore folder, the Pyspark dataframe is transformed into a pandas API on Spark dataframe. Preprocess steps like converting data types or imputing missing values are performed.

Once the dataframe is well prepared, a pipeline model is created comprising several stages like string indexers, vector assembler, or the random forest classifier.

Then, using the CrossValidator and the ParamGridBuilder tools, the pipeline model is trained to find the best hyperparameters to solve the problem.

Finally, the best model is selected and the best parameters are shown. A feature importance analysis is also displayed to measure the contribution of each variable to the model predictions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.