12/27/2023

Home owner's coverage A B C D E F, what does those mean?

 Homeowners Coverage (towneinsurance.com)


  1. Coverage A, Dwelling
  2. Coverage B, Other Structures
  3. Coverage C, Personal Property
  4. Coverage D, Loss of Use
  5. Coverage E, Personal Liability
  6. Coverage F, Medical Payments

12/13/2023

MS SQL learning note

  •  comments:  /* comments */ or --comments
  • Right click on a table -> "Select TOP 1000 Rows" will run the script below:
    • SELECT TOP (1000) [RoomID]
    •       ,[RoomNumber]
    •       ,[BedType]
    •       ,[Rate]
    •   FROM Table.[ROOMS]

10/22/2023

normal distribution

1 sigma 68% 2 sigma 95% 3 sigma 99.7%

10/21/2023

statistical concept

Type I error = False Positive Type II error = False Negative

7/08/2023

binary search problem

 Generic Binary Search Snippet

left = 0
right = len(nums)-1
while left <= right:
    #update mid
    mid = left+(right-left)//2
    if "find the element"
        do something # return mid index
    elif "cut the left half"
        left = mid+1
    else "cut the right half"
        right = mid-1
return "no found" # if not found, return left index

7/02/2023

Having vs Where Clause in SQL

  It is not a predefined rule but  in a good number of the SQL queries, we use WHERE prior to GROUP BY and HAVING after GROUP BY. The Where clause acts as a pre filter where as Having as a post filter.


https://www.geeksforgeeks.org/having-vs-where-clause-in-sql/


3/18/2023

SQL Study

  • get the unique ratings from film column: 

SELECT DISTINCT(rating) FROM film;

  • get how many unique ratings from film column: 

SELECT COUNT(DISTINCT(rating)) FROM film;

2/04/2023

Precision/Recall/True positive rate/True Negative Rate

In machine learning, the true positive rate, also referred to sensitivity or recall.