Skip to content

fadhilmuh/machine_learning_practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

Custom Machine Learning Model

This repository contains a custom implementation of a Decision Tree Classifier and Regressor in Python. The code contained in this repository is for self-practice purposes only. Please refrain from using these models for deployment. I recommend using scikit-learn's models for production use.

Contents

Introduction

The models implemented here may not be optimal. The purpose i made this repository is because i am learning to build machine learning algorithms from scratch. If you like to try some models i have built, you can pull this repository and follow some example on how to use it.

Usage

Use this to create a machine learning model. Again, i recommend using scikit-learn's models for production use.

Example

If you want to use the custom DecisionTreeClassifier in your project or anything else, follow these steps:

  1. Clone this repository to your workspace (if you have not done it)

    !git clone https://github.com/fadhilmuh/machine_learning_practice.git
  2. Import the model you want. For example, DecisionTreeClassifier class:

    from machine_learning_practice.models.decision_trees import DecisionTreeClassifier

    or import the whole library

    import machine_learning_practice as MLP
  3. initialize the DecisionTreeClassifier:

    tree = DecisionTreeClassifier()

    or if you use from the main library (following the previous step)

    tree = MLP.models.decision_trees.DecisionTreeClassifier()
  4. fit the tree with your data

    tree.fit(features, target)

further example is available in the example directory.

About

My machine learning repository

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages