Skip to content

Instantly share code, notes, and snippets.

@Dmoment
Created February 1, 2024 19:59
Show Gist options
  • Save Dmoment/e123cc5abc81712ac831ea4ee5e43353 to your computer and use it in GitHub Desktop.
Save Dmoment/e123cc5abc81712ac831ea4ee5e43353 to your computer and use it in GitHub Desktop.
Explore how binary trees enhance personalized course recommendations! Discover our innovative approach of converting intricate keyword expressions into results and envision a future where machine learning minimizes manual input. Join us to transform the personalized learning experience!
Tailoring course recommendations for users is an integral part of today’s personalized learning experience. However, this process can be challenging due to its inherent complexity. In this talk, I will share my experience of transforming a complex recommendation engine into a manageable and efficient process by leveraging binary trees.
The system I will be discussing involves translating expressions like (“Controlled Substances” AND “Prescribing”) OR (“Controlled Substances” AND “Substance Use Disorder”) OR (“Controlled Substances” AND “Prescribing” AND “Pain Management”) OR (“Opioids” AND “Prescribing” AND “Pain Management”) into a binary tree. Here, the ‘AND’ and ‘OR’ operators, along with keywords like “Controlled Substances”, “Prescribing”, etc., were represented as nodes in our binary tree structure.
The first step of this process was to construct the binary tree where the leaf nodes contained operands and the nodes held operators. The expressions inside the brackets were given the highest priority, and thus, positioned at the lowest level in the tree. The tree was then evaluated from the bottom up, storing the results at the parent nodes, leading to the final course recommendations being stored at the root node.
The primary focus of the talk will be an in-depth exploration of the Ruby code behind this structure, illustrating the traversal of the binary tree, evaluation of nodes, and subsequent data filtering and combination based on the ‘AND’ and ‘OR’ operators.
Looking forward, the latter part of the talk will discuss our plans to incorporate machine learning principles to further enhance the recommendation engine. Our aim is to reduce the need for manual input of complex keyword expressions and enable the system to learn and adapt to users’ behavior and needs over time.
This talk promises to provide a fascinating look into the design and operation of a course recommendation system. Whether you’re a seasoned developer or a beginner interested in innovative problem-solving techniques, you will come away with unique insights and fresh perspectives.
I look forward to the opportunity to share my experiences and findings with the Ruby community.
I have been involved in developing and maintaining the course recommendation feature, which is an essential part of our product. My first-hand experience of designing, implementing, and optimizing this system gives me an in-depth understanding of both its complexities and its potential for enhancement.
My work on this feature involved converting complex expressions into binary trees, similar to how compilers evaluate arithmetic operations. This innovative approach not only solved our problem but also significantly improved the efficiency and accuracy of our recommendation engine.
In addition, I am also part of the team that plans to incorporate machine learning principles into this system. Our goal is to reduce the need for manual input and allow the system to learn from and adapt to user behavior over time.
I am passionate about sharing the knowledge and insights I’ve gained through my work with the larger Ruby community. I believe that by sharing our experiences and solutions, we can inspire others to think creatively and tackle complex problems in novel ways.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment