Skip to main content

Package for econometric.

Project description

Econometrics

Author : Tran Minh Tam

Installation

You can install the package via pip:

pip install econometrics

Linear Regression

A simple econometrics package for linear regression and plotting.

Run with the package

from LinearRegression.regression import LinearRegression

# Tạo một đối tượng (instance) của lớp LinearRegression và truyền vào file dữ liệu './data_file.csv' để sử dụng trong quá trình hồi quy tuyến tính
model = LinearRegression(data_file='./data_file.csv')

# Huấn luyện mô hình
model.fit()

# In ra kết quả summary
model.summary()

# Vẽ đồ thị
model.plot()

Multiple Linear Regression

Run with the package

import numpy as np
from MultipleRegression.regression import MultipleRegression
from MultipleRegression.plot import plot_regression

# Đọc dữ liệu
filepath = "du_lieu.csv"
target_column = "Giá"  # Ví dụ: Cột giá nhà
model = MultipleRegression()
X, y = model.load_data(filepath, target_column)

# Huấn luyện mô hình
model.fit(X, y)

# In các hệ số hồi quy
print("Hệ số hồi quy:", model.get_coefficients())

# In tóm tắt mô hình
print("Tóm tắt mô hình:")
print(model.summary())

# Dự đoán thử
new_data = np.array([[2500, 3]])  # Chuyển new_data thành numpy array
prediction = model.predict(new_data)
print("Dự đoán:", prediction)

# Gọi hàm vẽ đồ thị
plot_regression(X, y, model)

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

econometrics-python-1.0.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

econometrics_python-1.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file econometrics-python-1.0.1.tar.gz.

File metadata

  • Download URL: econometrics-python-1.0.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for econometrics-python-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7dc8ff8e1b8dddd1c6331f6157aed7dcae2e32f60e9e4f22fe4bfa1dba1f486b
MD5 88fd62b3664812097f5e10dd8911443c
BLAKE2b-256 b6668e58b1c5a9e3f0713666591376d86db7e501917a21ed5ec69cb25aa39cba

See more details on using hashes here.

File details

Details for the file econometrics_python-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for econometrics_python-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2bf7baa40273ce7ea21f391097c4b894dc73a6f632867cb6bd81e8c9a18d4c42
MD5 7a229bacb3e267a2ab65bf6fc929eb78
BLAKE2b-256 e8590509d506617f535f34df03ae46b9d27973b39a439f515ace3d80e83f9ae6

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