AL-702-C Predictive Analytics

Predictive Analytics (AL-702-C) Important Questions

The most asked Predictive Analytics (AL-702-C) topics in RGPV papers are Steps for a successful data product strategy, Types of data products by functionality, Converting a string to a JSON array and Reading CSV and JSON files in Python. We read the RGPV B.Tech CSE-AIML semester 7 papers from 2023 and counted every question. Steps for a successful data product strategy, Types of data products by functionality, Converting a string to a JSON array and Reading CSV and JSON files in Python came once each.

Download Paperwala Imp Question & Answer (PDF)

How we made this list
  • Exams counted: 2023
  • All papers on this site: 1 (2023 to 2023)
  • Units asked most: Unit 3 and Unit 2
  • Answers: We wrote these answers with AI help from the real RGPV papers and the syllabus. A teacher has not checked them yet, so read them with your syllabus. How we make these

10 most repeated Predictive Analytics topics (2023)

Counted from the questions in the past papers listed on this site. Repeated = how many times the topic came in those papers.

Predictive Analytics important questions with answers

Each answer starts with a short answer. Then come how often it was asked, the points to write, a diagram and an exam tip. The questions under each topic are copied from the RGPV papers.

Q1. Steps for a successful data product strategy

Short answer. A data product delivers value mainly through data. A strategy says whose problem it solves, which data it needs and how success will be measured.

Asked 1 time in 2023 · Unit 1

From the papers

  • “Explain the steps for building a successful data product strategy.” (November 2023)

Write these points

Steps

  1. Define the problem and user. Tie it to a business goal.
  2. Set success measures before building.
  3. Check data: availability, quality, legal right and privacy.
  4. Plan the team and tools.
  5. Build a small first version and test it with users.
  6. Deploy with reliable data pipelines.
  7. Monitor accuracy, drift, use and fairness.
  8. Improve, scale or stop.

Common mistakes

  • Starting from a model and not a need.
  • Ignoring data quality.
  • No feedback from users.

A shop's demand forecast.

Goal: cut unsold bread. Measure: waste percentage.

Data: two years of daily sales. First version: forecast for one shop.

If waste falls from 12 to 9 percent in a fair trial, extend to more shops.

Real-life example

Before opening a tea stall you decide who your customers are, what supplies you need and how you will know it works. A data product needs the same plan.

Figure: a data product strategy
Figure: a data product strategy

Difference between Data project and data product

PointProjectProductSame or opposite
Uses dataYesYesSame
EndA report or one time resultOngoing use by usersOpposite
Needs monitoringLessAlwaysOpposite
Needs a clear goalYesYesSame

Exam tip. Write eight steps in order and add success measures early.

Back to the topic list

Q2. Types of data products by functionality

Short answer. By what they do, data products are often grouped as raw data, derived data, algorithms, decision support and automated decisions.

Asked 1 time in 2023 · Unit 1

From the papers

  • “Explain the different types of data products based on their functionality with suitable example.” (November 2023)

Write these points

TypeWhat it givesExample
Raw dataCollected data with little processingA public weather data download
Derived dataAdded fields or scoresCustomer table with a spend segment
Algorithm as a serviceOutput for given inputA language translation API
Decision supportInsight for a personA sales dashboard
Automated decisionSystem actsSpam filtering

How they differ

  • Going down the table, the product does more of the work for the user.
  • More automation needs more trust, testing and control.
  • Delivery can be by API, dashboard or web application.
  • One system can mix several types.

One bank, five forms.

Raw: transaction list. Derived: monthly spend by type. Algorithm: fraud score.

Decision support: a screen for the fraud officer.

Automated: a payment is held when the score crosses the set limit.

Real-life example

Vegetables, cut vegetables, a recipe helper, a cook's advice and a machine that cooks give more and more help. Data products follow a similar ladder.

Figure: types of data products
Figure: types of data products

Difference between Decision support and automated decision

PointSupportAutomatedSame or opposite
Uses data and modelsYesYesSame
Final action byA personThe systemOpposite
Needs explanation and auditYesYesSame
Speed of actionSlowerFasterOpposite

Exam tip. Give the five types with one example each.

Back to the topic list

Q3. Converting a string to a JSON array

Short answer. Use the json module: json.loads parses a JSON string. If the text is a JSON array, Python returns a list.

Asked 1 time in 2023 · Unit 2

From the papers

  • “What steps are involved in converting a string to a JSON Array? Explain with a code.” (November 2023)

Write these points

Steps

  1. Import json.
  2. Make sure the text is valid JSON, with double quotes around keys and strings.
  3. Call json.loads inside error handling.
  4. Check that the result is a list.
  5. Use the items. json.dumps converts back to text.
import json
s = '[{"name":"Asha","marks":82},{"name":"Ravi","marks":74}]'
try:
    data = json.loads(s)
except json.JSONDecodeError as e:
    raise SystemExit('bad JSON: %s' % e)
if not isinstance(data, list):
    raise SystemExit('not an array')
print(len(data), data[0]['name'])
print(sum(d['marks'] for d in data) / len(data))

Remember. Do not use eval() to parse text. It can run harmful code.

Output.

The program prints 2 Asha and then 78.0.

Real-life example

A packing list written on paper is only text. After you copy it item by item into a register, you can count and total the items.

Figure: parsing a JSON string
Figure: parsing a JSON string

Difference between json.loads and json.load

PointloadsloadSame or opposite
Parse JSONYesYesSame
InputA string or bytesA file objectOpposite
Returns Python objectsYesYesSame
Raises error on bad JSONYesYesSame

Exam tip. Write the code with try and except.

Back to the topic list

Q4. Reading CSV and JSON files in Python

Short answer. A CSV file stores a table as text and a JSON file (printed as JSNO in the paper) stores nested data. Python reads them with the csv and json modules or with pandas.

Asked 1 time in 2023 · Unit 2

From the papers

  • “What are CSV and JSNO files in Python? Explain how you will read these files in python?” (November 2023)

Write these points

Reading CSV

import csv
with open('marks.csv', newline='', encoding='utf-8') as f:
    for row in csv.DictReader(f):
        print(row['name'], int(row['marks']))

Reading JSON

import json
with open('marks.json', encoding='utf-8') as f:
    data = json.load(f)

With pandas

import pandas as pd
df1 = pd.read_csv('marks.csv')
df2 = pd.read_json('marks.json')

Points to remember

  • CSV values come as strings with the csv module, so convert numbers.
  • Use csv and not split(','), because quoted values may contain commas.
  • Use the correct encoding.
  • For nested JSON, pandas.json_normalize can flatten it.

A quoted comma.

Line: Asha,"Bhopal, MP",82

split(',') wrongly gives 4 pieces. The csv module gives 3 values.

Real-life example

A CSV file is like a class register with columns. A JSON file is like a folder that holds forms with smaller forms inside.

Figure: two common file formats
Figure: two common file formats

Difference between CSV and JSON

PointCSVJSONSame or opposite
Text formatYesYesSame
StructureFlat tableNestedOpposite
Keeps data typesNoBasic typesOpposite
Readable by Python modulesYesYesSame

Exam tip. Define both, then give one short code for each.

Back to the topic list

Q5. Data extraction tools and techniques in Python

Short answer. Data extraction is collecting needed data from sources such as files, web services, web pages, databases and documents, so that it can be processed.

Asked 1 time in 2023 · Unit 3

From the papers

  • “What is Data Extraction? Explain Data Extraction Tools and Techniques available in python.” (November 2023)

Write these points

Techniques and tools

SourceTool
CSV, JSONcsv, json, pandas
Excelpandas with openpyxl
Web APIrequests or urllib
HTML pagesBeautifulSoup, Scrapy
Pages built by JavaScriptSelenium or Playwright
Databasesqlite3, SQLAlchemy
PDF textpypdf, pdfplumber
Text patternsre

Good practice

  • Prefer an official API.
  • Follow site terms, robots rules, rate limits and privacy law.
  • Handle errors and missing values.
  • Save raw data and record the time and source.

Calling an API (illustrative).

r = requests.get(url, timeout=10), then r.raise_for_status() and data = r.json().

The timeout stops the program from waiting for ever.

The status check stops an error page from being treated as data.

Real-life example

A reporter gathers facts from records, interviews and notice boards, using a suitable method for each. Extraction does this with code.

Figure: data extraction in Python
Figure: data extraction in Python

Difference between API and web scraping

PointAPIScrapingSame or opposite
Gets web dataYesYesSame
FormatStructuredHTML to be parsedOpposite
Breaks when page design changesRarelyOftenOpposite
Must respect termsYesYesSame

Exam tip. Give the source and tool table with one code line.

Back to the topic list

Q6. Libraries for text processing in Python

Short answer. Python handles text with built-in string methods and re. For language tasks it has libraries such as NLTK, spaCy, TextBlob, Gensim and scikit-learn.

Asked 1 time in 2023 · Unit 2

From the papers

  • “Explain the different libraries available for Text processing in Python.” (November 2023)

Write these points

LibraryMain use
str methodssplit, strip, lower, replace
rePattern search and cleaning
NLTKTokenising, stemming, stop words, learning NLP
spaCyFast pipelines: tags, parsing, named entities
TextBlobSimple sentiment and other quick tasks
GensimTopic models and word vectors
scikit-learnBag of words and TF-IDF features
Hugging Face TransformersPretrained language models

Typical steps

  • Lower case where suitable.
  • Remove noise.
  • Tokenise.
  • Remove stop words only if they do not carry meaning for the task.
  • Stem or lemmatise.
  • Turn words into numbers.

Cleaning a line.

Text: " Great PRODUCT!!! Not bad. "

s = re.sub(r'[^a-z ]', '', s.lower()).split() gives ['great', 'product', 'not', 'bad'].

Removing the word not would change the meaning, so check the stop word list.

Real-life example

A cook has a knife for small jobs and machines for big ones. String methods are the knife and NLP libraries are the machines.

Figure: a text processing pipeline
Figure: a text processing pipeline

Difference between NLTK and spaCy

PointNLTKspaCySame or opposite
Processes natural languageYesYesSame
Typical focusTeaching and choice of methodsFast production pipelinesOpposite
Needs extra data or modelsYesYesSame
Built into PythonNoNoSame

Exam tip. List six libraries with one use each.

Back to the topic list

Q7. Python code to invert a matrix

Short answer. Use NumPy's linalg.inv. A matrix has an inverse only if it is square and not singular (its determinant is not zero).

Asked 1 time in 2023 · Unit 3

From the papers

  • “Write a Python code to inverse the matrix using Python libraries.” (November 2023)

Write these points

Program

import numpy as np
A = np.array([[4.0, 7.0], [2.0, 6.0]])
try:
    inv = np.linalg.inv(A)
except np.linalg.LinAlgError:
    raise SystemExit('Matrix has no inverse')
print(inv)
print(np.allclose(A @ inv, np.eye(2)))

Output

[[ 0.6 -0.7]
 [-0.2  0.4]]
True

Points

  • Check with A times inverse = identity.
  • Use allclose because of rounding.
  • For solving Ax = b use np.linalg.solve(A, b), which is better than forming the inverse.
  • A nearly singular matrix can give unreliable numbers. np.linalg.cond helps to check.

Check by hand.

Determinant = 4 x 6 - 7 x 2 = 10.

Inverse = (1/10) x [[6, -7], [-2, 4]], which matches the output.

Real-life example

An inverse is like an undo button. If one action scrambles two numbers, the inverse brings them back. Some actions lose information and cannot be undone.

Figure: inverting a matrix safely
Figure: inverting a matrix safely

Difference between inv and solve

PointinvsolveSame or opposite
Part of numpy.linalgYesYesSame
ReturnsThe inverse matrixThe solution xOpposite
Preferred for Ax = bNoYesOpposite
Fails for singular matricesYesYesSame

Exam tip. Write the program, the output and the determinant check.

Back to the topic list

Q8. Bar chart of student marks

Short answer. Use Matplotlib's bar function with the subjects on the x axis and the marks on the y axis.

Asked 1 time in 2023 · Unit 3

From the papers

  • “Write a Python program to display a bar chart for the below marks scored by the student: English 69, Hindi 90, Maths 76, Science 88, GK 91.” (November 2023)

Write these points

Program

import matplotlib.pyplot as plt
subjects = ['English', 'Hindi', 'Maths', 'Science', 'GK']
marks = [69, 90, 76, 88, 91]
bars = plt.bar(subjects, marks, color='steelblue')
plt.bar_label(bars)
plt.ylim(0, 100)
plt.xlabel('Subject')
plt.ylabel('Marks')
plt.title('Marks scored by the student')
plt.tight_layout()
plt.show()

Explanation

  • plt.bar draws one bar per subject.
  • bar_label writes the value above each bar (needs Matplotlib 3.4 or later).
  • ylim keeps the scale from 0 to 100 and starting at 0 keeps bars honest.
  • Labels and title make the chart readable.

Reading the chart.

Highest: GK 91. Lowest: English 69.

Total = 414 and the average is 82.8.

Real-life example

Lining up five water bottles filled to different heights shows at once which is fullest. A bar chart does this with marks.

Figure: the expected bar chart
Figure: the expected bar chart

Difference between Bar chart and histogram

PointBar chartHistogramSame or opposite
Uses barsYesYesSame
x axisSeparate categoriesNumber rangesOpposite
Height showsA valueCount in a rangeOpposite
Made with MatplotlibYesYesSame

Exam tip. Include axis labels and title. Sketch the chart too.

Back to the topic list

Q9. Mean, variance and standard deviation with NumPy

Short answer. NumPy gives them with mean, var and std. By default var and std divide by n (population) and ddof=1 divides by n - 1 for a sample.

Asked 1 time in 2023 · Unit 3

From the papers

  • “Calculate the average, variance and standard deviation in Python using NumPy.” (November 2023)

Write these points

Program

import numpy as np
m = np.array([69, 90, 76, 88, 91])
print(np.mean(m))
print(np.var(m), np.std(m))
print(np.var(m, ddof=1), np.std(m, ddof=1))

Formulas

  • Mean = sum / n.
  • Variance = sum of squared differences from the mean / n.
  • Standard deviation = square root of variance.
  • For a 2D array, axis=0 works down columns and axis=1 across rows.
MarkMark - 82.8Square
69-13.8190.44
907.251.84
76-6.846.24
885.227.04
918.267.24

Result.

Mean = 82.8. Sum of squares = 382.8.

Population variance = 76.56 and deviation = 8.75.

Sample variance = 95.7 and deviation = 9.78.

Real-life example

Two students can have the same average while one scores steadily and the other jumps up and down. Standard deviation shows that difference.

Figure: computing the spread
Figure: computing the spread

Difference between Population and sample variance

PointPopulationSampleSame or opposite
Measures spreadYesYesSame
Divide bynn - 1Opposite
NumPy settingddof=0 (default)ddof=1Opposite
Uses squared differencesYesYesSame

Exam tip. Show the table by hand and then the code.

Back to the topic list

Q10. Purpose of Matplotlib and its use in visualization

Short answer. Matplotlib is a Python library for creating charts. It helps people see patterns, comparisons and errors in data.

Asked 1 time in 2023 · Unit 3

From the papers

  • “What is the main purpose of Matplotlib? Explain its application in data visualization.” (November 2023)

Write these points

Plot types and uses

FunctionUse
plotTrend over time
barCompare categories
histDistribution
scatterRelation between two values
boxplotSpread and outliers
imshowImages and heat maps

Strengths

  • Fine control of titles, labels, colours and layout.
  • Several plots in one figure with subplots.
  • Save as PNG, SVG or PDF.
  • pandas and Seaborn build on it.

Use in predictive work

Explore data, plot residuals, draw loss curves and show ROC curves.

A loss curve.

Plot loss against epoch while training.

A smooth fall suggests learning. A rising curve suggests the learning rate is too high or there is a bug.

A growing gap between training and validation loss warns of overfitting.

Real-life example

A table of a year's daily temperatures is hard to read. One line graph shows summer and winter in a second.

Figure: an example Matplotlib bar chart
Figure: an example Matplotlib bar chart

Difference between Matplotlib and Seaborn

PointMatplotlibSeabornSame or opposite
Draws charts in PythonYesYesSame
LevelDetailed controlHigher level statistical plotsOpposite
Built on MatplotlibIt is the baseYesOpposite
Works with pandas dataYesYesSame

Exam tip. Give the purpose and a table of five plot types.

Back to the topic list

Start with the latest papers

Predictive Analytics - Nov 2023

See all 1 papers →

Predictive Analytics (AL-702-C) FAQs

What are the most important topics in Predictive Analytics?

By how often they were asked in the papers on this site: Steps for a successful data product strategy (1 times); Types of data products by functionality (1 times); Converting a string to a JSON array (1 times); Reading CSV and JSON files in Python (1 times); Data extraction tools and techniques in Python (1 times).

How were these Predictive Analytics important questions chosen?

Each topic was counted from the questions in the past papers listed on this site (2023). Repeated is the number of times the topic came. The counts come from keyword matching and the answers are not teacher-reviewed, so use them together with your syllabus.

Is there a PDF of Predictive Analytics important questions with answers?

Yes. The Paperwala Imp Question & Answer PDF for Predictive Analytics is free to download from this page.

The 10 most repeated topics of Predictive Analytics (AL-702-C) for RGPV B.Tech CSE-AIML semester 7, counted from the previous year papers on this site.