Coordinated Minima Search: An Efficient Approach for Optimizing Linear and Non-Linear Regression Models.
Project description
CMS: Co-ordinated Minima Search
Overview
CMS is a Python package that provides tools for compiling and managing custom models for linear and non-linear regression analysis. It includes functions to compile linear and non-linear regression models, and to predict.
Features
- Takes a pandas dataframe at the input
- Can compile the weight and bias variables for both linear and non-linear regression models.
- Can predict output values following a given regression model.
Installation
-
Clone the repository:
git clone https://github.com/RHassan1609/cms.git
-
Install the package:
pip install .
Usage
To use the CMS package in your project, import the module and use the available functions.
from cms import compile_custom_model, compile_best_model, compile_all_models, predict
# Example: Using the compile_custom_model function
import pandas as pd
data=pd.read_csv(r'D:\CMS\training_data.csv')
compile_custom_model(data=data,powers=[1,2,1],feature_columns=[0,1,2],label_column=4,print_loss=True,model_name='cms_model',print_model=True)
# Example: Using the compile_best_model function
import pandas as pd
data=pd.read_csv(r'D:\CMS\training_data.csv')
compile_best_model(data=data,max_power=2,feature_columns=[0,1,2],label_column=4,print_loss=True,print_best_model=True,best_model_name='best_cms_model',save_first_model=True,first_model_name='first_cms_model')
# Example: Using the compile_all_models function
import pandas as pd
data=pd.read_csv(r'D:\CMS\training_data.csv')
compile_all_models(data=data,powers=[1,2,1],feature_columns=[0,1,2],label_column=4,print_loss=True,model_name='cms_model',print_model=True)
# Example: Using the predict function
test_data=pd.read_csv(r'D:\CMS\test_data.csv')
predict(data=test_data,load_model='best_cms_model',print_output=True,save_output_file=True,saved_file_name='predicted cms file')
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cms_model-0.1.0.tar.gz.
File metadata
- Download URL: cms_model-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
844afce2f0d6cba90812bb92250c241a6f76d1e799b2b036ed0dece5f50dd48b
|
|
| MD5 |
cf73121f9753ec7c81a1eb1b9697cb57
|
|
| BLAKE2b-256 |
6191c34afe7a467f543a1735304e600c2d365852393705e426a4797edfd07cbc
|
File details
Details for the file cms_model-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cms_model-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02ed9952a1bb5c4f935474f149555199a8dc34ce85a2457164014e705ddbe741
|
|
| MD5 |
94dab476a6c2e2d57cc019e2505de60d
|
|
| BLAKE2b-256 |
77d9292dc9ec9bcb76b2f088e52dc1010d834db7bced6be454972b4970c05ea6
|