npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webin_decision_tree

v0.0.6

Published

Nodejs implementation of decision tree using Entropy algorithm

Downloads

24

Readme

Decision Tree for NodeJS by Kraivit Mongkhonsakunrit Build Status

This module contains the NodeJS Implementation of Decision Tree using Entropy Algorithm

Table Of Contents

Installation

npm install webin_decision_tree

Usage

  • Import the module:(id:importmodule)

      const decision_tree = require('webin_decision_tree');
  • Prepare training dataset:

      "data": [
      {"กล้าหาญ":true, "อดทน":true, "รักอิสระ":true, "classification":{"description":"กล้าหาญ อดทน รักอิสระ"}},
      {"กล้าหาญ":false, "อดทน":true, "รักอิสระ":true, "classification":{"description":"อดทน รักอิสระ"}},
      {"กล้าหาญ":true, "อดทน":false, "รักอิสระ":true, "classification":{"description":"กล้าหาญ รักอิสระ"}},
      {"กล้าหาญ":false, "อดทน":false, "รักอิสระ":true, "classification":{"description":"รักอิสระ"}},
      {"กล้าหาญ":true, "อดทน":true, "รักอิสระ":false, "classification":{"description":"กล้าหาญ อดทน"}},
      {"กล้าหาญ":false, "อดทน":true, "รักอิสระ":false, "classification":{"description":"อดทน"}},
      {"กล้าหาญ":true, "อดทน":false, "รักอิสระ":false, "classification":{"description":"กล้าหาญ"}},
      {"กล้าหาญ":false, "อดทน":false, "รักอิสระ":false, "classification":{"description":"none"}}
      ]
  • Prepare data set Demo:

      "data": [
      {"กล้าหาญ":"กล้าหาญ", "อดทน":"อดทน", "liked":false,"love":true},
      {"กล้าหาญ":"กระจอก", "อดทน":"ขี้กาก", "liked":false,"love":false},
      {"กล้าหาญ":"กล้า", "อดทน":"มีระเบียบ", "liked":true,"love":true},
      {"กล้าหาญ":"สู้", "อดทน":"ไม่กลัว", "liked":true,"love":false},
      {"กล้าหาญ":"ไม่ท้อ", "อดทน":"มีวินัย", "liked":false,"love":true},
      {"กล้าหาญ":"เข็มแข็ง", "อดทน":"ยอมแพ้", "liked":false,"love":true},
      {"กล้าหาญ":"ไม่กลัว", "อดทน":"ไม่สู้", "liked":true,"love":false},
      {"กล้าหาญ":"รับผิดชอบ", "อดทน":"กระจอก", "liked":true,"love":false}
      ]
  • Check Purge:

      const text = "กลัว ทำไมละนั้น ส้ส ควย"
      decision_tree.wordcut(text) //ตัดคำไม่สุขภาพออก

รออัพเดท Path ตอนนี้ยังเป็น Demo อยู่ในระหว่างการพัฒนาระบบ รองรับการทำ Dynamic Function , Muti Class , Muti Sub Node Decision Tree