Skip to main content

Rdige Model

Project description

Ridge Model

Features

  • Comprehensive Metrics: This model can be used for Regression.

Installation

Install the package using pip:

pip install IM_Ridge

#Import Necessary Functions:

from IM_Metrics import Save_Metrics
from IM_Ridge import Ridge
import pandas as pd
import numpy as np  
from sklearn.model_selection import train_test_split
from IM_Metrics import Save_Metrics

df = pd.read_excel('KR-F-10Lags-t3.xlsx')
n,m=df.shape
X=df.iloc[:,0:(m-1)]
y=df.iloc[:,(m-1)]

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.30,random_state=None,shuffle=False)

C_Ridge = 0.1
theta, y_train_pred, y_test_pred = Ridge(X_train, y_train, X_test, C_Ridge)  

metrics_filename = 'Results of Ridge.xlsx'
Save_Metrics(y_train, y_train_pred, y_test, y_test_pred,metrics_filename)

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

im_ridge-0.0.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

IM_Ridge-0.0.2-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page