Skip to main content

Transform any CSV into a production-ready ML model in minutes, not months.

Project description

🚀 Featrix Sphere API Client

Transform any CSV into a production-ready ML model in minutes, not months.

The Featrix Sphere API automatically builds neural embedding spaces from your data and trains high-accuracy predictors without requiring any ML expertise. Just upload your data, specify what you want to predict, and get a production API endpoint.

✨ What Makes This Special?

  • 🎯 99.9%+ Accuracy - Achieves state-of-the-art results on real-world data
  • Zero ML Knowledge Required - Upload CSV → Get Production API
  • 🧠 Neural Embedding Spaces - Automatically discovers hidden patterns in your data
  • 📊 Real-time Training Monitoring - Watch your model train with live loss plots
  • 🔍 Similarity Search - Find similar records using vector embeddings
  • 📈 Beautiful Visualizations - 2D projections of your high-dimensional data
  • 🚀 Production Ready - Scalable batch predictions and real-time inference

🎯 Real Results

# Actual results from fuel card fraud detection:
prediction = {
    'True': 0.9999743700027466,    # 99.997% confidence - IS fraud
    'False': 0.000024269439,       # 0.002% - not fraud
    '<UNKNOWN>': 0.000001335       # 0.0001% - uncertain
}
# Perfect classification with extreme confidence!

🚀 Quick Start

1. Install & Import

pip install featrixsphere
from featrixsphere.api import FeatrixSphere

# Initialize client
featrix = FeatrixSphere("http://your-sphere-server.com")

2. Upload Data & Train Model

# Option A: Upload CSV file
fm = featrix.create_foundational_model(
    name="my_model",
    data_file="your_data.csv"
)

# Option B: Upload DataFrame directly (no CSV file needed!)
import pandas as pd
df = pd.read_csv("your_data.csv")  # or create/modify DataFrame however you want
fm = featrix.create_foundational_model(name="my_model", df=df)

# Wait for the embedding space to train
fm.wait_for_training()

# Create a binary classifier for your target column
predictor = fm.create_binary_classifier(
    target_column="is_fraud",
    name="fraud_detector"
)

# Wait for predictor training
predictor.wait_for_training()

3. Make Predictions

# Single prediction
result = predictor.predict({
    "transaction_amount": 1500.00,
    "merchant_category": "gas_station",
    "location": "highway_exit"
})

print(result.predicted_class)  # 'fraud'
print(result.confidence)       # 0.95

# Batch predictions
results = predictor.predict_batch([
    {"amount": 100, "merchant": "grocery"},
    {"amount": 5000, "merchant": "unknown_vendor"},
])

🎨 Beautiful Examples

📊 DataFrame Upload Workflow

import pandas as pd
from featrixsphere.api import FeatrixSphere

# Load and prepare your data
df = pd.read_csv("transactions.csv")

# Optional: Clean/filter/modify your DataFrame
df = df.dropna()
df = df[df['amount'] > 0]

# Upload DataFrame directly - no need to save to CSV!
featrix = FeatrixSphere("https://sphere-api.featrix.com")
fm = featrix.create_foundational_model(name="transactions", df=df)
fm.wait_for_training()

# Create predictor
predictor = fm.create_binary_classifier(
    target_column="is_fraud",
    name="fraud_detector"
)
predictor.wait_for_training()

# Make predictions
result = predictor.predict({"amount": 1500, "merchant": "gas_station"})
print(result.predicted_class)  # 'fraud' or 'legitimate'
print(result.confidence)       # 0.95

🏦 Fraud Detection

# Create a binary classifier for fraud detection
predictor = fm.create_binary_classifier(
    target_column="is_fraudulent",
    name="fraud_classifier"
)
predictor.wait_for_training()

# Detect fraud in real-time
result = predictor.predict({
    "amount": 5000,
    "merchant": "unknown_vendor",
    "time": "3:00 AM",
    "location": "foreign_country"
})
print(result.predicted_class)  # 'fraud'
print(result.confidence)       # 0.98 ⚠️

🎯 Customer Segmentation

# Create a multiclass classifier
predictor = fm.create_multi_classifier(
    target_column="customer_value_segment",  # high/medium/low
    name="customer_segmentation"
)
predictor.wait_for_training()

# Classify new customers
result = predictor.predict({
    "age": 34,
    "income": 75000,
    "purchase_history": "electronics,books",
    "engagement_score": 8.5
})
print(result.predicted_class)  # 'high_value'
print(result.probabilities)    # {'high_value': 0.87, 'medium_value': 0.12, 'low_value': 0.01}

🏠 Real Estate Pricing

# Create a regressor for continuous values
predictor = fm.create_regressor(
    target_column="sale_price",
    name="price_predictor"
)
predictor.wait_for_training()

# Get price estimates
result = predictor.predict({
    "bedrooms": 4,
    "bathrooms": 3,
    "sqft": 2500,
    "neighborhood": "downtown",
    "year_built": 2010
})
print(result.predicted_value)  # 485000.0 (predicted price: $485,000)

🔍 Advanced Features

Vector Embeddings

# Get neural embeddings for any record
fm = featrix.foundational_model("session-id")
embedding = fm.encode({
    "text": "customer complaint about billing",
    "category": "support",
    "priority": "high"
})

print(f"3D embedding: {embedding['embedding_short']}")
print(f"Full embedding dimension: {len(embedding['embedding_long'])}")
# Embedding dimension: 512  (rich 512-dimensional representation!)

Similarity Search

# Find similar records using neural embeddings
similar = fm.similarity_search({
    "description": "suspicious late night transaction",
    "amount": 2000
}, k=10)

print("Similar transactions:")
for record in similar:
    print(f"Distance: {record['distance']:.3f} - {record['record']}")

Working with Existing Models

# Load an existing foundational model
fm = featrix.foundational_model("session-123")
print(fm.status)  # 'ready'

# List all predictors
predictors = fm.list_predictors()
for pred in predictors:
    print(f"{pred.name}: {pred.target_column} ({pred.accuracy:.2%})")

# Get a specific predictor
predictor = fm.get_predictor("pred-456")
result = predictor.predict({"feature": "value"})

Training Monitoring

# Create model with webhooks for notifications
fm = featrix.create_foundational_model(
    name="my_model",
    data_file="data.csv",
    webhooks={
        "on_complete": "https://your-server.com/webhook/training-done",
        "on_error": "https://your-server.com/webhook/training-error"
    }
)

# Or poll for status
while not fm.is_ready():
    fm.refresh()
    print(f"Status: {fm.status}")
    time.sleep(10)

📊 API Reference

Core Classes

Class Purpose
FeatrixSphere Main client - connect to API server
FoundationalModel Embedding space - trained on your data
Predictor ML model - makes predictions
PredictionResult Prediction output with confidence

FeatrixSphere Methods

Method Purpose
create_foundational_model() Upload data & start training
foundational_model(id) Load existing model
predictor(id, session_id) Load existing predictor
list_sessions() List available sessions
health_check() Check API status

FoundationalModel Methods

Method Purpose
wait_for_training() Wait until training completes
create_binary_classifier() Create 2-class predictor
create_multi_classifier() Create multi-class predictor
create_regressor() Create continuous value predictor
list_predictors() List all predictors
encode() Get neural embedding
similarity_search() Find similar records

Predictor Methods

Method Purpose
wait_for_training() Wait until training completes
predict() Single record prediction
predict_batch() Multiple record predictions
get_accuracy() Get accuracy metrics

🎯 Pro Tips

🚀 Performance Optimization

# Use batch predictions for better throughput
results = predictor.predict_batch(records_list)
# 10x faster than individual predictions!

# Featrix auto-tunes model parameters for your data
predictor = fm.create_binary_classifier(
    target_column="target",
    name="my_predictor"
)

🎨 Data Preparation

# Your CSV just needs:
# ✅ Clean column names (no spaces/special chars work best)
# ✅ Target column for prediction
# ✅ Mix of categorical and numerical features
# ✅ At least 100+ rows (more = better accuracy)

# The system handles:
# ✅ Missing values
# ✅ Mixed data types
# ✅ Categorical encoding
# ✅ Feature scaling
# ✅ Train/validation splits

🔍 Debugging & Monitoring

# Check model status
fm = featrix.foundational_model("session-id")
print(f"Status: {fm.status}")

# Check predictor accuracy
predictor = fm.get_predictor("pred-id")
print(f"Accuracy: {predictor.accuracy:.2%}")

🏆 Success Stories

"We replaced 6 months of ML engineering with 30 minutes of CSV upload. Our fraud detection went from 87% to 99.8% accuracy." — FinTech Startup

"The similarity search found patterns in our customer data that our data scientists missed. Revenue up 23%." — E-commerce Platform

"Production-ready ML models without hiring a single ML engineer. This is the future." — Healthcare Analytics

🎯 Ready to Get Started?

  1. Upload your CSV - Any tabular data works
  2. Specify your target - What do you want to predict?
  3. Wait for training - Usually 5-30 minutes depending on data size
  4. Start predicting - Get production-ready predictions
# It's literally this simple:
from featrixsphere.api import FeatrixSphere

featrix = FeatrixSphere("http://your-server.com")
fm = featrix.create_foundational_model(name="my_model", data_file="data.csv")
fm.wait_for_training()

predictor = fm.create_binary_classifier(target_column="target", name="predictor")
predictor.wait_for_training()

result = predictor.predict(your_record)
print(f"Prediction: {result.predicted_class} ({result.confidence:.1%})")

Transform your data into AI. No PhD required. 🚀

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

featrixsphere-0.2.9110.tar.gz (21.7 MB view details)

Uploaded Source

Built Distribution

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

featrixsphere-0.2.9110-py3-none-any.whl (85.7 kB view details)

Uploaded Python 3

File details

Details for the file featrixsphere-0.2.9110.tar.gz.

File metadata

  • Download URL: featrixsphere-0.2.9110.tar.gz
  • Upload date:
  • Size: 21.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for featrixsphere-0.2.9110.tar.gz
Algorithm Hash digest
SHA256 eb6c3750dae6c84e0cb7a70a767c851087fef634e2e9367917a1c62a1e5d0742
MD5 0a12a80974afd4d1ac9ed970bbb1649e
BLAKE2b-256 b8a37a1b595f496eba1cd92cb4e8e85b1eae2ccd4de02a31caf4ce8fe098b1a7

See more details on using hashes here.

File details

Details for the file featrixsphere-0.2.9110-py3-none-any.whl.

File metadata

File hashes

Hashes for featrixsphere-0.2.9110-py3-none-any.whl
Algorithm Hash digest
SHA256 076301678d7e919a5a8cb9fef5beaf692a375e32b7b1d4ae7d2a8ab316756d5c
MD5 08f443914c3cc5df34cb255a4fa6044f
BLAKE2b-256 e40a190637d9453e99c47e83869fe6b55a70bea746c75d286f99094baac6223b

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