Skip to main content

No project description provided

Project description

MSE - Mean Squared Error Calculation Package

Overview

Mean_Squared_Error is a Python package for calculating the Mean Squared Error (MSE), a common metric for evaluating regression models. This package provides a simple and efficient way to compute MSE for model predictions.

Installation

You can install Mean_Squared_Error using pip:

pip install Mean_Squared_Error

Usage

from Mean_Squared_Error import MSE

# Example usage
result = MSE([1, 2, 3], [4, 5, 6])
print(result)

MSE(y_true, y_pred)

Calculates the Mean Squared Error between true values and predicted values.

Parameters:

  • y_true (list/array): Ground truth values
  • y_pred (list/array): Predicted values

Returns:

  • float: The calculated Mean Squared Error

Examples

# Basic usage
true_values = [1, 2, 3, 4, 5]
predicted_values = [1.1, 2.2, 2.9, 4.1, 5.2]
error = MSE(true_values, predicted_values)
print(f"Mean Squared Error: {error}")

# Using with numpy arrays
import numpy as np
y_true = np.array([1.0, 2.0, 3.0])
y_pred = np.array([1.1, 1.9, 3.2])
error = MSE(y_true, y_pred)
print(f"Mean Squared Error: {error}")

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

mean_squared_error-0.4.0.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

Mean_Squared_Error-0.4.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file mean_squared_error-0.4.0.tar.gz.

File metadata

  • Download URL: mean_squared_error-0.4.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for mean_squared_error-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d2aff0f4675aa7aa9f618ba25ebfc7b1314dc1c710913a0b0643ee65b6c079d1
MD5 4c165a2b56ea0703c37bad3f10ca0948
BLAKE2b-256 81a4fa8f5c2c0c3dca18aa5bc4bb30cd467292b9481b7e1e4b34c71cb88ec276

See more details on using hashes here.

File details

Details for the file Mean_Squared_Error-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Mean_Squared_Error-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dba8c377ab40f23618476fa29fb921918489045774eafc23b1c5061d8b431299
MD5 749131f8b61faf7efaa8945f034d7644
BLAKE2b-256 2d94cd49a813f8647267c8996c3a2a8da44bd0e202fdbc9067f4e58723f2b178

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