semvec/pypi-packages huggingface dataset:
kowalsky 0.0.44
A small package for all useful ML things
Requires Python: >=3.6

# Kowalsky, analysis!

A simple package for handful ML things and more.

## What's new? [v0.0.39]
* add ```feature``` package with two types of analysis + support для остальных функций
   * Recursive Feature Elimination
   * Sequential Feature Selection
* improve optimize:
   * ```EarlyStopping``` mechanism
   * optimization graph
   * multitasks with ```n_jobs=-1```
* add ```logs``` package

## What's inside?

1. ```analysis``` - method for evaluation of specified model with
   given dataframe. With ```export_test_set=True``` it exports
   ready for submission predictions.
   
2. df - module for working with dataframe:
    * ```corr``` - sort all correlated features.
    * ```handle_outliers``` - fill or drop columns with outliers.
    * ```log_transform``` - transform columns with log function.
    * ```group_by_mean``` - make additional columns with aggregated mean
    * ```group_by_max``` - make additional columns with aggregated max
    * ```group_by_min``` - make additional columns with aggregated min
    * ```apply_with_progress``` - apply heavy function for each row of dataset.
    * ```scale``` - scale columns with Standard of MinMax scalers
    
3. kaggle:
    * ```submit``` - make submit-file for kaggle based on sample
    
4. logs:
    *  ```profile_memory``` - logs all heavy variables
    *  ```make_pretty_pyplot``` - makes pyplot look better :)
    
5. optuna - handful methods for working with optuna:
    * ```optimize``` - optimize model with given dataframe
    * ```optimize_super_learner``` - optimize super learner configuration
   with given set of models and set of heads (meta_model)
      
6. colab:
    *  ```csv``` - read csv file located at Google Drive with
       specified id
    *  ```path``` - get path to Google Drive file

7. feature:
    *  ```rfe_analysis``` - Recursive Feature Elimination analysis
    *  ```sfs_analysis``` - Sequential Feature Selection analysis
    
## What's next?

- [ ] Use ```optuna``` for searching the best feature amount
- [ ] Add file logger to track the progress in ```JupterLab```
   
## Example:
```
!pip install kowalsky --upgrade
from kowalsky.optuna import optimize
optimize('RFR',
         path='../input/project/feed.csv',
         scorer='acc',
         y_label='y_label',
         trials=3000)
```

## Avaliable models:
#### Gradient Boosts
```
    'xgbR': XGBRegressor
    'xgbC': XGBClassifier
    'lgbR': LGBMRegressor
    'lgbC': LGBMClassifier
```

#### Trees
```
    'rfR': RandomForestRegressor
    'rfC': RandomForestClassifier
    'dtR': DecisionTreeRegressor
    'dtC': DecisionTreeClassifier
    'etR': ExtraTreeRegressor
    'etC': ExtraTreeClassifier
```

#### Ensemble
```
    'baggC': BaggingClassifier
    'baggR': BaggingRegressor
    'adaR': AdaBoostRegressor
    'adaC': AdaBoostClassifier
    'cbR': CatBoostRegressor
    'cbC': CatBoostClassifier
```

#### KNeighbors
```
    'knC': KNeighborsClassifier
    'knR': KNeighborsRegressor
```

#### SVM
```
    'svR': SVR
    'svC': SVC
```
anki-sqlalchemy 0.3.0
Clean python interface for interacting with Anki's database
Requires Python: >=3.6

[![PyPi Version](https://img.shields.io/pypi/v/anki_sqlalchemy.svg)](https://pypi.python.org/pypi/anki_sqlalchemy/)

Anki SQLAlchemy is an interface for interacting with the
[Anki](https://apps.ankiweb.net/) sqlite database from python without having to
either hack an Anki install or figure out the database structure and field
serialization from scratch.

The goal of this project is not to support every version of Anki entirely. The
current version supports at a signficant amount of the Anki 2.1.38.

Here is a small code snippet written first without `anki_sqlalchemy` to show
how unintuivite the data format and columns names are without an wrapper.

```python
# plain python without anki-sqlalchemy
import sqlite3

conn = sqlite3.connect('backup.db')
cursor = conn.execute("SELECT id, tags FROM notes WHERE mod >= ?", [1445394366])
note = cursor.fetchone()
note[0]  # 1428143940996
note[1]  # ' edit math probability wikipedia '

cursor = conn.execute("SELECT mod, type FROM cards WHERE nid = ?", [nid])
card = cursor.fetchone()
card[0]  # 1445394366
card[1]  # 2
```

```python
# with anki-sqlalchemy
import datetime
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from anki_sqlalchemy import Card

engine = create_engine("sqlite:///backup.db", echo=True)
Session = sessionmaker(bind=engine)
session = Session()

note = session.query(Note).filter(Note.modification_time >= datetime.datetime(2017, 2, 5, 21, 29, 49)).first()
note.id  # 1428143940996
note.modification_time  # datetime.datetime(2017, 2, 5, 21, 29, 49)

card = note.cards[0]
card.modification_time  # datetime.datetime(2019, 11, 5, 22, 23, 3)
card.type  # <CardType.due: 2>
```

Anki SQLAlchemy also plays nicely with types too.

```python
card: Card = session.query(Card).first()
reveal_type(card.modification_time)
# Revealed type is 'datetime.datetime*'

reveal_type(card.note.tags)
# Revealed type is 'builtins.list*[builtins.str]'
```

# BEWARE!

This package can be used to make changes to your anki database. Before
proceeding, please make a backup of your database file. You don't want to lose
all your work with a bad query.

The Anki database typically lives in a `collection.anki2` file.

# Install

```
pip install anki_sqlalchemy
```