Skip to content

Instantly share code, notes, and snippets.

View im-noob's full-sized avatar
🎯
I'm Iron man

Amritesh kumar im-noob

🎯
I'm Iron man
View GitHub Profile
@im-noob
im-noob / millions Request with payload.py
Created December 2, 2022 17:46
millions or request with payload and headers with python request and httio
'''
Reuire More than 12 GB ram to process all the request..
!pip install nest-asyncio
'''
import asyncio
from aiohttp import ClientSession
import nest_asyncio
nest_asyncio.apply()
@byelipk
byelipk / 2-ml-exercises.md
Last active April 2, 2024 13:59
Machine learning questions and answers

Exercises

1. What Linear Regression training algorithm can you use if you have a training set with millions of features?

You could use batch gradient descent, stochastic gradient descent, or mini-batch gradient descent. SGD and MBGD would work the best because neither of them need to load the entire dataset into memory in order to take 1 step of gradient descent. Batch would be ok with the caveat that you have enough memory to load all the data.

The normal equations method would not be a good choice because it is computationally inefficient. The main cause of the computational complexity comes from inverse operation on an (n x n) matrix.

O n2 . 4 to O n3

2. Suppose the features in your training set have very different scales: what algorithms might suffer from this, and how? What can you do about it?