Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Tags

#DataScience

Question

In hypothesis testing, the proposed model is built on which dataset:

Answer

the training dataset.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#DataScience #statistics

Question

Inferential analytics..

Answer

uses the probability theory to arrive at a conclusion.

Example:

Categorize height as “Tall,” “Medium,” and “Short”

Take a sample to study from the population.

z-test or t test?

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#DataScience

Question

Hypothesis Testing – Error Types

Answer

The null hypothesis corresponds to the position of the defendant: just as he is presumed to be innocent until proven guilty, so is the null hypothesis presumed to be true until the data provide convincing evidence against it.

**Type I Error (α)**

• Rejects the null hypothesis when it is true

• The probability of making Type I error is represented by α

(also known as a "false positive")

In terms of the courtroom example, a type I error corresponds to convicting an innocent defendant.

**Type II Error (β)**

• Fails to Reject the null hypothesis when it false

• The probability of making Type II error is represented by β

(also known as a "false negative" )

The alternative hypothesis corresponds to the position against the defendant.

In terms of the courtroom example, a type II error corresponds to acquitting a criminal.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

A tuple is:

- ? dimensional
- mutable/immutable
- ordered/unordered sequence of items
- single/mixed data types

Answer

A tuple is:

**1 dimensional**- immutable
- ordered
- mixed data types

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

What does the enumerate function do?

Answer

provides the index to the list, followed by the value.

example:

somelist = ['a','b','c']

for position, name in enumerate(somelist):

print position, name

will give:

0 a

1 b

2 c

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

functions to sort

Answer

sorted, reversed

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

What function is used to pair the data elements of lists. (Returns list of tuples.)

Answer

zip

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

Pythons syntax for Exception Handling.

Answer

try:

except ValueError:

(check types of errors)

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

Limitations of lists, vs numpy lists.

Answer

Cannot apply a mathematical operation over a normal list.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

what is ndarray.ndim used for?

Answer

It gives the number of axes (dimensions) of the array. It is also called the rank of the array.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

What is ndarray.shape

Answer

Returns a tuple of integers showing the size of the array in each dimension.

(4L,) -> 1 dimension array,4 items

(2L,4L) -> 2D array, 4 items each.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

ndarray.size ?

Answer

It gives the total number of elements in the array. It is equal to the product of the elements of the shape tuple.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

ndarray.dtype ?

Answer

Describes the type of the elements in the array.

sg S7 -> string, of longest length 7

sg S7 -> string, of longest length 7

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

numpy logical condition syntax

Answer

np.logical_and(condition1,condition2)

np.logical_not(condition)

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

numpy Accessing Array Elements.

Answer

np.array[0] eg first set

np.array[0][0]. eg first set, first element.

np.array[:,1:3] . slices all the rows, then columns 1:3 (1 to 2)

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

Indexing with Boolean Arrays

Answer

filter = value>1

value(filter)

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

python. view vs copy . Syntax and differences

Answer

array.view() . changes made to the new array will affect the original.

array.copy() . changes only made to the new array.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

Python shape manipulation functions

Answer

Flatten, Resize, Stack , Reshape, Split

Flatten: array.ravel()

Reshape: array.reshape(3,4) #3 rows, 4 columns

Resize: array.resize(2,6) #2 resizes again to 2rows, 6 columns

Split: np.hsplit(array,2) #splits array to 2

Stack: np.hstack((array1,array2,2))

Flatten: array.ravel()

Reshape: array.reshape(3,4) #3 rows, 4 columns

Resize: array.resize(2,6) #2 resizes again to 2rows, 6 columns

Split: np.hsplit(array,2) #splits array to 2

Stack: np.hstack((array1,array2,2))

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

Linear Algebra functions. transpose, inverse, trace.

Answer

array=np.array([[1,2,3,4],[5,6,7,8]])

array.transpose()

np.linalg.inv(array) #eg 1/value

np.trace(array) #sum of diagonals left to right only

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

A NumPy ndarray can hold single/multiple data type?

Answer

A NumPy ndarray can hold single data type = homogenous.

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

Why Pandas ?

Answer

Easy data aggregation and transformation. Tools for** reading/ writing** data.

Fast and efficient data wrangling.

Intelligent and** automated data alignment.**

High performance**merging and joining** of data sets.

**Functions for handling missing data.**

**Data standardization f**unctions.

Fast and efficient data wrangling.

Intelligent and

High performance

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

Tags

#python

Question

create a panda series.

from which type of data?

Answer

import pandas as pd

someSeries = pd.Series(list/nd.array)

someSeries = pd.Series(5. , index['a','b','c'])

someSeries = pd.Series([1,2,3] , index['a','b','c']) #like a dictionary

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |

#anki #learning #spaced_repitition

One day in the mid-1920s, a Moscow newspaper reporter named Solomon Shereshevsky entered the laboratory of the psychologist Alexander Luria. Shereshevsky's boss at the newspaper had noticed that Shereshevsky never needed to take any notes, but somehow still remembered all he was told, and had suggested he get his memory checked by an expert.

status | not read | reprioritisations | ||
---|---|---|---|---|

last reprioritisation on | reading queue position [%] | |||

started reading on | finished reading on |

emory Michael Nielsen | Y Combinator Research | July 2018 Related Resources Michael Nielsen on Twitter Michael Nielsen's project announcement mailing list cognitivemedium.com By Michael Nielsen <span>One day in the mid-1920s, a Moscow newspaper reporter named Solomon Shereshevsky entered the laboratory of the psychologist Alexander Luria. Shereshevsky's boss at the newspaper had noticed that Shereshevsky never needed to take any notes, but somehow still remembered all he was told, and had suggested he get his memory checked by an expert. Luria began testing Shereshevsky's memory. He began with simple tests, short strings of words and of numbers. Shereshevsky remembered these with ease, and so Luria gradually increased t

Question

MCB 150 Spring 2020

Answer

[default - edit me]

status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|

repetition number in this series | 0 | memorised on | scheduled repetition | ||||

scheduled repetition interval | last repetition or drill |