Skip to main content

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logistic_nlp_fitter-2025.12.21153404.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file logistic_nlp_fitter-2025.12.21153404.tar.gz.

File metadata

File hashes

Hashes for logistic_nlp_fitter-2025.12.21153404.tar.gz
Algorithm Hash digest
SHA256 c14a1a3e45334fc1270747c4eb2f0caea435ac7199a274b23f97a68b4ae803cb
MD5 e5e837606b2cfc71df08149b8d24fc00
BLAKE2b-256 4d4d50ca9e8f0945acfddf6d4225c5affd5711f6d7e2bd6a9f855aef030e6f9b

See more details on using hashes here.

File details

Details for the file logistic_nlp_fitter-2025.12.21153404-py3-none-any.whl.

File metadata

File hashes

Hashes for logistic_nlp_fitter-2025.12.21153404-py3-none-any.whl
Algorithm Hash digest
SHA256 8bb382e91eb7aedf897d7ad1ec7c7868bce15e0d63f3de5b5573d36f6010e661
MD5 9ca1f243ca499f4fdfcbc656fcc6f98e
BLAKE2b-256 7477498073f4dc1f77a15451bce802cd8c246b5e052cc6bf5cfd4c2da56cd7c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page