Code Monkey home page Code Monkey logo

xgboost_indicators_2's Introduction

XGBoost Model for Technical Indicators (Finding Features with XGBoost)

This repository is dedicated to training and evaluating an XGBoost classifier on the Bitcoin technical indicators dataset. It aims to predict trading signals (like 'long', 'short', or 'neutral') based on the values of various indicators.

Note

The Signal column, which serves as the target for this model, is generated from the Technical Analysis Repository. Ensure you've processed your data there to obtain the Signal labels before using this model.

Features

  1. Data Cleaning: Removes rows with NaN values from the dataset.
  2. Data Preprocessing: Uses label encoding for the target column (Signal) and prepares the training and test data.
  3. XGBoost Classifier: An XGBoost model is trained on the dataset.
  4. Feature Importance: Evaluates and visualizes the importance of each feature used in the model.
  5. Model Evaluation: Evaluates the model's performance using metrics such as accuracy, ROC-AUC score, and more. It also provides a classification report and a confusion matrix.

Installation

Make sure you have the following Python packages installed:

  • numpy
  • matplotlib
  • xgboost
  • sklearn

You can install them using pip:

pip install numpy matplotlib xgboost scikit-learn

Usage

  1. Clone this repository.
  2. Navigate to the repository's root directory in your terminal.
  3. Run the code using the following command:
python xgb.py

Sample Outputs

The code will generate:

  • A bar chart showcasing the feature importances.
  • A printed confusion matrix, classification report, accuracy score, and ROC-AUC score.
  • A ROC curve plot. Feature Importance Chart ROC Performance

Related Projects

  • Technical Analysis Repository: This repository fetches 120 days of hourly Bitcoin price data, calculates technical indicators, and analyzes the relations between these indicators.
  • XGBoost Model Optimization: Optimizing the hyperparameters of an XGBoost classifier using the hyperopt library.

xgboost_indicators_2's People

Contributors

tzelalouzeir avatar

Watchers

 avatar

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.