Edit model card

bhaskar1

The above model is a simple neural network built using TensorFlow/Keras. It is designed to perform a regression task, which means it predicts continuous numeric values based on input features.

Keras Model for Time Series Prediction

This repository contains a Keras model trained for time series prediction.

Model Overview

The model is a simple neural network built using Keras. It is designed to perform regression tasks, predicting a numeric value from input features.

Architecture

  • Input Layer: 10 neurons, ReLU activation
  • Hidden Layer: 10 neurons, ReLU activation
  • Output Layer: 1 neuron (for regression)

How to Use the Model

To use this model, follow the steps below:

1. Install Required Libraries

Make sure you have the necessary libraries installed:

pip install tensorflow huggingface-hub pandas matplotlib

#load the model from the Hugging Face Hub:
import tensorflow as tf
from huggingface_hub import from_pretrained_keras
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

# Load the model from Hugging Face Hub
model = from_pretrained_keras("iiitbh18/bhaskar1")

# Prepare Dummy Data

# Create a DataFrame with dummy data
dummy_data = {
    'timestamp': [
        '2024-08-07 02:43:28.788',
        '2024-08-07 02:43:28.788',
        '2024-08-07 02:43:43.788',
        '2024-08-07 02:43:43.788',
        '2024-08-07 02:43:58.788'
    ],
    'value': [
        99.00000005960464,
        98.90000000596046,
        98.70000004768372,
        99.00000005960464,
        98.89999993145466
    ]
}

df = pd.DataFrame(dummy_data)

#Prepare Data for Prediction

X_dummy = df['value'].values.reshape(-1, 1)  # Reshape to match model's input shape








# Make Predictions

predictions = model.predict(X_dummy)
print("Predictions:", predictions)

#Visualize the Results

# Plot actual vs. predicted values
plt.figure(figsize=(10, 6))
plt.scatter(df['timestamp'], df['value'], color='blue', label='Actual Values')
plt.scatter(df['timestamp'], predictions, color='red', label='Predicted Values')
plt.xlabel('Timestamp')
plt.ylabel('Value')
plt.title('Actual vs Predicted Values')
plt.legend()
plt.xticks(rotation=45)
plt.show()
Downloads last month
0
Inference API
Unable to determine this model’s pipeline type. Check the docs .