FlashKeepers

Machine Learning · College · College and University

scikit-learn, PyTorch and TensorFlow Basics

scikit-learn estimators and pipelines, PyTorch tensors, autograd, nn.Module, DataLoader, and Keras layers.

About this set

39 basic cards for College Machine Learning. It opens with "What is an estimator in scikit-learn?" and "What does the fit() method do in scikit-learn?". Study it alongside the other College sets below.

39 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is an estimator in scikit-learn?
Show answerAn object that learns patterns from data through fit() and can make predictions via predict().
What does the fit() method do in scikit-learn?
Show answerTrains the estimator on training data by learning patterns and parameters from it.
What does the predict() method do in scikit-learn?
Show answerUses the trained estimator to make predictions on new, unseen data.
What is a pipeline in scikit-learn?
Show answerA sequence of transformers followed by an estimator, chaining preprocessing and modeling steps together.
What is cross-validation used for in scikit-learn?
Show answerTo evaluate model performance by splitting data into multiple folds and training on different subsets.
What does transform() do in a scikit-learn transformer?
Show answerApplies learned transformations to data, such as scaling or encoding.
What is a train/test split used for?
Show answerDividing data into separate training and testing sets to evaluate model performance on unseen data.
What is standardization in machine learning?
Show answerScaling features to have mean 0 and standard deviation 1, making them comparable.
What does a scaler do in scikit-learn?
Show answerTransforms features to a consistent scale, often between 0 and 1 or with zero mean and unit variance.
What is GridSearchCV used for?
Show answerExhaustively searching over specified hyperparameter values to find the best combination for a model.
What is a PyTorch tensor?
Show answerA multi-dimensional array similar to a NumPy array, optimized for deep learning and can run on GPUs.
How do you create a tensor in PyTorch?
Show answerUsing torch.tensor(), torch.zeros(), torch.ones(), torch.randn(), or converting from NumPy arrays.
What devices can a PyTorch tensor be moved to?
Show answerCPU or GPU (CUDA device), using .to(device) or .cpu()/.cuda() methods.
What does the shape attribute tell you about a tensor?
Show answerThe dimensions of the tensor, such as (batch_size, height, width, channels) for images.
How do you reshape a tensor in PyTorch?
Show answerUsing .reshape(), .view(), or .unsqueeze()/.squeeze() to change its dimensions.

24 more cards in the app

Study this set free