summaryrefslogtreecommitdiff
path: root/day1/supervised-learning.txt
blob: 1dce7da46ace4fe6e9dc6c13b1ed64e196361859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Learning: the hows and whys of machine learning

Liam Wiltshire
https://liam-wiltshire.github.io/talks/?talk=machinelearning&conference=phpuk
https://joind.in/event/php-uk-conference-2019/learning-the-hows-and-whys-of-machine-learning

## Overivew

Charge backs

## Supervised learning
Training data
Learning functions
Categorisation / Classification
Regression - Where do we sit on a line

## Naive Bayes classifier
Standardise words
- Un pluralise
- Un gender
- Un tense
- etc

More data == better

## Tokenisation
https://en.wikipedia.org/wiki/Benford%27s_law
https://php-ml.readthedocs.io

Unique tokens for each unique context

## Imbalanced data
One category has more database
99% data not charge back
Just being accurate, not very helpful
    - Started by flagging 100% as fine.
    - Need to collect more data, change methods, resample data

## Understand data
- context
- Common data vs specific data
- Continuous vs discrete data

## KNN
K Nearest Number
https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm
    - Distances
    - less sensitive to imbalance
    - Keep K odd (no draws)

## Handling nominal data

Binary
- Increase amounts of dimensions
- normalisation required
- equal scales

## Contextless data is meaningless
Is it normal?

## Next to try
Weighting
Different dimensions
Change K value (was 3NN)
Remove outliers
Diff distance function
weighted distance




# Useful links
https://en.wikipedia.org/wiki/Benford%27s_law
https://php-ml.readthedocs.io
https://liam-wiltshire.github.io/talks/?talk=machinelearning&conference=phpuk
https://joind.in/event/php-uk-conference-2019/learning-the-hows-and-whys-of-machine-learning
https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm