Adaptive Boosting, or AdaBoost, is a boosting algorithm that combines multiple low-accuracy (weak) models to form a single high-accuracy (strong) model. It works by sequentially training these weak learners, each one focusing more on the errors made by the previous ones. Any machine learning algorithm that supports weighted training samples—such as Decision Trees, Logistic Regression, […]
Gradient boosting classifier
Gradient Boosting is an ensemble technique that builds a strong model by combining multiple weak decision trees. While it may seem similar to a Random Forest, there’s a key difference: in Random Forests, each tree is built independently, whereas in Gradient Boosting, trees are built sequentially, with each new tree correcting the errors of the […]
Kaggle House price prediction Regression Analysis
train_df = train_df.drop(columns=[‘PoolQC’, ‘MiscFeature’, ‘Alley’, ‘Fence’, ‘GarageYrBlt’, ‘GarageCond’, ‘BsmtFinType2’]) test_df = test_df.drop(columns=[‘PoolQC’, ‘MiscFeature’, ‘Alley’, ‘Fence’, ‘GarageYrBlt’, ‘GarageCond’, ‘BsmtFinType2’]) #drop GarageArea or GarageCars #build models
kaggle titanic tutorial
#military – Capt, Col, Major #noble – Jonkheer, the Countess, Don, Lady, Sir #unmaried Female – Mlle, Ms, Mme #NEW Drop Sibsp, Parch, TicketNumberCounts #OLD #X = train_df.drop([‘Survived’], axis=1) #y = train_df[‘Survived’] #X_test = test_df.drop([‘Age_Cut’, ‘Fare_Cut’], axis=1)
python variance and standard deviation
https://youtu.be/p4H2b2x_nWc#population and sample variance/std deviationVariance measures how far each data point in the set is from the mean andthus from every other point in the set. It is the average of the squared differences from the mean.Population variance is calculated when you have data for the entire population.It gives a measure of the dispersion of […]
FAISS LangChain
FAISS (Facebook AI Similarity Search) is a vector library developed by Facebook that is used to store and search embeddings efficiently. It is particularly useful for tasks like question answering within documents, where you need to retrieve relevant parts of the content based on semantic similarity. By converting text into embeddings, FAISS allows you to […]
hyperparameter tuning with scikit learn
We would be looking at tuning hyperparameters with Scikit-Learn. Scikit-Learn is a powerful machine learning library for Python. It provides simple , efficient tools for data analysis and modeling. Hyperparameter tuning is the process of finding the best values for the settings of a machine learning model that are not learned from data, but set […]
principal component analysis scikit learn
PCA (Principal Component Analysis) in Python using Scikit-learn is a technique used to reduce the number of features in a dataset while preserving most of the variance (information). It works by: Finding new axes (principal components) that capture the most variance. Projecting the data onto these fewer dimensions. It’s useful for visualization, speeding up models, […]
Reflexion Prompting
This technique is highly effective for chatbots and problem-solving tasks. It also helps reduce hallucinations by incorporating a form of quality control. The process involves: Starting with an initial prompt Getting the AI’s first response Sending a reflexion prompt asking the AI to review and reflect on its first answer Receiving an optimized response, improved […]
Python Pandas Lambda Function
Lambda functions in Python are small, anonymous functions defined using the lambda keyword. They are typically used for short, throwaway functions that are needed for a brief period, such as within map(), filter(), or sorted() calls. A lambda can take any number of arguments but only one expression, which is evaluated and returned. For example, […]
