A bank wants to know if its fraud model is any better than doing nothing. You will build both and score them side by side.
Task: write lazy_versus_trained(rare_share, seed).
make_classification(n_samples=2000, n_features=10, n_informative=4, weights=[1 - rare_share, rare_share], class_sep=1.8, flip_y=0.01, random_state=seed). Class 1 is fraud, and rare_share is roughly the share of rows that are fraud.train_test_split(X, y, test_size=0.25, random_state=0, stratify=y).DummyClassifier(strategy="most_frequent") on the training rows. This is the lazy model.make_pipeline(StandardScaler(), LogisticRegression(max_iter=1000)) on the training rows. This is the trained model.Return a list of three numbers, each rounded to 3 decimal places:
1) that it flagged.Look at the first test. The two accuracies are close, but the recall tells a very different story.