A new package would help users fit logistic curves to their data by interpreting textual descriptions of datasets or growth scenarios. It would take natural language input (e.g., 'I have data showing
Project description
Logistic NLP Fitter
A Python package for fitting logistic curves to data using natural language descriptions.
Overview
The logistic_nlp_fitter package allows users to fit logistic curves to their data by interpreting textual descriptions of datasets or growth scenarios. It takes natural language input and returns structured parameters of a logistic model, such as carrying capacity, growth rate, and inflection point. This is useful for researchers, analysts, or students who want quick, automated curve fitting without manually coding or using complex statistical software.
Installation
pip install logistic_nlp_fitter
Usage
Basic Usage
from logistic_nlp_fitter import logistic_nlp_fitter
response = logistic_nlp_fitter("I have data showing population growth that starts slow, speeds up, and then slows down again")
print(response)
Using a Custom LLM
You can use your own LLM instance by passing it to the function:
from langchain_openai import ChatOpenAI
from logistic_nlp_fitter import logistic_nlp_fitter
llm = ChatOpenAI()
response = logistic_nlp_fitter("I have data showing population growth that starts slow, speeds up, and then slows down again", llm=llm)
print(response)
Using LLM7 with API Key
If you want to use LLM7 with your own API key, you can pass it directly or set it as an environment variable:
from logistic_nlp_fitter import logistic_nlp_fitter
# Using environment variable
import os
os.environ["LLM7_API_KEY"] = "your_api_key"
response = logistic_nlp_fitter("I have data showing population growth that starts slow, speeds up, and then slows down again")
print(response)
# Passing API key directly
response = logistic_nlp_fitter("I have data showing population growth that starts slow, speeds up, and then slows down again", api_key="your_api_key")
print(response)
Parameters
user_input(str): The user input text to process.llm(Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the defaultChatLLM7will be used.api_key(Optional[str]): The API key for LLM7. If not provided, the package will use the default or the one set in the environment variableLLM7_API_KEY.
Default LLM
The package uses ChatLLM7 from langchain_llm7 by default. You can find more information about ChatLLM7 here.
Rate Limits
The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you want higher rate limits, you can pass your own API key via the environment variable LLM7_API_KEY or directly to the function. You can get a free API key by registering at LLM7.
Issues
If you encounter any issues, please report them on the GitHub issues page.
Author
- Eugene Evstafev
- Email: hi@eugene.plus
- GitHub: chigwell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logistic_nlp_fitter-2025.12.21153404.tar.gz.
File metadata
- Download URL: logistic_nlp_fitter-2025.12.21153404.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c14a1a3e45334fc1270747c4eb2f0caea435ac7199a274b23f97a68b4ae803cb
|
|
| MD5 |
e5e837606b2cfc71df08149b8d24fc00
|
|
| BLAKE2b-256 |
4d4d50ca9e8f0945acfddf6d4225c5affd5711f6d7e2bd6a9f855aef030e6f9b
|
File details
Details for the file logistic_nlp_fitter-2025.12.21153404-py3-none-any.whl.
File metadata
- Download URL: logistic_nlp_fitter-2025.12.21153404-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bb382e91eb7aedf897d7ad1ec7c7868bce15e0d63f3de5b5573d36f6010e661
|
|
| MD5 |
9ca1f243ca499f4fdfcbc656fcc6f98e
|
|
| BLAKE2b-256 |
7477498073f4dc1f77a15451bce802cd8c246b5e052cc6bf5cfd4c2da56cd7c3
|