CloudyML - Data Science & Analytics
46.6K subscribers
260 photos
54 videos
33 files
1.1K links
My Assignment Driven Data Science Courses
https://linktr.ee/cloudyml

My LinkedIn profile
https://www.linkedin.com/in/akashraj001

My Instagram
https://www.instagram.com/cloudyml.akash
Download Telegram
Company: Siemens
Role: Data Scientist

1. What graphs do you use for basic EDA?
2. How to join tables in python?
3. What is the benefit of shuffling a training dataset when using a batch gradient descent algorithm for optimizing a neural network?
4. A test has a true positive rate of 100% and false-positive rate of 5%. There is a population with a 1/1000 rate of having the condition the test identifies. Considering a positive test, what is the probability of having that condition?
5. Why it is not advisable to use a softmax output activation function in a multi-label classification problem for a one-hot encoded target?
6. How can you iterate over a list and also retrieve element indices at the same time?
7. For a given dataset, you decide to use SVM as the main classifier. You select RBF as your kernel. What would be the optimum gamma value that would allow you to capture the features of the dataset really well?
8. What does the cost parameter in SVM stand for?
9. What is Softmax Function? What is the formula of Softmax Normalization?
10. If you were assigned multiple tasks at the same time, how would you organize yourself to produce quality work under tight deadlines?
Today's Quiz -  What is a trigger in MySQL? How can we use it?

Company Name - McAfee

Role - Data Scientist


A trigger in MySQL is a set of SQL statements that reside in a system catalog. It is a special type of stored procedure that is invoked automatically in response to an event. Each trigger is associated with a table, which is activated on any DML statement such as INSERT, UPDATE, or DELETE.

A trigger is called a special procedure because it cannot be called directly like a stored procedure. The main difference between the trigger and procedure is that a trigger is called automatically when a data modification event is made against a table. In contrast, a stored procedure must be called explicitly.

Generally, triggers are of two types according to the SQL standard: row-level triggers and statement-level triggers.

Row-Level Trigger: It is a trigger, which is activated for each row by a triggering statement such as insert, update, or delete. For example, if a table has inserted, updated, or deleted multiple rows, the row trigger is fired automatically for each row affected by the insert, update or delete statement.

Statement-Level Trigger: It is a trigger, which is fired once for each event that occurs on a table regardless of how many rows are inserted, updated, or deleted.

For creating a new trigger, we need to use the CREATE TRIGGER statement. Its syntax is as follows:

CREATE TRIGGER trigger_name trigger_time trigger_event
ON table_name
FOR EACH ROW
BEGIN
...
END;

Trigger_name is the name of the trigger which must be put after the CREATE TRIGGER statement. 

Trigger_time is the time of trigger activation and it can be BEFORE or AFTER. We must have to specify the activation time while defining a trigger.

Trigger_event can be INSERT, UPDATE, or DELETE. This event causes the trigger to be invoked. A trigger only can be invoked by one event.

Table_name is the name of the table. Actually, a trigger is always associated with a specific table.

BEGIN…END is the block in which we will define the logic for the trigger.
1. Company: Tata Consultancy Services
Role: Data Scientist
Experience: 5- 10 Years
Job link: https://www.linkedin.com/jobs/search/?alternateChannel=remote&alternateCode=seturl&currentJobId=2674709197&f_WRA=true&geoId=102713980&origin=JOBS_HOME_REMOTE_JOBS&refId=1XgTGWHJZx5GJZhOHpCU2Q%3D%3D&lipi=urn%3Ali%3Apage%3Ad_flagship3_job_home%3Bj%2Bo%2FnoGLQGWHEEt%2FIE64rA%3D%3D&lici=8E81SLT7Cge%2FD2Lj%2Bhc9aw%3D%3D

2. Company: Dell Technologies
Role: Junior Data Scientist
Experience: 5+ years
Job link: https://www.linkedin.com/jobs/view/2669974011/?eBP=NotAvailableFromMidTier&recommendedFlavor=IN_NETWORK&refId=Wjdu09MeKPo4MXQYNh427w%3D%3D&trackingId=5t5695e8rFlMm5dGQdmLQg%3D%3D&trk=flagship3_search_srp_jobs&lipi=urn%3Ali%3Apage%3Ad_flagship3_search_srp_jobs%3BgZQLsydnSuyksd%2Btnubpaw%3D%3D&lici=5t5695e8rFlMm5dGQdmLQg%3D%3D

3. Company: EY
Role: Data Scientist - Digital Knowledge Platform
Experience: 5 years
Job link: https://www.linkedin.com/jobs/view/2673591461/?eBP=JOB_SEARCH_ORGANIC&recommendedFlavor=COMPANY_RECRUIT&refId=EnjOMzRCrlaqkEpWkrc3%2FQ%3D%3D&trackingId=KadOnGPhZiNy7UM6UmK9RQ%3D%3D&trk=flagship3_search_srp_jobs&lipi=urn%3Ali%3Apage%3Ad_flagship3_search_srp_jobs%3BASb4vGrbS7W8Ixc76NdVBg%3D%3D&lici=KadOnGPhZiNy7UM6UmK9RQ%3D%3D

4. Company: Cisco
Role: Data Scientist - (New Grad) - India UHR
Experience: 4 years
Job link : https://www.linkedin.com/jobs/view/2679202845/?eBP=JOB_SEARCH_ORGANIC&recommendedFlavor=SCHOOL_RECRUIT&refId=EnjOMzRCrlaqkEpWkrc3%2FQ%3D%3D&trackingId=5XYYhhLmqsRHef6xs5bbWw%3D%3D&trk=flagship3_search_srp_jobs&lipi=urn%3Ali%3Apage%3Ad_flagship3_search_srp_jobs%3BJoiaiQ2rTN6czOrtFoSwWw%3D%3D&lici=5XYYhhLmqsRHef6xs5bbWw%3D%3D

5. Company: Uber
Role: Data Analyst I, Tech
Experience: 5 years
Job link: https://www.linkedin.com/jobs/view/2679268362/?alternateChannel=search&refId=EnjOMzRCrlaqkEpWkrc3%2FQ%3D%3D&trackingId=WaWyd19S35vr%2FqjDAxj8Gw%3D%3D&trk=d_flagship3_search_srp_jobs
Today's Quiz -  What is the difference between Skewness and kurtosis?

Company Name - HP

Role - Data Scientist


The characteristic of a frequency distribution that ascertains its symmetry about the mean is called skewness. On the other hand, Kurtosis means the relative pointedness of the standard bell curve, defined by the frequency distribution.

Skewness  is characteristic of the deviation from the mean, to be greater on one side than the other, i.e. attribute of the distribution having one tail heavier than the other. Skewness is used to indicate the shape of the distribution of data. Conversely, kurtosis is a measure to indicate the flatness or peakedness of the frequency distribution curve and measures the tails or outliers of the distribution.

Skewness is an indicator of lack of symmetry, i.e., both left and right sides of the curve are unequal, with respect to the central point. As against this, kurtosis is a measure of data, that is either peaked or flat, with respect to the probability distribution.

Skewness shows how much and in which direction, the values deviate from the mean. In contrast, kurtosis explain how tall and sharp the central peak is.

In a skewed distribution, the curve is extended to either left or right side. So, when the plot is extended towards the right side more, it denotes positive skewness, wherein mode < median < mean. On the other hand, when the plot is stretched more towards the left direction, then it is called as negative skewness and so, mean < median < mode. Positive kurtosis represents that the distribution is more peaked than the normal distribution, whereas negative kurtosis shows that the distribution is less peaked than the normal distribution.
How would you build the algorithm for type-ahead search for Netflix?

We want a recommendation algorithm sounds like RNN which is a recurrent neural network which is not easy to setup at all, but we can try building recommendation with much simpler approach that is with a simple prefix matching algorithm and we can certainly go into expanding it on until we have something that will be on par with RNN.

We will use Lookup in this database table/ prefix table. This prefix table starts with an input string and that is your prefix and it will output the suggested string or suffixes. Example: what does “hello” prefix to and its suffixes to the model.

Scoping is very important by doing fuzzy matching, context matching like what if you were using a different language. So, if you are trying to input “big” that could output any number of suffixes example: big shot or big sky or the big year etc.

In existing search corpus of billions of searches what proportion of the time do people writing the big actually click on the big shot and what proportion of the time do they output the big sky, so you can just have a simple thing that has every possible search prefix that has ever been typed on Netflix and output that to the most common thing that they clicked on. Boom! That’s your prefix matching a recommendation algorithm for type ahead search.

Context matching is also important here, if u have string input and a user profile with various number of features into a string output. You can convert user profile into a K means clustering we can output this into either John Stamos’s fan and not John Stamos’s fan, so if you are John Stamos’s fan and if you type the big, every time Netflix is going to recommend the big shot or else other way round. Also user profile can be set to right dimensionality.
Some Data Science Openings for freshers:

1. Company: IBM
Role: Data Analyst
Experience: 0-1 years
Job link: https://lnkd.in/eNFQs5fM

2. Company: Cognizant
Role: Trainee- Junior Data Analyst
Experience: 0-1 years
Job link: https://lnkd.in/eAdRtMNt

3. Company: Tide Software
Role: Data Scientist
Experience: 0-1 years
Job Role: https://lnkd.in/e4C7BPVP

4. Company: Zilingo.com
Role: Data Analyst
Experience: 6 Months -2 years
Job link: https://lnkd.in/eZ3kE3-P

5. Company: Flipkart
Role: Applied Scientist
Experience: 0– 2 years
Jo link: https://lnkd.in/eBPSZtuj
Join our Newsletter for Daily Updates on interview questions
How to detect an anomaly in a distribution?

Anomaly detection is a technique used to identify unusual patterns that do not conform to expected behavior. It can be considered the thoughtful process of determining what is normal and what is not. Anomalies are also referred to as outliers, novelties, noise, exceptions and deviations. Simply, anomaly detection is the task of defining a boundary around normal data points so that they can be distinguishable from outliers.

Anomalies can be broadly categorized as:

Point anomalies: A single instance of data is anomalous if it’s too far off from the rest. Business use case: Detecting credit card fraud based on “amount spent.”

Contextual anomalies: The abnormality is context specific. This type of anomaly is common in time-series data. Business use case: Spending $100 on food every day during the holiday season is normal, but may be odd otherwise.

Collective anomalies: A set of data instances collectively helps in detecting anomalies. Business use case: Someone is trying to copy data from a remote machine to a local host unexpectedly, an anomaly that would be flagged as a potential cyber-attack.

The different types of methods for anomaly detection are as follows:

Simple Statistical Methods

The simplest approach to identifying irregularities in data is to flag the data points that deviate from common statistical properties of a distribution, including mean, median, mode, and quantiles. When an anomalous data point deviates by a certain standard deviation from the mean, then traversing mean over time-series data isn’t exactly trivial, as it’s not static. Thus, a rolling window to compute the average across the data points and it’s intended to smooth short-term fluctuations and highlight long-term ones.

Machine Learning-Based Approaches for Anomaly Detection:

(a) Clustering-Based Anomaly Detection:

The approach focuses on unsupervised learning, similar data points tend to belong to similar groups or clusters, as determined by their distance from local centroids.

The k-means algorithm can be used which partition the dataset into a given number of clusters. Any data points that fall outside of these clusters are considered as anomalies.

(b) Density-based anomaly detection:

This approach is based on the K-nearest neighbors algorithm. It’s evident that normal data points always occur around a dense neighborhood and abnormalities deviate far away. To measure the nearest set of a data point, you can use Euclidean distance or similar measure according to the type of data you have.

(c) Support Vector Machine-Based Anomaly Detection:

A support vector machine is another effective technique for detecting anomalies. One-Class SVMs have been devised for cases in which one class only is known, and the problem is to identify anything outside this class.

This is known as novelty detection, and it refers to automatic identification of unforeseen or abnormal phenomena, i.e. outliers, embedded in a large amount of normal data.

Anomaly detections helps to monitor any data source, including user logs, devices, networks, and servers. This rapidly helps in identifying zero-day attacks as well as unknown security threats.
❤1
Some openings for freshers:

1. Company: Datumlyze Pvt Ltd
Role: Technical Data Analyst
Experience: 0-2 years
Job link: https://lnkd.in/eURVxHRd

2. Company: Analytos
Role: Junior Data Scientist
Experience: 0-2 years
Job Link: https://lnkd.in/ezDRZ-4B

3. Company: Hotstar
Role: Data Analyst
Experience: 1-3 years
Job link: https://lnkd.in/eAJd-gnd

4. Company: Tide Software
Role: Data Scientist
Experience: 0-5 years
Job link: https://lnkd.in/e4C7BPVP


5. Company:Cipla
Role: Data Scientist
Experience: 1-7 years
Link: https://lnkd.in/eF34dNgR
Channel name was changed to «CloudyML - Data Science»
Today's Quiz -   What is cross-validation and why would you use it?

Company Name - IBM

Role - Data Scientist



Cross-Validation is a statistical method of evaluating and comparing learning algorithms by dividing data into two segments: one used to learn or train a model and the other used to validate the model. 

In typical cross-validation, the training and validation sets must cross-over in successive rounds such that each data point has a chance of being validated against. 

The basic form of cross-validation is k-fold cross-validation. Other forms of cross-validation are special cases of k-fold cross-validation or involve repeated rounds of k-fold cross-validation.

In k-fold cross-validation, the data is first partitioned into k equally (or nearly equally) sized segments or folds. Subsequently k iterations of training and validation are performed such that within each iteration a different fold of the data is held-out for validation while the remaining k − 1 folds are used for learning. 

So, why do we use cross-validation?

It allows us to get more metrics and draw important conclusion about our algorithm and our data.

Helps to tune the hyper parameters of a given machine learning algorithm, to get good performance according to some suitable metric.

It mitigates overfitting while building a pipeline of models, such that second’s models input will be real predictions on data that our first model never seen before.

K-fold cross validation also significantly reduces bias as we are using most of the data for fitting, and also significantly reduces variance as most of the data is also being used in validation set.
❤1
Today's Quiz - What is multicollinearity and how to detect it in a dataset?
Company Name - Infosys
Role - Data Scientist



Let’s start with understanding correlation.

The correlation between two variables can be measured with a correlation coefficient which can range between -1 to 1. If the value is 0, the two variables are independent and there is no correlation. If the measure is extremely close to one of the extreme values, it indicates a linear relationship and highly correlated with each other. This means a change in one variable is associated with a significant change in other variables.


Multicollinearity is a condition when there is a significant dependency or association between the independent variables or the predictor variables. A significant correlation between the independent variables is often the first evidence of presence of multicollinearity.
How to test Multicollinearity?

Correlation matrix / Correlation plot: A correlation plot can be used to identify the correlation or bivariate relationship between two independent variables
Variation Inflation Factor (VIF): VIF is used to identify the correlation of one independent variable with a group of other variables.

Consider that we have 9 (assume V1 to V9) independent variables. To calculate the VIF of variable V1, we isolate the variable V1 and consider as the target variable and all the other variables(i.e V2 to V9) will be treated as the predictor variables.

We use all the other predictor variables and train a regression model and find out the corresponding R2 value.
Using this R2 value, we compute the VIF value gives as the image below.

It is always desirable to have VIF value as small as possible. A threshold is also set, which means that any independent variable greater than the threshold will have to be removed.
How is oversampling different from under sampling?

Oversampling and under sampling are 2 important techniques used in machine learning – classification problems in order to reduce the class imbalance thereby increasing the accuracy of the model.

Classification is nothing but predicting the category of a data point to which it may probably belong by learning about past characteristics of similar instances. When the segregation of classes is not approximately equal then it can be termed as a “Class imbalance” problem. To solve this scenario in our data set, we use oversampling and under sampling.

Oversampling is used when the amount of data collected is insufficient. A popular over-sampling technique is SMOTE (Synthetic Minority Over-sampling Technique), which creates synthetic samples by randomly sampling the characteristics from occurrences in the minority class.

Conversely, if a class of data is the overrepresented majority class, under sampling may be used to balance it with the minority class. Under sampling is used when the amount of collected data is sufficient. Common methods of under sampling include cluster centroids and To meke links, both of which target potential overlapping characteristics within the collected data sets to reduce the amount of majority data.

Ex: Let’s say in a bank majority of the customers are from a specific Race and very few customers are from other races , hence if the model is trained with this data , it is most likely that Model will reject the loan for Minority Race.

So, what should we do about it?

For, oversampling we increase the number of records belonging to the “minority race” category by duplicating its presence. So that the difference between the numbers of records belonging to both of the classes will narrow down.

Under sampling we reduce the number of records belonging to the “majority race”. The records for the deletion are selected strictly through a random process and are not influenced by any constraints or bias.

To conclude, over sampling is preferable as under sampling can result in the loss of important data. Under sampling is suggested when the amount of data collected is larger than ideal and can help data mining tools to stay within the limits of what they can effectively process.
Data Science openings for freshers:

Company: Diatoz Solutions
Role: Data Scientist
Experience: 0-1 years
Job link: https://lnkd.in/eTXtNYvF

Company: Valiance Solutions
Role: Data Scientist
Experience: 0-1 years
Job link:https://lnkd.in/eva6P33A

Company: Gartner
Role: Data Engineer Business Intelligence
Experience: 0-1 years
Job link: https://lnkd.in/eE-6w9bm

Company: Sciative Solution
Role: Data Analyst
Experience: 0-2 years
Job link:https://lnkd.in/e-y8vqYs