semvec/pypi-packages huggingface dataset:
backwards-regression 0.2.0
Backwards Regression Python Library - Automated feature selection in linear and logistic regression models.
License: MIT
Requires Python: >=3.7
Keywords: statistics modeling regression feature elimination engineering

# Backwards Regression Python Library Version 0.2.0 - Automated feature selection in linear and logistic regression models. 

The Backwards Regression Python Library is an open-source toolkit for automated feature selection in regression models. It supports both linear and logistic regression, dynamically selecting the appropriate method based on the target variable, and allows users to specify the optimization method.

## Installation
```bash
pip install backwards_regression==0.2.0
```

## Load Package
```bash
## Load Package
from backwards_regression import fit_logistic_regression
from backwards_regression import fit_linear_regression
```

## Usage
```bash
## (Linear) With interactions included - set to True and Without Interactions included - set to False
result, dropped_vars = fit_linear(X, y, threshold_in=0.01, threshold_out=0.05, include_interactions=True, verbose=True, method='pinv')

## Print Selected features
print("Final included features:", result)

## Print Eliminated features
print("Dropped variables:", dropped_vars)
```
```bash
## (Logistic) With interactions included - set to True and Without Interactions included - set to False
result, dropped_vars = fit_logistic(X, y, threshold_in=0.01, threshold_out=0.05, include_interactions=True, verbose=True, method='bfgs')

## Print Selected features
print("Final included features:", result)

## Print Eliminated features
print("Dropped variables:", dropped_vars)
```

## Key Features
- Automated backward regression for linear and logistic regression models.
- Inclusion and exclusion of features based on user-defined significance thresholds.
- Optional specification of optimization method for model fitting.
- Optional inclusion of interaction terms for enhanced model complexity.

This library is suitable for data scientists, researchers, and practitioners working with regression problems who seek a streamlined approach to feature selection. The library intelligently adapts to the nature of the target variable, supporting both linear and logistic regression models, and allows for customization in the regression fitting process.

## Documentation & Examples
For documentation and usage examples, visit the GitHub repository: https://github.com/knowusuboaky/backwards_regression-0.2.0
Author: Kwadwo Daddy Nyame Owusu - Boakye\
Email: kwadwo.owusuboakye@outlook.com\
License: MIT
create2 0.1.1
Web3 create2.
License: MIT
Requires Python: >=3.12,<4.0

# README for create2

## Overview

This Python library is used to implement the create2 function of smart contracts through Python code, thereby achieving
the goal of predicting smart contract addresses and deploying smart contracts.

## Features

- **Address Prediction**: Predicts contract addresses based on chain ID, salt, and initialization code.
- **Deployment**: Simplifies the process of deploying contracts to Ethereum-based blockchains.

## Principle

- The implementation principle is to deploy factory contracts on various EVM public chains in advance, to achieve the
  native create2 function of Python. A factory contract only needs to be deployed once on each public chain. After
  deployment, it is only necessary to update the corresponding chain ID and factory contract address in the
  factory_mapping
  dictionary of this library.
- If you want to add support for a public chain not in the factory_mapping, please deploy the factory
  contract source code from the contracts in the library to the public chain you need, and then use it by submitting a
  PR
  or through monkey patching.

## Requirements

- web3

## Installation

Install the package using pip:

```bash
pip install create2
```

## Usage

### Predicting an Address

```python
from create2 import predict_address

predict_address(chain_id, salt, init_code)
```

- `chain_id`: The chain ID.
- `salt`: A hexadecimal string used as a salt.
- `init_code`: Hexadecimal string representing the contract's initialization code.

### Getting Transaction Params

If you want to deploy the contract by hand, you can get the transaction params first.

```python
from create2 import get_deploy_tx_params

get_deploy_tx_params(chain_id, salt, init_code, private_key, nonce, endpoint_uri)
```

- `chain_id`: The chain ID.
- `salt`: A hexadecimal string used as a salt.
- `init_code`: Hexadecimal string representing the contract's initialization code.
- `private_key`: Private key for signing the transaction.
- `nonce`: Transaction nonce.
- `endpoint_uri`: Endpoint URI of the blockchain node.

### Deploying a Contract

```python
from create2 import deploy

deploy(chain_id, salt, init_code, private_key, nonce, endpoint_uri)
```

- `chain_id`: The chain ID.
- `salt`: A hexadecimal string used as a salt.
- `init_code`: Hexadecimal string representing the contract's initialization code.
- `private_key`: Private key for signing the transaction.
- `nonce`: Transaction nonce.
- `endpoint_uri`: Endpoint URI of the blockchain node.

## Supported Chains

- Ethereum (ETH)
- Binance Smart Chain (BSC)
- Polygon
- BSC Testnet
- Ethereum Testnet (Sepolia)
- And more coming...

## Example

```python
from create2 import deploy

# Deploy a contract
tx_hash = deploy(
    chain_id=1,
    salt="0x123...",
    init_code="0x456...",
    private_key="0xABC...",
    nonce=0,
    endpoint_uri="https://mainnet.infura.io/v3/YOUR_PROJECT_ID"
)
print(f"Transaction Hash: {tx_hash}")
```

## Contact

For additional support or to request new features, please contact the community.

## License

[MIT License](LICENSE)

---