Casebased is a Python library that provides a flexible and extensible framework for implementing case-based reasoning (CBR) systems. CBR is a problem-solving paradigm that focuses on solving new problems by adapting solutions that were used to solve similar past problems.
| Feature | Description |
|---|---|
| Case Representation | Represent cases using a variety of data structures, including dictionaries, JSON, and custom classes. |
| Case Retrieval | Implement different case retrieval algorithms, such as nearest neighbor, fuzzy matching, and knowledge-guided search. |
| Case Adaptation | Provide functions to adapt retrieved cases to fit the current problem. |
| Case Evaluation | Assess the quality of the adapted solution and provide feedback to the system. |
| Case Learning | Automatically learn from successful and unsuccessful problem-solving experiences to improve future performance. |
| Extensibility | Easily integrate the library with your own domain-specific data and algorithms. |
You can install the casebased library using pip:
pip install casebased
Here's a simple example of how to use the casebased library:
case_base = CaseBase()
case_base.add_case({
"problem": {
"symptoms": ["fever", "headache", "sore throat"],
"duration": 3
},
"solution": {
"medication": "paracetamol",
"dosage": "500mg every 6 hours"
}
})case_base.add_case({
"problem": {
"symptoms": ["cough", "runny nose", "fatigue"],
"duration": 5
},
"solution": {
"medication": "ibuprofen",
"dosage": "400mg every 8 hours"
}
})new_problem = {
"symptoms": ["fever", "headache", "sore throat"],
"duration": 2
}
retriever = NearestNeighborRetriever()
similar_case = retriever.retrieve(case_base, new_problem)
print(f"Similar case: {similar_case}")
print(f"Suggested solution: {similar_case['solution']}")You can see the list of available releases on the GitHub Releases page.
We follow Semantic Versions specification.
We use Release Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when youβre ready. With the categories option, you can categorize pull requests in release notes using labels.
| Label | Title in Releases |
|---|---|
enhancement, feature |
π Features |
bug, refactoring, bugfix, fix |
π§ Fixes & Refactoring |
build, ci, testing |
π¦ Build System & CI/CD |
breaking |
π₯ Breaking Changes |
documentation |
π Documentation |
dependencies |
β¬οΈ Dependencies updates |
You can update it in release-drafter.yml.
GitHub creates the bug, enhancement, and documentation labels for you. Dependabot creates the dependencies label. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.
This project is licensed under the terms of the MIT license. See LICENSE for more details.
@misc{casebased,
author = {casebased},
title = {CaseBased is a python library that implements the priciples of case-based reasoning.},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/casebased/casebased}}
}This project was generated with python-package-template