Software Engineering › Notes › Software Automation (Year 12)
Software Automation (Year 12)
AI v ML; ML supporting automation (DevOps, RPA, BPA)
- AI: Artificial intelligence is the broad field of making machines perform tasks that normally need human intelligence (reasoning, perception, language, decisions).
- ML: Machine learning is a SUBSET of AI: algorithms that learn patterns from data and improve with experience instead of being explicitly programmed with every rule.
- Distinguish: AI = the goal/broad concept (includes rule-based systems). ML = one method of achieving AI by learning from data. All ML is AI; not all AI is ML.
- Automation: Using software to perform tasks with little or no human input. ML lets automation handle variable, data-driven tasks, not just fixed rules.
- DevOps: Combines development and operations to deliver software faster and more reliably through CI/CD pipelines. 2025 Q11 principles: rapid feedback, automation of repetitive tasks, collaboration and shared ownership. ML supports it by predicting build failures, detecting anomalies in logs and prioritising tests.
- RPA: Robotic process automation uses software 'bots' to copy what a person does on a user interface (rule-based, repetitive, structured tasks such as copying data between systems or processing invoices). Adding ML lets bots read unstructured data (e.g. emails, scanned forms).
- BPA: Business process automation automates an entire end-to-end workflow across systems (e.g. staff onboarding, approvals). ML supports decisions in the workflow (e.g. fraud detection, routing, demand forecasting).
- RPA v BPA: RPA automates individual repetitive tasks by mimicking user actions. BPA automates whole processes and the flow of information between them.
- MLOps (course spec): The automated process of designing, training and deploying ML models, borrowing DevOps principles and bringing together model developers and operations teams. THREE stages:
- MLOps - Design: Define the business problem; refactor it into a machine learning problem; define success metrics; research available data.
- MLOps - Model development: Data wrangling; feature engineering; model training; model testing and validation.
- MLOps - Operations: Model deployment; supporting operations/use; monitoring model performance.
Models of training ML
- Supervised: Trains on LABELLED data (inputs with known correct outputs) to predict labels for new data. Used for classification and regression: spam detection, house price prediction. 2025 Q3 answer: supervised learning.
- Unsupervised: Finds patterns/structure in UNLABELLED data without being told the answers. Clustering (customer segments) and anomaly detection. (K-means is the standard unsupervised clustering example.)
- Semi-supervised: A small amount of labelled data plus a large amount of unlabelled data. Useful when labelling is expensive (e.g. medical images).
- Reinforcement: An agent learns by trial and error in an environment, receiving rewards or penalties, to maximise total reward (game-playing AI, robotics, self-driving).
- Remember: Labelled = supervised. No labels = unsupervised. Few labels = semi-supervised. Rewards = reinforcement.
- FLAG: The school notes group K-nearest neighbour under unsupervised learning. KNN is normally taught as a supervised algorithm (it uses labelled neighbours). K-means is the unsupervised one. If a question asks, write supervised.
Applications of key ML algorithms
- Data analysis and forecasting: ML finds patterns in historical data to predict future values (sales, weather, demand, stock levels). Regression and time-series models are common.
- Virtual personal assistants: Siri, Alexa and Google Assistant use ML for speech recognition, natural language processing (understand intent), personalised responses and learning user preferences. Neural networks are central.
- Image recognition: ML (usually convolutional neural networks) classifies images and detects objects: face unlock, medical scans, quality inspection, self-driving cars. Needs large, diverse, correctly labelled training sets.
Decision trees
- Decision tree: A flowchart-like model: each internal node tests a feature, each branch is an outcome of the test, and each leaf is a final decision/class. Reads from the root down to a leaf.
- Advantages: Easy to understand and explain, handles numeric and categorical data, little data preparation.
- Disadvantages: Can overfit and become too complex (pruning/limiting depth helps), unstable to small data changes.
- Use: Classification and regression, e.g. loan approval, medical diagnosis.
- Drawing tip: Label the decision at each node, label each branch (Yes/No or value ranges), end with clear outcomes. One path from root to leaf per case.
Neural networks
- Inspired by the brain: A neural network is made of connected nodes (neurons) in layers that learn patterns from data. It can model non-linear relationships and works with structured and unstructured data (images, text, speech).
- Layers: Input layer (receives the data), hidden layers (process it; more hidden layers = 'deep'), output layer (the prediction).
- Weights and bias: Each connection has a weight showing how important that input is. Learning means adjusting weights (and biases).
- Activation function: Each neuron takes a weighted sum of inputs and passes it through an activation function (e.g. ReLU, sigmoid, tanh) to add non-linearity so the network can learn complex patterns.
- Forward propagation: Data flows from the input layer through the hidden layers to the output layer, producing a prediction.
- Loss: A loss (cost) function measures the difference between the prediction and the correct answer.
- Backpropagation: The error is sent backwards through the network to work out how much each weight contributed, then weights are updated (gradient descent) to reduce the loss.
- Course-spec wording: A neural network mimics the processing in the human brain: interconnected nodes (artificial neurones), each able to accept a binary input signal and potentially output a signal to connected nodes. Internal weightings and threshold values for each node are set in the training cycle (exposed to inputs with known responses; regular exposure improves accuracy and pattern matching). In diagrams, thicker lines = stronger weightings = higher priority in the final output. The execution cycle follows the training cycle and uses the values from training to determine the output.
- Training cycle: Repeat forward propagation, loss calculation, backpropagation over many epochs until loss is low. Then the trained model is used in execution (prediction on new data).
- Strengths and limits: Strengths: handles complex patterns, improves with data. Limits: needs large datasets, heavy computation (GPUs), risk of overfitting, hard to explain ('black box').
- Types: Feedforward (FNN), convolutional (CNN, images), recurrent (RNN, sequences such as speech and time series), deep (DNN, many hidden layers).
- 2025 Q25 model (5 marks): Explain HOW the neural network supports the VPA using the scenario (recognises language patterns to categorise queries such as lost luggage; nodes process; assesses tone for frustration; weights refine recommendations from customer ratings and turnaround times). THEN one positive AND one negative impact (faster, more accurate support v staff over-rely on recommendations / lose familiarity with trends / raised customer expectations).
Regression models and KNN
- Linear regression: Predicts a continuous numeric value from one or more inputs by fitting a straight line: y = mx + c. e.g. house price from size.
- Polynomial regression: Fits a curve (y = ax^2 + bx + c) when the relationship is non-linear, e.g. growth or temperature over the year. Too high a degree overfits.
- Logistic regression: Despite its name, used for CLASSIFICATION: predicts the probability (0 to 1, via the sigmoid function) of a category, usually yes/no (binary). 2025 Q12: spam detection, two-party election outcome and university admission are logistic regression problems (binary outcomes); predicting a numeric value is not.
- K-nearest neighbour (KNN): Classifies (or predicts) a new point by looking at the K closest data points and using the majority class (or average). Simple, no training phase, but slow on big data and sensitive to the choice of K and to scaling.
- Choosing: Number to predict = linear/polynomial. Category/yes-no = logistic or KNN. Straight-line trend = linear; curved trend = polynomial.
Programming ML in an OOP language (example only)
- Course-spec regression code (linear regression, NumPy and scikit-learn):
python
import numpy as np
from sklearn.linear_model import LinearRegression
x = np.array([[2], [4], [6], [8], [10], [12], [14], [16]])
y = np.array([1, 3, 5, 7, 9, 11, 13, 15])
model = LinearRegression()
model.fit(x, y) # find line of best fit
print(model.predict([[4]])) # prints 3
print(model.predict([[4.5]])) # prints 3.5 (new data)
- Spec note: Students must know how to DESIGN programs that use and apply regression but are not expected to implement the algorithms themselves. Pattern: import, create data (x as 2D array), create model, fit, predict.
- Regression class (original example, not from NESA):
python
from sklearn.linear_model import LinearRegression
class PricePredictor:
def __init__(self):
self.model = LinearRegression()
def train(self, sizes, prices):
# sizes: [[50], [80], [120]] prices: [200, 310, 450]
self.model.fit(sizes, prices)
def predict(self, size):
return self.model.predict([[size]])[0]
p = PricePredictor()
p.train([[50], [80], [120]], [200, 310, 450])
print(p.predict(100))
- Notes: Uses a class with a constructor, a train method (fit) and a predict method. Logistic regression is the same pattern with LogisticRegression. Polynomial regression adds PolynomialFeatures. (scikit-learn is a common library; the HSC syllabus does not name a library, so write the logic clearly.)
- Neural network use: Create the model object, train it on training data, then call predict on new data. Explain what the inputs and outputs are.
Impact of automation on individuals, society and the environment
- Safety of workers: Positive: robots and monitoring remove people from dangerous tasks; sensors and AI detect hazards in real time. Negative: monitoring can invade privacy, false alerts cause stress, and over-reliance can reduce vigilance. (2025 Q24 safety monitoring wearables.)
- People with disability: Positive: voice assistants, automatic captioning, smart home control, assistive devices increase independence and inclusion. Negative: poor accessibility or bias can exclude people; cost.
- Nature and skills of employment: Routine jobs reduced or changed; new roles (data scientist, ML engineer, automation maintenance) appear; workers need reskilling and digital skills; people shift to oversight and creative or interpersonal tasks.
- Production efficiency, waste and environment: Automation increases speed, accuracy and consistency, reduces defects and material waste, optimises energy use (smart grids). But training large models and running data centres uses lots of energy and e-waste.
- Economy and wealth distribution: Productivity and growth rise and costs fall; but wealth can concentrate with owners of technology while displaced workers lose income, widening inequality unless supported by training and policy.
- Answer pattern for 5 marks: Both positive AND negative ways, each tied to the scenario. 2025 Q24 MG: 'comprehensive discussion... with reference to the scenario' = positive (reduced human error, real-time alerts, PPE compliance, risky behaviour identified), negative (privacy at breaks, misidentified safe behaviour causing stress and distraction, worry about data storage/use).
Human behaviour patterns influencing ML and AI development
- Psychological responses: Users adopt AI if they trust it, so build transparency and explanations (e.g. a medical AI justifies its diagnosis). Fear of AI creates resistance, so design intuitive, friendly systems. Cognitive bias such as confirmation bias means users favour outputs that match their beliefs.
- Acute stress response: Under high stress people have high cognitive load, so AI should give quick, clear, concise outputs (visual alerts, short instructions) not complex data-heavy ones. Example: disaster management systems for first responders.
- Cultural protocols: Design to respect cultural practices: language, dialect, gender roles, formal address, traditional values. Example: voice assistants adapted for each country.
- Belief systems: Avoid ethical conflict; ensure fairness and inclusivity so the AI does not discriminate by belief, race or culture. Example: facial recognition tested across demographics.
Human bias and dataset source bias
- Bias: When data, models or developer decisions unintentionally favour certain outcomes, groups or perspectives.
- Human bias: Explicit bias is intentional (a researcher only collects pictures of male physicists). Implicit bias is unconscious, shaped by social and cultural factors. It can enter at design, data collection, labelling and testing.
- Dataset (source) bias: Training data that is not diverse or representative (too few examples of some groups, historical prejudice in records, data collected from one region) so the model performs poorly or unfairly for under-represented groups.
- Labelling bias: People may interpret the same data differently when labelling it, so inconsistent or biased labels teach the AI the wrong pattern (video example: if most people draw shoes in one style, other shoes are not recognised as shoes).
- Effect on usefulness: Inaccurate, unfair or unhelpful results; discrimination (hiring, loans, policing, facial recognition); loss of trust and legal or reputational damage; AI may amplify existing biases.
- Mitigation: Diverse and representative training data; audit datasets for balance; diverse development teams; clear labelling guidelines with several reviewers; test performance across groups; transparency and human oversight; continual monitoring and retraining.
- 2025 Q27 (6 marks): Needed: EXPLAIN how human bias affects usefulness AND support with reference to the video (male physicists in a photo library; shoes drawn in particular ways). 5 marks = describe + scenario; 4 = outline + refer to video. Always connect bias to the AI's learning from data, then to the effect.
Skeleton: Assess the impact of automation / discuss human bias (5-6 marks)
- Link to AI learning: One sentence: AI learns from data, so what goes into it shapes what comes out.
- Source: Name the source of bias or the automation change, with an example from the stimulus.
- Effect: Explain the effect (who is harmed or helped and how).
- Both sides: Include a positive AND a negative (for impact questions).
- Second example: Another stage or group (labelling, wealth, disability, environment) with the stimulus.
- Mitigation or judgement: Finish with a mitigation (diverse data, oversight) or an overall judgement.
Part 2. School notes (Canvas, 12SENX2) by syllabus dot point
Corrections are marked in the text. Anything not marked is the school wording.
Investigate how machine learning (ML) supports automation through the use of DevOps, robotic process automation (RPA) and business process automation (BPA).
ML
Machine Learning (ML) is a subset of artificial intelligence (AI) that allows computer systems to learn from large datasets to find non-obvious patterns where decisions can be made.
DevOps
DevOps is a set of practices that combines software development and IT operations. Its goal is to shorten the system development life cycle and deliver high-quality software more efficiently. DevOps promotes continuous integration and continuous delivery (CI/CD), automates infrastructure, and fosters collaboration across teams.
- Code
- Build
- Test
- Release
- Deploy
- Operate
- Monitor
- Plan
- Cycles…
How ML supports automation through DevOps
CI/CD
Managing CI/CD pipelines that build, test and deploy code involves frequent monitoring and adjustment, especially when builds or deployments fail. By analysing historical build data, ML can anticipate failure and flag risky codes. Additionally, it can identify performance bottlenecks and recommend solutions to optimise the build.
Example:
E.g.:
Spotify uses ML to analyse its CI/CD pipeline performance. ML models would detect a new module causing performance bottlenecks after a large update, alerting engineers to address the issue proactively.
Intelligent Resource Management
Traditional DevOps, infrastructure scaling is based on pre-defined rules to avoid over-provisioning (wasting resources) and under-provisioning (leading to system crashes), which is ineffective against unexpected traffic surges and complex cloud environments. ML can predictively allocate resource management by predicting future demands based on past system usage. This reduces cost and prevents operational disruption.
E.g.:
Netflix uses ML to predict the user's peak usage hour to allocate more resources while scaling down resource allocation during stable usage hours.
Automated Incident Management
ML can automate incident detection and root cause analysis by continuously monitoring system logs and identifying potential problematic patterns, reducing downtime typically caused by time-consuming, manual log analysis in complex, large-scale environments.
E.g.:
The ML tool of Amazon CloudWatch can automatically analyse logs to pinpoint causes of issues for engineers to patch problems faster, minimising downtime.
MLOps
MLOps is the automated process of designing, training and deploying machine learning models. It brings team involved in developing ML and operational teams involved in deploying and supporting the models in production.
Design
- Defining the business problem to be solved
- Refactoring the business problem into a machine learning problem
- Defining success metrics
- Researching available data.
Model development
- Data wrangling
- Feature engineering
- Model training, validation, testing
Operations
- Model deployment
- Supporting operations/use
- Monitoring model performance.
Robotic Process Automation (RPA)
RPA uses software robots to automate repetitive, rule-based tasks. RPA mimics human actions by interacting with UI, handling tasks that follow structured logic and defined workflows. RPA struggles with handling complex, unstructured data and tasks that require cognitive decision-making.
How ML supports automation through RPA
ML models like NLP, NLU, and Computer vision models allow RPA bots to interpret and process unstructured data. NLU models can be used to understand human language. Additionally, ML models can analyse large datasets to identify trends and predict outcomes, enabling RPA bots to make adaptive decisions based on the changes in workflows. Therefore, with the increasing model performance over time, RPA bots have great flexibility that empowers greater accuracy in changing complex workflows.
E.g.:
RPA bots can use ML-powered OCR to extract insurance claim reasons and review claims based on past data to predict its potential to be approved.
Business Process Automation (BPA)
BPA is the use of technology to automate cross-system and cross-functional workflows that traditionally use predefined rules and processes. It typically involves multiple workflows and automates end-to-end complex business processes. It is limited in making business decisions that aren’t fully captured by predefined logic.
How ML supports automation in BPA
By analysing large volumes of historical data and current contexts, ML models can identify flexible patterns that guide nuanced decision-making, establishing more dynamic and responsive workflows without significant reprogramming. In this way, the efficiency of BPA is enhanced with greater accuracy. Using NLP and computer vision models, BPA can automate tasks that involve interpreting unstructured data.
E.g.:
In supply chain management, ML enhances BPA by predicting inventory levels based on past sales, current trends, and external factors like seasonality. Instead of manually adjusting orders or running reports, BPA systems equipped with ML automatically place orders or make recommendations to optimise stock levels and avoid shortages or overstocking.
Distinguish between artificial intelligence (AI) and machine learning (ML)
Artificial Intelligence (AI)
AI refers to the development of computer systems that can perform tasks typically requiring human intelligence. These tasks include reasoning, problem-solving, understanding natural language, perception (e.g., visual processing), and decision-making. AI aims to simulate or replicate aspects of human cognition and behaviour.
E.g.:
Siri uses AI to process and respond to voice commands, answer questions, and manage tasks like setting alarms or sending texts. AI enables these systems to understand natural language and simulate human-like conversations.
Machine Learning (ML)
ML is a subset of AI that learns from vast datasets, identifies patterns, and makes decisions with minimal human intervention. The performance should improve over time.
E.g.:
Netflix uses ML to recommend movies based on a user's previous choices. The more the user watches, the better the system becomes at suggesting content tailored to the user.
Explore models of training ML, including supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning.
Supervised Learning
Data Requirement: Labelled Data
Learning Type: Predictive or Classification
Algorithms: Linear Regression, Decision Trees, Support Vector Machines (SVM), Neural Networks.
E.g.:
A binary classification model is trained a dataset of spam and non-spam emails. Once trained, the model can predict whether a new email is spam.
Unsupervised Learning
Data Requirement: Unlabelled Data
Learning Type: Pattern recognition, Clustering
Algorithms: K-nearest neighbour, Principal Component Analysis (PCA).
E.g.:
Unsupervised learning can be used to group customers based on their buying behaviour, enabling businesses to target specific segments with personalised offers.
Semi-Supervised Learning
Principle: the labelled data helps guide the learning process while leveraging the abundance of unlabelled data to improve performance
Data Requirement: Mostly unlabelled data with a small portion of labelled data
Learning Type: Prediction, classification, pattern finding, clustering
Algorithms: Label Propagation, Semi-supervised Support Vector Machines (S3VM)
E.g.:
Labelling large image datasets can be time-consuming. Semi-supervised learning allows for the use of fewer labelled images while still achieving high accuracy in classifying new images.
Reinforcement Learning
Reinforcement learning involves training a model through interactions with an environment. The model, called an agent, learns by receiving feedback in the form of rewards or penalties based on the actions it takes. The goal is to learn a policy that maximises the cumulative reward over time. The model learns to make decisions by balancing exploration (trying new actions) and exploitation (using known actions that yield high rewards).
Algorithms: Deep Q-Networks (DQN), Proximal Policy Optimisation (PPO).
E.g.:
AlphaZero reinforcement learning models can be trained to play chess by rewarding the model for making moves that lead to a win.
Investigate common applications of key ML algorithms, including data analysis and forecasting, virtual personal assistants, and image recognition.
Data Analysis and Forecasting
ML algorithms can identify non-obvious patterns in large datasets.
E.g.:
Clustering algorithms (e.g. k-means; note: KNN is a supervised classification/regression algorithm, not clustering. The school notes are wrong here), can allow businesses to segment customer groups based on purchasing behaviour or preferences.
Predictive models, such as time series algorithms and regression models, are used to make forecasts based on historical data.
E.g.:
In weather forecasting, recurrent neural networks (RNNs) are employed to model temporal data and predict future weather conditions based on past data patterns.
Virtual Personal Assistants
Virtual personal assistants use deep neural networks (DNNs) to convert spoken language into text, which is then processed by transformer models (e.g. BERT) for contextual understanding and intent recognition. Through reinforcement learning and collaborative filtering, they continuously adapt to user preferences, enabling more accurate, personalised responses and recommendations over time.
E.g.:
Virtual assistants might suggest music based on past music requests
Image Recognition
CNNs are used to identify patterns within images, making them effective for tasks like facial recognition, medical image analysis (e.g., detecting tumours in X-rays), and autonomous vehicle navigation.
Object Detection and Classification
Algorithms such as YOLO (You Only Look Once) are used to detect and classify objects within images. These are applied in areas like surveillance, where detecting suspicious items or identifying individuals is crucial, and in social media, where photos are automatically tagged based on face recognition.
Research models used by software engineers to design and analyse ML, including decision trees and neural networks.
Decision Trees
A decision tree is a visual representation that illustrates all possible combinations of decisions and their corresponding actions. It is commonly used in both classification and regression tasks in ML. The structure of the tree follows a sequence of decisions, where each decision path leads to either another decision or an outcome.
Key Strengths
Interpretability: The flowchart-like structure makes decision trees easy to understand and interpret, showing how decisions lead to specific actions.
Versatility: Decision trees are useful for a wide range of problems, particularly when the goal is to map out possible outcomes based on a set of conditions.
Limitations
Overfitting: Decision trees can grow too complex when trained on noisy data, leading to overfitting.
Instability: Small changes in the data can lead to a very different tree structure.
Common Use Cases
Classification: E.g., determining whether an email is spam or not.
Regression: E.g., predicting the price of a house based on its features like size and location.
Neural Networks
Inspired by biological neurons, Neural networks are a type of deep learning model that captures non-linear relationships, making them suitable for both structured (e.g., tabular) and unstructured (e.g., images, text) data.
Structure
Input Layer (e.g., pixel values in an image, numerical features in tabular data)
Hidden Layers
The layers between the input and output layers. A neural network can have multiple hidden layers. Each layer consists of neurons that apply an activation function to introduce non-linearity into the model, allowing it to learn complex patterns.
Common activation functions:
ReLU (Rectified Linear Unit): Sets negative values to zero and leaves positive values unchanged, making it highly efficient for deep learning models.
Sigmoid: Maps values between 0 and 1, often used in binary classification tasks.
Output Layer
The output layer produces the final prediction based on the learned weights and transformations.
Learning Mechanism
Forward Propagation
Data moves from the input layer, through the hidden layers, to the output layer. Each neuron applies a weighted sum of its inputs, passes the result through an activation function, and forwards the output to the next layer.
Loss Function
The loss function calculates the error between the predicted output and the actual target.
Backpropagation
Once the loss is calculated, the model adjusts the weights of the connections using an optimisation algorithm, typically gradient descent. Gradient descent updates the weights in the direction that minimises the error, with the learning rate controlling the size of the steps taken during each update.
Training and Convergence
The process of forward propagation, loss computation, and backpropagation is repeated iteratively over many epochs, minimising loss and improving overall performance.
Types of Neural Networks
Feedforward Neural Networks (FNN)
Data moves in one direction, from input to output, without cycles or feedback loops. It is used in regression or basic classification (e.g., predicting the outcome of a stock market price).
Convolutional Neural Networks (CNN)
CNNs have convolution layers that apply kernels to detect local visual features. Pooling layers are used to reduce the spatial dimension while keeping essential feature information. It is used in computer vision tasks like image classification (e.g., identifying objects in images), object detection (e.g., detecting faces in a picture), and video analysis.
Deep Neural Networks (DNN)
DNNs are NNs with many hidden layers to learn more complex features. They require a large dataset and computational power. It is used in complex recommendation systems (e.g., Netflix movie recommendations) and advanced AI systems like OpenAI's GPT.
Key Concept
Weight Initialisation
The initial values of the weights can significantly impact how fast the network converges. Poor initialisation may lead to vanishing gradients or slow training.
Regularisation techniques (prevent overfitting)
Dropout: Randomly drops a subset of neurons during training, forcing the network to learn more robust features.
Strengths of NN
Versatility: Can be applied to various tasks, from image recognition to language processing.
Representation Learning: Automatically learns features from raw data, reducing the need for manual feature engineering.
Scalability: Can handle massive datasets and is capable of scaling across distributed systems (e.g., cloud computing frameworks like TensorFlow or PyTorch).
State-of-the-Art Performance: Especially in tasks such as speech recognition, object detection, and game playing.
Limitations of NN
Data Hungry: Neural networks typically require large datasets for optimal performance. Small datasets may lead to overfitting and poor generalisation.
Computationally Intensive: Training deep neural networks is resource-heavy, requiring high-performance hardware such as GPUs or TPUs.
Black Box Nature: NN is a black box that lacks interpretability, making it hard to understand why a network makes certain decisions.
Overfitting: Without proper regularisation, neural networks may perform very well on training data but fail to generalise to new, unseen data.
Describe types of algorithms associated with ML, including linear regression, logistic regression, and K-nearest neighbour.
Regression
Regression is a type of ML algorithm used to predict continuous values by finding non-obvious patterns. It helps to understand the relationship between one or more input variables (features or independent variables) and an output variable (the dependent variable).
Linear Regression
Linear regression is a type of algorithm that helps predict continuous values through a linear relationship.
Logistic Regression
Logistic regression is used for classification tasks. Logistic regression predicts the probability of specific categories. The sigmoid activation function is used to convert any number into a probability between 0 and 1.
E.g.:
Predicting students pass or fail based on homework scores and study scores
K-Nearest Neighbour (KNN)
KNN is an algorithm used for both classification and regression. It predicts new outcomes by looking at the labels of the K Nearest Neighbours.
E.g.:
To determine whether a fruit is an apple or an orange based on its size and colour, KNN compares the fruit to the K nearest examples in the dataset.
Design, develop and apply ML regression models using an OOP to predict numeric values, including linear regression, polynomial regression, and logistic regression.
Why use OOP to design models?
The Traditional Regression model is written in procedural or declarative. With OOP, scalability is ensured through inheritance. Encapsulation keeps data and logic together. Structured models are enforced with abstraction to ensure maintainability. Polymorphism offers greater flexibility in modifying regression models.
Polynomial Regression OOP
- Inherit from LinearRegression to reuse logic for fitting and prediction.
- Additional Attribute: Degree of the polynomial.
- Method: transform() that converts input features into polynomial terms.
Logistic Regression OOP
- Inherit from LinearRegression.
- Methods: Implement the sigmoid activation and adjust the gradient descent to
- minimise the cross-entropy loss instead of MSE.
| Model Type | Task Type | Equation Type | Use Cases |
|---|---|---|---|
| Linear Regression | Predicting continuous values | Linear equation | Predicting housing prices based on numbers of bedroom |
| Polynomial Regression | Predicting continuous values | Polynomial equation | Predicts non-linear relationships like temperature variation |
| Logistic Regression | Binary classification | Sigmoid | Binary outcomes like spam detection for emails |
Apply neural network models using an OOP to make predictions.
By using an OOP approach, flexible and reusable neural network models can be defined. The structure of the class will allow for flexibility in modifying the network's architecture and training process.
OOP allows for encapsulating the functionality of the neural network into a single class. This class can manage the network's architecture (layers, neurons, weights, and biases), the forward and backward passes, and the training loop.
Attributes
Layers
Define the architecture of the neural network (e.g., input layer, hidden layers, output layer).
Weights and Biases
Initialise random weights and biases for the connections between neurons in different layers.
Learning Rate
Controls how much the model's weights are updated with respect to the error gradient during training.
Assess the impact of automation on the individual, society and the environment, including safety of workers, people with disability, the nature and skills required for employment, production efficiency, waste and the environment, and the economy and distribution of wealth.
Safety of Workers [Individual]
By replacing humans in dangerous tasks, automation significantly reduces the risk of injury or fatality. However, automation introduces new safety risks related to technical malfunctions.
E.g.:
Autonomous haulage systems are used to reduce the risks miners face from potential cave-ins and the toxic environment. Yet, when a robotic arm malfunctions, it can endanger the workers working on the same factory line.
People with Disability [Individual]
Automation offers significant opportunities to improve the lives and employment prospects of people with disabilities through assistive technologies. Nevertheless, automation risks displacing people with disability in roles that involve repetitive tasks
E.g.:
Robotic exoskeletons enable people with mobility impairments to walk again, allowing individuals who were previously excluded from physically demanding jobs to participate in the workforce. On the other hand, previous factory workers with cognitive disabilities are displaced unless retraining initiatives are created.
The Nature and Skills Required for Development
Automation is displacing roles that involve repetitive or predictable tasks. It is creating demand for skilled workers in fields such as AI and data science, necessitating workers to upskill in more skilled roles continuously.
E.g.:
Factory workers are getting replaced by robotic arms, with new employment opportunities for robotics engineers to maintain the automated systems.
Production Efficiency, Waste and Environment [Environment]
Automation increases production efficiency, leading to cost savings and higher output. By using automated systems that minimise faulty processes, less waste is produced. However, it also raises environmental concerns, particularly when energy use is elevated.
E.g.:
Tesla’s Gigafactory automates vehicle production and operates 24/7, increasing production time and costs. Precision manufacturing from the robotic arms ensures minimal material loss. Nevertheless, it uses large amounts of energy, which is an environmental concern.
Economy and Distribution of Wealth [Society]
While automation drives economic growth by increasing productivity, it poses significant challenges to the fair distribution of wealth. Automation tends to disproportionately benefit capital owners and highly skilled workers, potentially widening the wealth gap between the rich and the poor.
In response, some governments like Finland are exploring policies like universal basic income (UBI) to mitigate the economic displacement caused by automation.
E.g.:
Amazon utilises robots to transport products within its warehouses, enabling sales to scale rapidly and support better company growth. However, this leads to job displacements for low-skilled workers, where the wealth generated primarily benefits Amazon’s shareholders and executives.
Explore by implementation how patterns in human behaviour influence ML and AI software development, including psychological responses, patterns related to acute stress response, cultural protocols, and belief systems.
AI developers create algorithms that analyse data and also interact effectively with users, reflecting human behavioural patterns.
Psychological Responses
Trust and User Adoption
Users are more likely to adopt AI systems if they trust the recommendations or decisions made by the system. Trust is built through transparency and reliability.
E.g. Medical AI need to justify their diagnosis, increasing user adoption and transparency.
Fear and Resistance
Psychological fear of AI can affect how users interact with AI systems. Developers need to create systems that feel intuitive and friendly to reduce resistance.
Cognitive Bias
AI systems must be designed to account for human cognitive biases.
E.g.: users may experience confirmation bias, where they favour AI outputs that confirm their pre-existing beliefs.
Acute Stress Response
In high-stress situations where cognitive load is already elevated, users need quick, straightforward solutions, so AI systems should minimise mental effort by providing clear, concise outputs instead of complex, data-heavy recommendations.
E.g.:
In AI-driven disaster management systems, simplified formats are used where visual alerts and concise instructions are prioritised to help first responders make quick, informed decisions under pressure.
Cultural Protocols
To ensure the technology is respectful and acceptable within cultural contexts, AI systems should be tailored to align with the cultural practices and expectations of the target users. This can include language preferences, gender roles, or traditional values that differ across cultures.
E.g.:
Google Assistant undergoes significant cultural adaptation when being deployed in different countries. These systems are programmed to recognise local dialects and respect local customs by addressing people more formally in certain cultures.
Belief Systems
Developers must account for belief systems to avoid ethical conflicts and ensure that AI systems operate within acceptable moral boundaries. AI systems must be designed to avoid bias, especially in culturally diverse societies. Developers should incorporate fairness and inclusivity into AI algorithms, ensuring that systems do not discriminate based on belief systems.
E.g.:
In facial recognition technology, ethical AI development considers potential biases against specific racial or ethnic groups, ensuring the technology works equally well across different demographics.
Investigate the effect of human and dataset source bias in the development of ML and AI solutions.
Bias arises when the models, data, or decisions made by developers unintentionally favour certain outcomes, groups, or perspectives over others.
Human Bias
Human bias refers to the implicit and explicit preferences or assumptions that developers may hold, which can influence the design and decision-making processes involved in creating AI systems.
Feature Selection Bias
The choice of variables or features for a model can reflect the developer's priorities or preconceived notions about what is important.
E.g.: If socio-economic status is prioritised as a feature in predictive models for employment, the model may perpetuate existing inequalities.
Algorithm Design Bias
Developers might unintentionally favour certain algorithmic structures or processes that reflect their own experiences or goals, even if those structures introduce bias.
Dataset Source Bias
Dataset bias occurs when the data used to train machine learning models is not representative of the broader population or task.
Historical Bias
This occurs when the dataset reflects past inequalities or discrimination.
E.g.: If a hiring algorithm is trained on historical data from an industry with low gender diversity, it may learn to favour male candidates over female candidates.
Sampling Bias
If certain groups are overrepresented or underrepresented in the dataset, the model will generalise poorly to the underrepresented groups.
E.g.: Medical AI systems trained on data from one demographic may fail to diagnose or recommend treatments for another accurately.
Labelling Bias [Both human and Dataset]
During the creation of datasets, humans often label data (e.g., tagging images or categorising information). Their labels may reflect personal biases, reinforcing stereotypes or errors.
Consequences of Bias in AI Systems
Discrimination
Biased AI systems may discriminate against certain groups based on race or gender.
Reduced Trust
Users and society may lose trust in AI systems if they consistently produce unfair or biased outcomes.
Poor Decision-Making
Bias in models can lead to inaccurate or inappropriate decisions.
Legal and Ethical Implications
Many countries have anti-discrimination laws, and biased AI systems could lead to legal challenges. Furthermore, there are growing concerns about the ethical responsibility of organisations deploying AI systems.
Mitigating Bias in AI Development
Diverse Teams [Human Bias]
Building teams with diverse perspectives can help mitigate bias by ensuring that different viewpoints are considered during AI development.
Algorithmic Fairness [Human Bias]
Using fairness-aware algorithms that aim to equalise outcomes for different groups can be an effective mitigation strategy.
Bias Audits and Testing [Data Bias]
Conducting audits and testing models for bias across different demographic groups can help identify and correct biased behaviour.
Inclusive Datasets [Data Bias]
Curating and using datasets that are representative of the entire population can help prevent dataset bias. This might include collecting additional data for underrepresented groups.
E.g.:
To reduce gender bias in hiring algorithms, companies anonymise candidate resumes and train models on more inclusive datasets that do not reflect historical gender biases.
Part 3. Where this has been examined (see ../../question_bank.md)
| ID | Marks | Source | Topic / type |
|---|---|---|---|
| hsc2025-q3 | 1 | 2025 HSC | Machine learning training (multiple choice) |
| hsc2025-q11 | 1 | 2025 HSC | DevOps (multi-select) |
| hsc2025-q12 | 2 | 2025 HSC | Logistic regression (multi-select (true/false check boxes)) |
| hsc2025-q24 | 5 | 2025 HSC | Safety of workers (impact of automation) (extended response (discuss)) |
| hsc2025-q25 | 5 | 2025 HSC | Patterns in human behaviour; neural networks (virtual personal assistant) (extended response (explain)) |
| hsc2025-q27 | 6 | 2025 HSC | Bias in AI (human bias and data set source bias) (extended response (explain, video stimulus)) |
| sample-q15 | 3 | Sample Exam | Machine learning in data analysis (short answer (describe, max 75 words)) |
| sample-q20a | 1 | Sample Exam | Decision trees (table (decision tree)) |
| sample-q20b | 3 | Sample Exam | Decision trees (drawing (decision tree)) |
| sample-q23a | 3 | Sample Exam | Bias in machine learning (short answer (max 75 words)) |
| sample-q23b | 3 | Sample Exam | Linear regression v K-nearest neighbour (short answer (compare, max 75 words)) |
| sample-q25 | 8 | Sample Exam | ML, DevOps, RPA, BPA in security (extended response (discuss, max 300 words, slideshow stimulus)) |
| fam-q7a | 1 | Familiarisation | Decision trees (table (decision tree outcomes)) |
| fam-q7b | 3 | Familiarisation | Decision trees (drawing (decision tree)) |
| fam-q14 | 8 | Familiarisation | AI and ML in society; privacy (extended response (judgement, slideshow stimulus)) |