A comprehensive sequence analyzer with polynomial, geometric, logarithmic, and custom pattern detection.
Project description
sg_series
sg_series is a Python sequence analyzer for detecting polynomial, geometric, logarithmic, and custom patterns (Fibonacci, Primes, AGP, Alternating, Harmonic). It can predict the next terms, extend sequences, and visualize patterns.
Installation
pip install sg_series
Features
- Polynomial pattern detection
- Geometric pattern detection
- Logarithmic pattern detection
- Custom pattern detection (Fibonacci, Primes, AGP, Alternating, Harmonic)
- Next-term prediction
- Sequence extension
- Sequence visualization
- Gap filling for incomplete sequences
Usage
from sg_series import *
seq = [1, 2, 3, 4, 5]
# Master analysis
res = analyze(seq, frac=False, format=True)
print(res)
# Single-mode analysis
poly_res = ply_analyze(seq)
geo_res = geo_analyze(seq)
log_res = log_analyze(seq)
cus_res = cus_analyze(seq)
# Predict next term
next_term = best_next(seq)
# Extend sequence
extended_seq = extend(seq, num=3)
# Fill missing gaps
seq_with_gaps = [1, None, 3, None, 5]
filled_seq = fill_gaps(seq_with_gaps)
# Visualization
plot(seq, num=3)
ply_plot(seq)
geo_plot(seq)
log_plot(seq)
Public Functions Summary
| Function | Role |
|---|---|
analyze |
Master function: runs polynomial, geometric, logarithmic, and custom analyzers. |
ply_analyze |
Detects polynomial pattern using finite differences. |
geo_analyze |
Detects geometric patterns using ratio-difference logic. |
log_analyze |
Detects logarithmic patterns. |
cus_analyze |
Runs custom pattern detectors (Fibonacci, Primes, AGP, Alternating, Harmonic). |
best_next |
Chooses the next term based on highest certainty analysis. |
extend |
Appends predicted terms to a sequence. |
fill_gaps |
Fills missing values (None) in a sequence. |
plot |
Overlays polynomial, logarithmic, and geometric plots. |
ply_plot |
Plots polynomial fit. |
geo_plot |
Plots geometric ratio fit. |
log_plot |
Plots logarithmic fit. |
help |
Returns help dictionary for all public functions. |
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 sg_series-1.0.0.tar.gz.
File metadata
- Download URL: sg_series-1.0.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58a15dcc287256ce1b0f99762a8dc9a76e8242089fb963e3b033024448cb6ffa
|
|
| MD5 |
85658c162cd101d2250a533d0de7b710
|
|
| BLAKE2b-256 |
908e5258759417dbd7d7bfbf13c1077df33cb57f353d8f8cd3c7895a25b2c288
|
File details
Details for the file sg_series-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sg_series-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
218501b2d975a4ca2ec21a5f7623947ec437e35ad77cc079458283f80f73cb37
|
|
| MD5 |
297abe0ae97c3575fabb9064a4c934bb
|
|
| BLAKE2b-256 |
40cb405aeffa8322c99eac5d0c7a899192a1b44d9503630b99c2dc79ff146091
|