import pandas as pd
from sklearn.datasets import fetch_openml
x = fetch_openml(data_id=1461, as_frame=True, parser='pandas')
dataset = x['frame']
print(f'dataset Shape {dataset.shape}')
dataset.head()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import os | |
| import pikepdf | |
| perser = argparse.ArgumentParser() | |
| perser.add_argument('Path', metavar='path', help='PDF directory') | |
| args = perser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| ### Loss function : L(w₁,w₂) = 0.75(w₁ −2)² + 0.35(w₂−4)² | |
| ### Gradient of Loss function : ∇ L = [0.75×2×(w₁ −2), 0.35×2×(w₂−4)]ᵀ | |
| ### Hyper Parameters : Learning Rate η = 0.1 , iteration or epoch N = 100 | |
| loss_f = lambda w1,w2: 0.75*(w1-2)**2 + 0.35*(w2-4)**2 | |
| grad_f = lambda w1,w2: np.array([1.5*(w1-2),0.7*(w2-4)]) | |
| eta, epoch = 0.1 ,100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| # Frobenius norm (X) = Tr(X.X_T) X_T = Transpose of X | |
| # d(Frobenius norm)/dX = 2X | |
| # M ~ L*R | |
| # R = l*r - M | |
| # Loss_fuction = NORM(R) to be minimized | |
| # Loss_fuction = NORM(R) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
- Rust Programming Language,
- Online Link: https://doc.rust-lang.org/book/
This gist demonstrates a custom SQLAlchemy column type that allows you to save and load Pydantic models directly in your SQLAlchemy database. It simplifies the process of storing and retrieving complex pydantic data models in your database without manual conversion to JSON or dictionaries.
kindly Check Git Repo or follow steps bellow
- Building custom Column Type
- Building a nested data structure using Pydantic model
- Building a Sqlalchemy Table models using 1 and 2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.