ML

5 questions ML can answer: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-for-beginners-the-5-questions-data-science-answers

  1. Classfication – Whether this belongs to A or B or C
  2. Anomaly detection – Find the odd ones through anomaly detection algorithms(Un supervised, Supervised and semi-supervised)
  3. Regression – Find how much or How many using regression algorithms
  4. Clustering algorithms – How is this organized?Which users like same type of movies? Organize data, we can better understand and predict behaviors and events.
  5. Reinforcement learning algorithms – What should I do now? These study the outcomes of events and helps decide actions based on it. Ex: in a temperature control system, adjust it up or down or leave it as it is. Gather information through trial and error.

How to check if the data is ready?

That can be known from – Is the data: Relevant, Connected, Accurate, Enough to work with?

 R:

Assignment:

A <- 2

 

Data Types:

Numeric – 1

Integer – 1

Character – “”

Logical – TRUE/FALSE

Factor – categorical ex: factor (c (“male”,”female”))

 

Other operations:

Ceiling, round, floor, abs,

class(q) will give data type of q.

 

Vectors:

Collection of elements. Ex: a <- c(1,2,4,5,”abc”) . Typically, all elements in vector will be single type. If character and numeric and mixed, character will be taken as data type for all.

Length(a) will give how many elements in a. a[3] will give 3rd position of a. The positioning starts from 1, not 0

A[5:7] will give all elements from 5 to 7. Also, a[5:length(a)] if it has to be printed till end.

If we need 1,5 and last elements of array, so write a[c(1,5,length(a))] – here c stands for concatenation

To get all variable names, ls() command to use. To remove all these, use rm(list = ls())

To get current working directory- getwd() and to set, use setwd(“c:/users”) or setwd(“c:\\users”)

A <- 1:10 will save 1 to 10 in A, same applies to descending order as well

To make a sequence, seq(1,30,2)  will give values 1,3,5… It will set values incrementing by 2. seq(1, by=2, length = 50) will store exact 50 values from 1 incrementing by 2. rep(2,5) will repeat 2 – 5 times

 

 

 

 

 

 

 

 

 

Leave a comment