Skip to main content

Logistic NLP Fitter

PyPI version License: MIT Downloads LinkedIn

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 default ChatLLM7 will 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 variable LLM7_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

Metadata

Release files for logistic-nlp-fitter 2025.12.21153404

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logistic-nlp-fitter 2025.12.21153404
File Size Uploaded
logistic_nlp_fitter-2025.12.21153404.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for logistic-nlp-fitter 2025.12.21153404
File Interpreter ABI Platform
logistic_nlp_fitter-2025.12.21153404-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / logistic_nlp_fitter-2025.12.21153404.tar.gz

Download URL logistic_nlp_fitter-2025.12.21153404.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c14a1a3e45334fc1270747c4eb2f0caea435ac7199a274b23f97a68b4ae803cb
BLAKE2b-256 checksum
How to use checksums
4d4d50ca9e8f0945acfddf6d4225c5affd5711f6d7e2bd6a9f855aef030e6f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / logistic_nlp_fitter-2025.12.21153404-py3-none-any.whl

Download URL logistic_nlp_fitter-2025.12.21153404-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bb382e91eb7aedf897d7ad1ec7c7868bce15e0d63f3de5b5573d36f6010e661
BLAKE2b-256 checksum
How to use checksums
7477498073f4dc1f77a15451bce802cd8c246b5e052cc6bf5cfd4c2da56cd7c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

2025.12.21153404 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page