Git Product home page Git Product logo

zhangmetric's Introduction

Zhang's Metric in Golang

Overview

This project is a personal journey in learning how to read and work with sparse matrices in the NPZ format using Golang. It includes a simple Gin API that scores Zhang's Metric based on a list input in JSON format.

Getting Started

Prerequisites

  • Go 1.21

Installation

  1. Clone the repo
    git clone https://github.com/HeyLucasLeao/zhangmetric
  2. Install Go packages
    go get .

Usage

  1. Setting Dataset

    The Kaggle groceries dataset is a viable option for workaround in this project. However, any historical data that can be transformed into a CSR Matrix can also be utilized. For more information, see the eda_example.ipynb.

    Groceries Dataset: https://www.kaggle.com/datasets/irfanasrullah/groceries

  2. Setting .env

    After having the CSR Matrix witch respective ordered column products, insert the filenames inside a .env

  3. Request on API

    With running the project, send a GET request to http://localhost:8080/score, with a JSON body having the names of product you want to score. Example:

    [
    "whole milk",
    "cereals",
    "tea",
    "yogurt",
    "waffles"
    ]
    

Contact

Lucas Leão - [email protected]

zhangmetric's People

Contributors

heylucasleao avatar

Stargazers

 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.