Skip to content

"machine learning-based predictions" ? #165

@tv42

Description

@tv42

My apologies for the delivery but the README looks like vibecoded AI slop.

A beautiful real-time terminal monitoring tool for Claude AI token usage with advanced analytics, machine learning-based predictions, and Rich UI. Track your token consumption, burn rate, cost analysis, and get intelligent predictions about session limits.

- **🔮 ML-based predictions** - P90 percentile calculations and intelligent session limit detection

#### 🔮 Machine Learning Predictions
- **P90 Calculator**: 90th percentile analysis for intelligent limit detection
- **Burn Rate Analytics**: Multi-session consumption pattern analysis
- **Cost Projections**: Model-specific pricing with cache token calculations
- **Session Forecasting**: Predicts when sessions will expire based on usage patterns

I see no ML here, just basic math and some applied statistics:

def calculate_cost_predictions(
self,
session_data: Dict[str, Any],
time_data: Dict[str, Any],
cost_limit: Optional[float] = None,
) -> Dict[str, Any]:
"""Calculate cost-related predictions.
Args:
session_data: Dictionary containing session cost information
time_data: Time data from calculate_time_data
cost_limit: Optional cost limit (defaults to 100.0)
Returns:
Dictionary with cost predictions
"""
elapsed_minutes = time_data["elapsed_session_minutes"]
session_cost = session_data.get("session_cost", 0.0)
current_time = datetime.now(timezone.utc)
# Calculate cost per minute
cost_per_minute = (
session_cost / max(1, elapsed_minutes) if elapsed_minutes > 0 else 0
)
# Use provided cost limit or default
if cost_limit is None:
cost_limit = 100.0
cost_remaining = max(0, cost_limit - session_cost)
# Calculate predicted end time
if cost_per_minute > 0 and cost_remaining > 0:
minutes_to_cost_depletion = cost_remaining / cost_per_minute
predicted_end_time = current_time + timedelta(
minutes=minutes_to_cost_depletion
)
else:
predicted_end_time = time_data["reset_time"]
return {
"cost_per_minute": cost_per_minute,
"cost_limit": cost_limit,
"cost_remaining": cost_remaining,
"predicted_end_time": predicted_end_time,
}

https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/blob/06f0fe11e694b8619f63f8b0db10dbdc5e7e5a44/src/claude_monitor/data/analysis.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions