
Supervised ML: Classification
Logistic regression, KNN, SVM, metrics (accuracy, precision, recall, F1, ROC-AUC), thresholds
1What is the main objective of a supervised classification algorithm?
What is the main objective of a supervised classification algorithm?
Answer
Supervised classification aims to predict a category or class (discrete variable) from input features, by learning from labeled data. Unlike regression which predicts continuous values, classification assigns each observation to a predefined class (binary or multiclass).
2Which mathematical function does logistic regression use to transform predictions into probabilities?
Which mathematical function does logistic regression use to transform predictions into probabilities?
Answer
The sigmoid (or logistic) function transforms any real value into a probability between 0 and 1. It is defined as sigma(z) = 1/(1+e^(-z)). This function allows interpreting the output as the probability of belonging to the positive class.
3What do the coefficients represent in a logistic regression model?
What do the coefficients represent in a logistic regression model?
Answer
Logistic regression coefficients represent the change in log-odds for each unit change in the corresponding feature. A positive coefficient increases the probability of the positive class, while a negative coefficient decreases it. The exponential of the coefficient gives the odds ratio.
How does the K-Nearest Neighbors (KNN) algorithm work for classification?
What is the impact of choosing the value of k in the KNN algorithm?
+21 interview questions
Other Data Science & ML interview topics
Python Basics
Python Object-Oriented Programming
Python Data Structures
Git Fundamentals
SQL Basics
NumPy Fundamentals
Pandas Basics
Jupyter & Google Colab
SQL Joins & Advanced Queries
Advanced Pandas
Visualization with Matplotlib & Seaborn
Interactive Visualizations with Plotly
Descriptive Statistics
Inferential Statistics
Web Scraping
BigQuery & Cloud Data
Feature Engineering
Supervised ML: Regression
Decision Trees & Ensembles
Unsupervised ML
ML Pipelines & Validation
Time Series & Forecasting
Deep Learning Fundamentals
TensorFlow & Keras
CNN & Image Classification
RNN & Sequences
Transformers & Attention
NLP & Hugging Face
GenAI & LangChain
MLOps & Deployment
Master Data Science & ML for your next interview
Access all questions, flashcards, technical tests, code review exercises and interview simulators.
Start for free