GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

A university learning-support office is choosing between TWO…

A university learning-support office is choosing between TWO logistic regression models for flagging students at risk of failing a gateway course. Missing an at-risk student — a student who ends up failing and possibly dropping out — has very high human and financial cost (the university estimates **~$30,000 in lifetime lost tuition per lost student**). Flagging a non-at-risk student costs about **$80 of advisor time** per unneeded outreach. Both models were tested on 1,500 enrolled students; 200 actually failed the course. MODEL P: TN = 1250, FP = 50, FN = 140, TP = 60 MODEL Q: TN = 1100, FP = 200, FN = 30, TP = 170 In 2-3 sentences, recommend which model the office should deploy. Cite specific numbers from the confusion matrices above and connect your recommendation to the relative costs described in the narrative.

Read Details

A classifier has confusion matrix TN = 5000, FP = 50, FN = 1…

A classifier has confusion matrix TN = 5000, FP = 50, FN = 100, TP = 400. What is its PRECISION on the positive class (to 1 decimal)?

Read Details

Given a fitted logistic regression `clf`, which line returns…

Given a fitted logistic regression `clf`, which line returns the predicted CLASS LABELS (0 or 1) for X_test?

Read Details

Identify the number of protons, neutrons and electrons in an…

Identify the number of protons, neutrons and electrons in an atom of  fluorine-19

Read Details

The output of `model.predict_proba(X)` for a binary logistic…

The output of `model.predict_proba(X)` for a binary logistic regression classifier, for a single observation, is:

Read Details

A fraud-detection classifier was tested on 1,000 credit-card…

A fraud-detection classifier was tested on 1,000 credit-card transactions. Its confusion matrix is: True Negatives (TN) = 850 False Positives (FP) = 30 False Negatives (FN) = 50 True Positives (TP) = 70 In 2-3 sentences, describe what this model does WELL and what it does POORLY, and say what a fraud-operations manager should take away from these numbers. Cite specific values (or percentages derived from them) in your answer.

Read Details

Which confusion-matrix error is also called a ‘Type I error’…

Which confusion-matrix error is also called a ‘Type I error’?

Read Details

You are given a Pandas DataFrame `customer_df` with the foll…

You are given a Pandas DataFrame `customer_df` with the following columns: TenureMonths (numeric) MonthlyCharges (numeric, dollars) NumSupportCalls (integer) HasPromoCode (0 or 1) Churned (0 or 1 — the TARGET) Write a short Python script (roughly 10-15 lines) that does ALL of the following, in order: (1) Imports from sklearn everything you will need (train/test split, logistic regression, and the metrics to print a confusion matrix and a classification report). (2) Prepares the feature matrix X (using the four predictor columns) and the target y. (3) Splits the data into 80% training and 20% test, with a fixed random_state for reproducibility and with the class balance preserved in both splits. (4) Creates a LogisticRegression model (allowing enough iterations to converge, and with a setting appropriate for an imbalanced target) and fits it on the training data. (5) Uses the fitted model to produce predicted class labels on the test set. (6) Prints both the confusion matrix and the classification report for the test-set predictions. Use the exact function and method names you learned in class. Short variable names are fine.

Read Details

Given a DataFrame df with a ‘City’ column, which expression…

Given a DataFrame df with a ‘City’ column, which expression returns a Series listing how many rows fall into each city?

Read Details

Which chart type is best for comparing the average sales acr…

Which chart type is best for comparing the average sales across 5 product categories?

Read Details

Posts pagination

Newer posts 1 … 1,766 1,767 1,768 1,769 1,770 … 84,397 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top