This document provides an overview of the basics of MATLAB. It covers the following topics in 3 sentences or less each:
- The course outline includes basic setup, variables and arrays, for loops, if statements, user input, saving and loading variables, and plotting.
- The basic setup section explains the layout of MATLAB including tabs for home, plots, and apps as well as the command window and workspace.
- Variables and arrays are then introduced, explaining how variables can hold single numbers or arrays of numbers, and how the colon can be used to generate vectors and address values in arrays.
Machine learning session6(decision trees random forrest)Abhimanyu Dwivedi
Concepts include decision tree with its examples. Measures used for splitting in decision tree like gini index, entropy, information gain, pros and cons, validation. Basics of random forests with its example and uses.
Intro and maths behind Bayes theorem. Bayes theorem as a classifier. NB algorithm and examples of bayes. Intro to knn algorithm, lazy learning, cosine similarity. Basics of recommendation and filtering methods.
Intro to SVM with its maths and examples. Types of SVM and its parameters. Concept of vector algebra. Concepts of text analytics and Natural Language Processing along with its applications.
At the end of this lecture students should be able to;
Describe the C arrays.
Practice the declaration, initialization and access linear arrays.
Practice the declaration, initialization and access two dimensional arrays.
Apply taught concepts for writing programs.
Machine learning session6(decision trees random forrest)Abhimanyu Dwivedi
Concepts include decision tree with its examples. Measures used for splitting in decision tree like gini index, entropy, information gain, pros and cons, validation. Basics of random forests with its example and uses.
Intro and maths behind Bayes theorem. Bayes theorem as a classifier. NB algorithm and examples of bayes. Intro to knn algorithm, lazy learning, cosine similarity. Basics of recommendation and filtering methods.
Intro to SVM with its maths and examples. Types of SVM and its parameters. Concept of vector algebra. Concepts of text analytics and Natural Language Processing along with its applications.
At the end of this lecture students should be able to;
Describe the C arrays.
Practice the declaration, initialization and access linear arrays.
Practice the declaration, initialization and access two dimensional arrays.
Apply taught concepts for writing programs.
Introduction to linear regression and the maths behind it like line of best fit, regression matrics. Other concepts include cost function, gradient descent, overfitting and underfitting, r squared.
Show drafts
volume_up
Empowering the Data Analytics Ecosystem: A Laser Focus on Value
The data analytics ecosystem thrives when every component functions at its peak, unlocking the true potential of data. Here's a laser focus on key areas for an empowered ecosystem:
1. Democratize Access, Not Data:
Granular Access Controls: Provide users with self-service tools tailored to their specific needs, preventing data overload and misuse.
Data Catalogs: Implement robust data catalogs for easy discovery and understanding of available data sources.
2. Foster Collaboration with Clear Roles:
Data Mesh Architecture: Break down data silos by creating a distributed data ownership model with clear ownership and responsibilities.
Collaborative Workspaces: Utilize interactive platforms where data scientists, analysts, and domain experts can work seamlessly together.
3. Leverage Advanced Analytics Strategically:
AI-powered Automation: Automate repetitive tasks like data cleaning and feature engineering, freeing up data talent for higher-level analysis.
Right-Tool Selection: Strategically choose the most effective advanced analytics techniques (e.g., AI, ML) based on specific business problems.
4. Prioritize Data Quality with Automation:
Automated Data Validation: Implement automated data quality checks to identify and rectify errors at the source, minimizing downstream issues.
Data Lineage Tracking: Track the flow of data throughout the ecosystem, ensuring transparency and facilitating root cause analysis for errors.
5. Cultivate a Data-Driven Mindset:
Metrics-Driven Performance Management: Align KPIs and performance metrics with data-driven insights to ensure actionable decision making.
Data Storytelling Workshops: Equip stakeholders with the skills to translate complex data findings into compelling narratives that drive action.
Benefits of a Precise Ecosystem:
Sharpened Focus: Precise access and clear roles ensure everyone works with the most relevant data, maximizing efficiency.
Actionable Insights: Strategic analytics and automated quality checks lead to more reliable and actionable data insights.
Continuous Improvement: Data-driven performance management fosters a culture of learning and continuous improvement.
Sustainable Growth: Empowered by data, organizations can make informed decisions to drive sustainable growth and innovation.
By focusing on these precise actions, organizations can create an empowered data analytics ecosystem that delivers real value by driving data-driven decisions and maximizing the return on their data investment.
Explore our comprehensive data analysis project presentation on predicting product ad campaign performance. Learn how data-driven insights can optimize your marketing strategies and enhance campaign effectiveness. Perfect for professionals and students looking to understand the power of data analysis in advertising. for more details visit: https://bostoninstituteofanalytics.org/data-science-and-artificial-intelligence/
As Europe's leading economic powerhouse and the fourth-largest hashtag#economy globally, Germany stands at the forefront of innovation and industrial might. Renowned for its precision engineering and high-tech sectors, Germany's economic structure is heavily supported by a robust service industry, accounting for approximately 68% of its GDP. This economic clout and strategic geopolitical stance position Germany as a focal point in the global cyber threat landscape.
In the face of escalating global tensions, particularly those emanating from geopolitical disputes with nations like hashtag#Russia and hashtag#China, hashtag#Germany has witnessed a significant uptick in targeted cyber operations. Our analysis indicates a marked increase in hashtag#cyberattack sophistication aimed at critical infrastructure and key industrial sectors. These attacks range from ransomware campaigns to hashtag#AdvancedPersistentThreats (hashtag#APTs), threatening national security and business integrity.
🔑 Key findings include:
🔍 Increased frequency and complexity of cyber threats.
🔍 Escalation of state-sponsored and criminally motivated cyber operations.
🔍 Active dark web exchanges of malicious tools and tactics.
Our comprehensive report delves into these challenges, using a blend of open-source and proprietary data collection techniques. By monitoring activity on critical networks and analyzing attack patterns, our team provides a detailed overview of the threats facing German entities.
This report aims to equip stakeholders across public and private sectors with the knowledge to enhance their defensive strategies, reduce exposure to cyber risks, and reinforce Germany's resilience against cyber threats.
Adjusting primitives for graph : SHORT REPORT / NOTESSubhajit Sahu
Graph algorithms, like PageRank Compressed Sparse Row (CSR) is an adjacency-list based graph representation that is
Multiply with different modes (map)
1. Performance of sequential execution based vs OpenMP based vector multiply.
2. Comparing various launch configs for CUDA based vector multiply.
Sum with different storage types (reduce)
1. Performance of vector element sum using float vs bfloat16 as the storage type.
Sum with different modes (reduce)
1. Performance of sequential execution based vs OpenMP based vector element sum.
2. Performance of memcpy vs in-place based CUDA based vector element sum.
3. Comparing various launch configs for CUDA based vector element sum (memcpy).
4. Comparing various launch configs for CUDA based vector element sum (in-place).
Sum with in-place strategies of CUDA mode (reduce)
1. Comparing various launch configs for CUDA based vector element sum (in-place).
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Subhajit Sahu
Abstract — Levelwise PageRank is an alternative method of PageRank computation which decomposes the input graph into a directed acyclic block-graph of strongly connected components, and processes them in topological order, one level at a time. This enables calculation for ranks in a distributed fashion without per-iteration communication, unlike the standard method where all vertices are processed in each iteration. It however comes with a precondition of the absence of dead ends in the input graph. Here, the native non-distributed performance of Levelwise PageRank was compared against Monolithic PageRank on a CPU as well as a GPU. To ensure a fair comparison, Monolithic PageRank was also performed on a graph where vertices were split by components. Results indicate that Levelwise PageRank is about as fast as Monolithic PageRank on the CPU, but quite a bit slower on the GPU. Slowdown on the GPU is likely caused by a large submission of small workloads, and expected to be non-issue when the computation is performed on massive graphs.
2. Course Outline
❑Basic setup
❑Variables and arrays
❑For Loops
❑If Statements and Decision Making
❑User Input and Pausing
❑Saving and Loading Variables
❑Plotting
6. Variables and Arrays
❑A variable is something that holds a number for us to carry out
computation with.
❑Variables can be a single number or a multitude of numbers called
an array or matrix.
7. Variables and Arrays
❑We can use the colon to generate a vector, which is series of
numbers, from a start point to an endpoint in steps of 1 or
increments we set.
❑Methods of addressing an individual element or number in an
array, an entire row or rows, column or columns are described in the
following examples.
9. Matrices/Arrays
%% x, y and z are our variables , note that to declare a matrix
we use square brackets, a semicolon ends the row, since we have 3
entries we have 3 columns.
x=[1,1,1];
y=[2,2,2];
z=x+y
10. Matrices/Arrays
%% a, b and c are our variables, a semicolon ends the row, now we
have 3 rows.
a=[1;1;1;];
b=[2;2;2;];
c=a+b
11. Basic Colon Use
%% here we define an array x=[1,2,3] using the colon
x=[1:3]
12. Basic Colon Use
%% here we define an array x=[5,10,15] the number between the
colons is the step we increment by
y=[5:5:15]
13. Methods to Address Array Values
% We define our variable x below
x=[1,2,3;
4,5,6;
7,8,9;];
%% We setup a variable C to take the value 3 from the first row and third column
using the format new_variable=other_variable(Row_Number,Column_Number).
C=x(1,3)
% Answer C=3.
14. Methods to Address Array Values
% We define our variable x below
x=[1,2,3;
4,5,6;
7,8,9;];
%% Below we take the third row and assign its values to D, By using the colon in
the columns spot we have selected all columns in the third row.
D=x(3,:)
% Answer D = 7,8,9.
15. Methods to Address Array Values
% We define our variable x below
x=[1,2,3;
4,5,6;
7,8,9;];
%% We can do the opposite and select the third column and all rows.
E=x(:,3)
% Answer E = 3,6,9.
16. Methods to Address Array Values
% We define our variable x below
x=[1,2,3;
4,5,6;
7,8,9;];
%% Getting a little fancier we can select the last two rows and the first two
columns.
F=x(2:3,1:2);
% Answer F = [4,5;
% 7,8;];
18. For Loops
❑In programming we find ourselves in situations where we need to
input or calculate a lot of data in a sequential or iterative fashion.
❑We use a variable called an index. The index changes its value on
each cycle of the loop. These cycles are referred to as iterations. The
lowercase i in the examples are the index of a loop, you may use any
letter or word you like to name your index.
19. For Loops to Address Arrays
%% We set a loop that runs ten times that calculates x added to the current index, by using
(i) next to y we can save each computed value as an addressable element in the array y.
x=10;
%% i increases in value from 1 to 10 in steps of 1,
% when i =1 y(i)=y(1) Which is the first element of the array y
% y(1)=x+1 This means we assign the value x+1 to the array element y(1).
for i=1:10
y(i)=x+i
end
21. If Statements and Decision Making
❑When programming we often find ourselves in a position where we need to write code that
can make decisions. The simplest way to do this is by means of an If statement.
❑An If statement allows a piece of code to run if certain conditions are met. A few simple tricks
are conditions based on terms being greater than, less than or equal to certain values.
❑Else statements can be used in conjunction with If statements, if the If statements condition is
not met, you can set an else statement to run some code or provide subsequent If statements
beneath that Else statement to run code under certain conditions.
22. If Statements Using Greater Than
% Here we have a piece of code that iterates from 1 to 10, it counts the
number of values where i>3.
Numbeber_of_values_over_3=0;
for i=1:10
if i>3
Numbeber_of_values_over_3=Numbeber_of_values_over_3+1;
end
end
%% Answer Numbeber_of_values_over_3 = 7.
23. If Statements Using Less Than
% Here we have a piece of code that iterates from 1 to 10, it counts the number
of values where i<5.
Numbeber_of_values_under_5=0;
for i=1:10
if i<5
Numbeber_of_values_under_5=Numbeber_of_values_under_5+1;
end
end
%% Numbeber_of_values_under_5 = 4.
24. If Statements Using AND
% Here we have a piece of code that iterates from 1 to 10, it counts the
number of values where i<9 AND i>6, thereby counting the numbers between 9 and 6.
Numbeber_of_values_under_9_but_over_4=0;
for i=1:10
if i<9 && i>6
Numbeber_of_values_under_9_but_over_4=Numbeber_of_values_under_9_but_over_4+1;
end
end
%% Numbeber_of_values_under_9_but_over_4 = 2.
25. Else Statements and Using Equals To
x=[1,1,2,2,2];
Number_of_ones=0;
Number_of_twos=0;
for i=1:5
if x(i)==1
Number_of_ones=Number_of_ones+1;
else
Number_of_twos=Number_of_twos+1;
end
end
%% Answer Number_of_ones = 2; Number_of_twos = 3;
26. Using Multiple If and Else Statements
x=[1,1,2,2,3];
Number_of_ones=0;
Number_of_twos=0;
Number_of_threes=0;
for i=1:5
if x(i)==1
Number_of_ones=Number_of_ones+1;
else
if x(i)==2
Number_of_twos=Number_of_twos+1;
else
if x(i)==3
Number_of_threes=Number_of_threes+1;
end
end
end
end
%% Answer Number_of_ones = 2 ; Number_of_twos = 2; Number_of_threes=1;
28. User Input and Pausing
❑In programming you may want to prompt user input as you run
your code instead of predefining everything.
❑Sometimes we may want to view things in a controlled fashion. By
using pause we can view changes on each iteration and see how they
develop things.
29. User Input
%% Here we establish a loop that runs for 1000 intervals, if the user inputs 1 they escape
the loop, i prints out each time denoting the interval number.
for i=1:1000
N = 'Would you like to end this loop? Enter 1 ';
N = input(N)
i
if N== 1
break
end
end
%%
30. Pausing
%% Here we establish a loop that runs for 100 intervals, on each interval the
loop prints a value of x and is then paused, press the spacebar to continue.
for i=1:100
x=i^2
pause
end
%% A useful trick to escape a long loop is to press control and C together in the
command window.
32. Saving and Loading Variables
❑Once you have completed some calculations, you may want to save
your variables to a file and read them in later rather than carrying
out the calculations all over again the next time you boot up your
computer.
❑MATLAB® can save and load variables in a variety of formats, an
example of how to do that with text files is shown in the following
example.
33. Saving and Loading a Variable
%% Here we establish the Array a.
a=[1:1:5;
2:2:10;];
%% Here we save the Array a as a text file
dlmwrite('filename.txt',a,'delimiter',' ');
%% Here we load the values from that text file into a variable M.
M = dlmread('filename.txt')
%%
35. Plotting
❑Plotting is the act of drawing a figure with your data, it helps you
visualize the numbers you are working with.
❑There are several nuances with plotting that we will go through
step by step.
36. Basic Plot of a Line
%% Below we establish the variable a and then plot it
a=[1,2,3,4,0,6,7,8,12,-3];
plot(a)
%%Note that plot as well as other functions are case sensitive,
if
%%you spelt Plot instead of plot you would get an error message
40. Notes
❑You will find yourself if situations where you will have x and y data that you want to plot to get
a line with some meaning.
❑One caveat to this is that the arrays holding x and y data must have the same number of
entries, or you will get an error message.
❑Next, we’ll look at examples that plots a few variables, it will cover labelling axis, adding a
legend, changing font size and setting the color for our lines.
41. Plotting Many Variables at Once
x=[1:10];
car1=[1,2,3,4,5,6,7,8,9,10];
car2=[3,3,3,3,3,3,3,3,3,3];
car3=[10,9,8,7,6,5,4,3,2,1];
plot(x,car1,'k',x,car2,'b',x,car3, 'r')
legend('Car 1','Car 2', 'Car 3')
xlabel('Time','FontSize',28)
ylabel('Speed','FontSize',28)
title('My First Title','FontSize',28)