[1] "knitr" "rmarkdown" "Boruta" "vip" "outliers"
[6] "mice" "missForest" "lubridate" "forcats" "stringr"
[11] "dplyr" "purrr" "readr" "tidyr" "tibble"
[16] "ggplot2" "tidyverse" "janitor" "pacman"
data science with R/Julia/Python
kuch to shikha
data science with R
R setup
loading dataset
sepal_length | sepal_width | petal_length | petal_width | species |
---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | setosa |
4.9 | 3.0 | 1.4 | 0.2 | NA |
4.7 | 3.2 | 1.3 | 0.2 | setosa |
NA | 3.1 | 1.5 | 0.2 | setosa |
5.0 | 3.6 | NA | 0.2 | NA |
5.4 | 3.9 | 1.7 | 0.4 | setosa |
4.6 | 3.4 | NA | 0.3 | setosa |
5.0 | 3.4 | 1.5 | 0.2 | NA |
4.4 | 2.9 | 1.4 | 0.2 | setosa |
4.9 | 3.1 | 1.5 | NA | setosa |
5.4 | 3.7 | 1.5 | 0.2 | setosa |
4.8 | 3.4 | 1.6 | 0.2 | setosa |
4.8 | 3.0 | NA | 0.1 | setosa |
4.3 | 3.0 | 1.1 | 0.1 | setosa |
5.8 | 4.0 | 1.2 | 0.2 | setosa |
5.7 | 4.4 | 1.5 | 0.4 | setosa |
5.4 | 3.9 | 1.3 | 0.4 | setosa |
5.1 | 3.5 | 1.4 | 0.3 | setosa |
5.7 | NA | 1.7 | 0.3 | setosa |
5.1 | 3.8 | 1.5 | 0.3 | setosa |
5.4 | 3.4 | 1.7 | 0.2 | setosa |
5.1 | 3.7 | 1.5 | 0.4 | setosa |
4.6 | 3.6 | 1.0 | 0.2 | NA |
5.1 | 3.3 | 1.7 | 0.5 | setosa |
4.8 | 3.4 | 1.9 | 0.2 | setosa |
5.0 | 3.0 | NA | 0.2 | setosa |
5.0 | 3.4 | 1.6 | 0.4 | NA |
5.2 | 3.5 | 1.5 | 0.2 | setosa |
5.2 | 3.4 | 1.4 | NA | NA |
4.7 | 3.2 | 1.6 | 0.2 | setosa |
4.8 | 3.1 | 1.6 | 0.2 | setosa |
5.4 | NA | 1.5 | 0.4 | setosa |
5.2 | 4.1 | 1.5 | 0.1 | setosa |
5.5 | NA | 1.4 | 0.2 | NA |
4.9 | 3.1 | 1.5 | NA | setosa |
5.0 | 3.2 | 1.2 | 0.2 | setosa |
5.5 | 3.5 | 1.3 | 0.2 | setosa |
4.9 | 3.6 | 1.4 | 0.1 | setosa |
4.4 | 3.0 | 1.3 | 0.2 | setosa |
5.1 | 3.4 | 1.5 | 0.2 | setosa |
NA | 3.5 | 1.3 | 0.3 | setosa |
4.5 | 2.3 | 1.3 | 0.3 | setosa |
4.4 | 3.2 | NA | 0.2 | NA |
5.0 | 3.5 | 1.6 | 0.6 | setosa |
5.1 | NA | 1.9 | NA | NA |
4.8 | 3.0 | 1.4 | 0.3 | setosa |
5.1 | 3.8 | 1.6 | 0.2 | setosa |
4.6 | 3.2 | 1.4 | 0.2 | setosa |
5.3 | 3.7 | 1.5 | 0.2 | setosa |
5.0 | 3.3 | 1.4 | 0.2 | setosa |
7.0 | 3.2 | 4.7 | 1.4 | versicolor |
6.4 | 3.2 | 4.5 | 1.5 | versicolor |
6.9 | 3.1 | 4.9 | 1.5 | versicolor |
5.5 | 2.3 | 4.0 | 1.3 | versicolor |
6.5 | 2.8 | 4.6 | 1.5 | versicolor |
5.7 | 2.8 | 4.5 | 1.3 | versicolor |
6.3 | 3.3 | 4.7 | 1.6 | versicolor |
4.9 | NA | NA | NA | versicolor |
6.6 | 2.9 | 4.6 | 1.3 | versicolor |
5.2 | 2.7 | 3.9 | NA | versicolor |
5.0 | 2.0 | 3.5 | NA | NA |
5.9 | NA | 4.2 | 1.5 | versicolor |
6.0 | 2.2 | 4.0 | 1.0 | versicolor |
6.1 | 2.9 | 4.7 | 1.4 | versicolor |
5.6 | 2.9 | NA | 1.3 | NA |
6.7 | 3.1 | 4.4 | 1.4 | versicolor |
5.6 | 3.0 | 4.5 | 1.5 | NA |
5.8 | NA | 4.1 | 1.0 | versicolor |
6.2 | 2.2 | 4.5 | 1.5 | versicolor |
5.6 | 2.5 | 3.9 | 1.1 | versicolor |
NA | NA | 4.8 | 1.8 | versicolor |
6.1 | 2.8 | 4.0 | NA | versicolor |
6.3 | 2.5 | 4.9 | 1.5 | versicolor |
6.1 | 2.8 | 4.7 | 1.2 | versicolor |
6.4 | 2.9 | 4.3 | 1.3 | versicolor |
6.6 | 3.0 | 4.4 | 1.4 | versicolor |
6.8 | 2.8 | 4.8 | 1.4 | versicolor |
6.7 | 3.0 | 5.0 | 1.7 | versicolor |
NA | 2.9 | NA | 1.5 | versicolor |
5.7 | 2.6 | 3.5 | 1.0 | versicolor |
5.5 | 2.4 | 3.8 | 1.1 | versicolor |
5.5 | 2.4 | NA | 1.0 | versicolor |
5.8 | 2.7 | 3.9 | 1.2 | versicolor |
6.0 | NA | 5.1 | NA | versicolor |
5.4 | 3.0 | 4.5 | 1.5 | versicolor |
6.0 | 3.4 | 4.5 | 1.6 | versicolor |
6.7 | 3.1 | 4.7 | 1.5 | NA |
6.3 | 2.3 | 4.4 | 1.3 | versicolor |
5.6 | 3.0 | 4.1 | 1.3 | versicolor |
5.5 | 2.5 | 4.0 | 1.3 | versicolor |
5.5 | 2.6 | 4.4 | 1.2 | versicolor |
6.1 | 3.0 | 4.6 | 1.4 | versicolor |
5.8 | 2.6 | 4.0 | 1.2 | versicolor |
5.0 | 2.3 | 3.3 | 1.0 | versicolor |
5.6 | 2.7 | 4.2 | 1.3 | versicolor |
5.7 | 3.0 | 4.2 | 1.2 | NA |
5.7 | 2.9 | 4.2 | 1.3 | versicolor |
NA | NA | 4.3 | 1.3 | versicolor |
5.1 | 2.5 | 3.0 | 1.1 | versicolor |
5.7 | 2.8 | NA | 1.3 | versicolor |
NA | 3.3 | 6.0 | 2.5 | virginica |
5.8 | 2.7 | 5.1 | NA | virginica |
NA | 3.0 | 5.9 | 2.1 | virginica |
6.3 | 2.9 | 5.6 | 1.8 | virginica |
6.5 | 3.0 | 5.8 | 2.2 | virginica |
7.6 | 3.0 | 6.6 | 2.1 | virginica |
4.9 | 2.5 | 4.5 | 1.7 | virginica |
NA | NA | 6.3 | 1.8 | virginica |
6.7 | 2.5 | 5.8 | 1.8 | virginica |
7.2 | 3.6 | 6.1 | 2.5 | virginica |
6.5 | 3.2 | 5.1 | NA | NA |
6.4 | 2.7 | 5.3 | 1.9 | virginica |
6.8 | 3.0 | 5.5 | 2.1 | virginica |
5.7 | 2.5 | 5.0 | 2.0 | virginica |
5.8 | 2.8 | 5.1 | 2.4 | virginica |
6.4 | 3.2 | 5.3 | 2.3 | virginica |
6.5 | 3.0 | 5.5 | 1.8 | virginica |
7.7 | 3.8 | 6.7 | 2.2 | virginica |
7.7 | 2.6 | 6.9 | NA | virginica |
6.0 | NA | 5.0 | 1.5 | NA |
6.9 | 3.2 | 5.7 | 2.3 | virginica |
5.6 | 2.8 | 4.9 | 2.0 | virginica |
NA | 2.8 | 6.7 | NA | virginica |
6.3 | 2.7 | NA | NA | virginica |
6.7 | 3.3 | 5.7 | 2.1 | virginica |
7.2 | NA | 6.0 | 1.8 | NA |
6.2 | 2.8 | 4.8 | 1.8 | virginica |
6.1 | 3.0 | 4.9 | NA | virginica |
6.4 | 2.8 | 5.6 | 2.1 | virginica |
7.2 | 3.0 | 5.8 | 1.6 | virginica |
NA | 2.8 | 6.1 | 1.9 | virginica |
7.9 | 3.8 | 6.4 | 2.0 | virginica |
6.4 | 2.8 | 5.6 | 2.2 | virginica |
6.3 | NA | NA | 1.5 | virginica |
6.1 | 2.6 | 5.6 | 1.4 | virginica |
NA | 3.0 | 6.1 | 2.3 | virginica |
6.3 | 3.4 | 5.6 | 2.4 | virginica |
6.4 | 3.1 | 5.5 | 1.8 | virginica |
6.0 | 3.0 | 4.8 | 1.8 | virginica |
6.9 | 3.1 | 5.4 | 2.1 | NA |
6.7 | 3.1 | 5.6 | 2.4 | NA |
6.9 | 3.1 | 5.1 | 2.3 | virginica |
5.8 | 2.7 | 5.1 | 1.9 | virginica |
6.8 | 3.2 | 5.9 | 2.3 | virginica |
NA | 3.3 | 5.7 | NA | virginica |
6.7 | 3.0 | 5.2 | 2.3 | virginica |
6.3 | NA | 5.0 | 1.9 | virginica |
6.5 | NA | 5.2 | 2.0 | virginica |
6.2 | 3.4 | 5.4 | 2.3 | virginica |
5.9 | 3.0 | 5.1 | 1.8 | virginica |
'data.frame': 150 obs. of 5 variables:
$ sepal_length: num 5.1 4.9 4.7 NA 5 5.4 4.6 5 4.4 4.9 ...
$ sepal_width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
$ petal_length: num 1.4 1.4 1.3 1.5 NA 1.7 NA 1.5 1.4 1.5 ...
$ petal_width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 NA ...
$ species : Factor w/ 3 levels "setosa","versicolor",..: 1 NA 1 1 NA 1 1 NA 1 1 ...
sepal_length sepal_width petal_length petal_width species
12 16 12 16 19
[1] 0 1 0 1 2 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 2 0 0 1 0 2 1 0 0
[38] 0 0 0 1 0 2 0 3 0 0 0 0 0 0 0 0 0 0 0 0 3 0 1 2 1 0 0 2 0 1 1 0 0 2 1 0 0
[75] 0 0 0 0 2 0 0 1 0 2 0 0 1 0 0 0 0 0 0 0 0 1 0 2 0 1 1 1 1 0 0 0 0 2 0 0 2
[112] 0 0 0 0 0 0 0 1 2 0 0 2 2 0 2 0 1 0 0 1 0 0 2 0 1 0 0 0 1 1 0 0 0 2 0 1 1
[149] 0 0
forecasting with r
[1] "BAJAJHIND.NS"
removing missing values using mice package
iter imp variable
1 1 sepal_length sepal_width petal_length petal_width species
1 2 sepal_length sepal_width petal_length petal_width species
1 3 sepal_length sepal_width petal_length petal_width species
1 4 sepal_length sepal_width petal_length petal_width species
1 5 sepal_length sepal_width petal_length petal_width species
2 1 sepal_length sepal_width petal_length petal_width species
2 2 sepal_length sepal_width petal_length petal_width species
2 3 sepal_length sepal_width petal_length petal_width species
2 4 sepal_length sepal_width petal_length petal_width species
2 5 sepal_length sepal_width petal_length petal_width species
3 1 sepal_length sepal_width petal_length petal_width species
3 2 sepal_length sepal_width petal_length petal_width species
3 3 sepal_length sepal_width petal_length petal_width species
3 4 sepal_length sepal_width petal_length petal_width species
3 5 sepal_length sepal_width petal_length petal_width species
4 1 sepal_length sepal_width petal_length petal_width species
4 2 sepal_length sepal_width petal_length petal_width species
4 3 sepal_length sepal_width petal_length petal_width species
4 4 sepal_length sepal_width petal_length petal_width species
4 5 sepal_length sepal_width petal_length petal_width species
5 1 sepal_length sepal_width petal_length petal_width species
5 2 sepal_length sepal_width petal_length petal_width species
5 3 sepal_length sepal_width petal_length petal_width species
5 4 sepal_length sepal_width petal_length petal_width species
5 5 sepal_length sepal_width petal_length petal_width species
sepal_length | sepal_width | petal_length | petal_width | species |
---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | setosa |
4.9 | 3.0 | 1.4 | 0.2 | setosa |
4.7 | 3.2 | 1.3 | 0.2 | setosa |
5.0 | 3.1 | 1.5 | 0.2 | setosa |
5.0 | 3.6 | 1.9 | 0.2 | setosa |
5.4 | 3.9 | 1.7 | 0.4 | setosa |
4.6 | 3.4 | 1.4 | 0.3 | setosa |
5.0 | 3.4 | 1.5 | 0.2 | setosa |
4.4 | 2.9 | 1.4 | 0.2 | setosa |
4.9 | 3.1 | 1.5 | 0.2 | setosa |
5.4 | 3.7 | 1.5 | 0.2 | setosa |
4.8 | 3.4 | 1.6 | 0.2 | setosa |
4.8 | 3.0 | 1.6 | 0.1 | setosa |
4.3 | 3.0 | 1.1 | 0.1 | setosa |
5.8 | 4.0 | 1.2 | 0.2 | setosa |
5.7 | 4.4 | 1.5 | 0.4 | setosa |
5.4 | 3.9 | 1.3 | 0.4 | setosa |
5.1 | 3.5 | 1.4 | 0.3 | setosa |
5.7 | 4.0 | 1.7 | 0.3 | setosa |
5.1 | 3.8 | 1.5 | 0.3 | setosa |
5.4 | 3.4 | 1.7 | 0.2 | setosa |
5.1 | 3.7 | 1.5 | 0.4 | setosa |
4.6 | 3.6 | 1.0 | 0.2 | setosa |
5.1 | 3.3 | 1.7 | 0.5 | setosa |
4.8 | 3.4 | 1.9 | 0.2 | setosa |
5.0 | 3.0 | 1.4 | 0.2 | setosa |
5.0 | 3.4 | 1.6 | 0.4 | setosa |
5.2 | 3.5 | 1.5 | 0.2 | setosa |
5.2 | 3.4 | 1.4 | 0.6 | setosa |
4.7 | 3.2 | 1.6 | 0.2 | setosa |
4.8 | 3.1 | 1.6 | 0.2 | setosa |
5.4 | 3.9 | 1.5 | 0.4 | setosa |
5.2 | 4.1 | 1.5 | 0.1 | setosa |
5.5 | 3.9 | 1.4 | 0.2 | setosa |
4.9 | 3.1 | 1.5 | 0.2 | setosa |
5.0 | 3.2 | 1.2 | 0.2 | setosa |
5.5 | 3.5 | 1.3 | 0.2 | setosa |
4.9 | 3.6 | 1.4 | 0.1 | setosa |
4.4 | 3.0 | 1.3 | 0.2 | setosa |
5.1 | 3.4 | 1.5 | 0.2 | setosa |
5.0 | 3.5 | 1.3 | 0.3 | setosa |
4.5 | 2.3 | 1.3 | 0.3 | setosa |
4.4 | 3.2 | 1.4 | 0.2 | setosa |
5.0 | 3.5 | 1.6 | 0.6 | setosa |
5.1 | 2.6 | 1.9 | 0.1 | setosa |
4.8 | 3.0 | 1.4 | 0.3 | setosa |
5.1 | 3.8 | 1.6 | 0.2 | setosa |
4.6 | 3.2 | 1.4 | 0.2 | setosa |
5.3 | 3.7 | 1.5 | 0.2 | setosa |
5.0 | 3.3 | 1.4 | 0.2 | setosa |
7.0 | 3.2 | 4.7 | 1.4 | versicolor |
6.4 | 3.2 | 4.5 | 1.5 | versicolor |
6.9 | 3.1 | 4.9 | 1.5 | versicolor |
5.5 | 2.3 | 4.0 | 1.3 | versicolor |
6.5 | 2.8 | 4.6 | 1.5 | versicolor |
5.7 | 2.8 | 4.5 | 1.3 | versicolor |
6.3 | 3.3 | 4.7 | 1.6 | versicolor |
4.9 | 2.3 | 3.3 | 1.0 | versicolor |
6.6 | 2.9 | 4.6 | 1.3 | versicolor |
5.2 | 2.7 | 3.9 | 1.0 | versicolor |
5.0 | 2.0 | 3.5 | 1.0 | versicolor |
5.9 | 3.0 | 4.2 | 1.5 | versicolor |
6.0 | 2.2 | 4.0 | 1.0 | versicolor |
6.1 | 2.9 | 4.7 | 1.4 | versicolor |
5.6 | 2.9 | 4.2 | 1.3 | versicolor |
6.7 | 3.1 | 4.4 | 1.4 | versicolor |
5.6 | 3.0 | 4.5 | 1.5 | versicolor |
5.8 | 2.6 | 4.1 | 1.0 | versicolor |
6.2 | 2.2 | 4.5 | 1.5 | versicolor |
5.6 | 2.5 | 3.9 | 1.1 | versicolor |
6.8 | 3.1 | 4.8 | 1.8 | versicolor |
6.1 | 2.8 | 4.0 | 1.5 | versicolor |
6.3 | 2.5 | 4.9 | 1.5 | versicolor |
6.1 | 2.8 | 4.7 | 1.2 | versicolor |
6.4 | 2.9 | 4.3 | 1.3 | versicolor |
6.6 | 3.0 | 4.4 | 1.4 | versicolor |
6.8 | 2.8 | 4.8 | 1.4 | versicolor |
6.7 | 3.0 | 5.0 | 1.7 | versicolor |
5.2 | 2.9 | 3.5 | 1.5 | versicolor |
5.7 | 2.6 | 3.5 | 1.0 | versicolor |
5.5 | 2.4 | 3.8 | 1.1 | versicolor |
5.5 | 2.4 | 3.8 | 1.0 | versicolor |
5.8 | 2.7 | 3.9 | 1.2 | versicolor |
6.0 | 2.8 | 5.1 | 1.4 | versicolor |
5.4 | 3.0 | 4.5 | 1.5 | versicolor |
6.0 | 3.4 | 4.5 | 1.6 | versicolor |
6.7 | 3.1 | 4.7 | 1.5 | versicolor |
6.3 | 2.3 | 4.4 | 1.3 | versicolor |
5.6 | 3.0 | 4.1 | 1.3 | versicolor |
5.5 | 2.5 | 4.0 | 1.3 | versicolor |
5.5 | 2.6 | 4.4 | 1.2 | versicolor |
6.1 | 3.0 | 4.6 | 1.4 | versicolor |
5.8 | 2.6 | 4.0 | 1.2 | versicolor |
5.0 | 2.3 | 3.3 | 1.0 | versicolor |
5.6 | 2.7 | 4.2 | 1.3 | versicolor |
5.7 | 3.0 | 4.2 | 1.2 | versicolor |
5.7 | 2.9 | 4.2 | 1.3 | versicolor |
5.8 | 2.5 | 4.3 | 1.3 | versicolor |
5.1 | 2.5 | 3.0 | 1.1 | versicolor |
5.7 | 2.8 | 4.0 | 1.3 | versicolor |
7.2 | 3.3 | 6.0 | 2.5 | virginica |
5.8 | 2.7 | 5.1 | 2.0 | virginica |
6.9 | 3.0 | 5.9 | 2.1 | virginica |
6.3 | 2.9 | 5.6 | 1.8 | virginica |
6.5 | 3.0 | 5.8 | 2.2 | virginica |
7.6 | 3.0 | 6.6 | 2.1 | virginica |
4.9 | 2.5 | 4.5 | 1.7 | virginica |
7.6 | 3.0 | 6.3 | 1.8 | virginica |
6.7 | 2.5 | 5.8 | 1.8 | virginica |
7.2 | 3.6 | 6.1 | 2.5 | virginica |
6.5 | 3.2 | 5.1 | 1.8 | virginica |
6.4 | 2.7 | 5.3 | 1.9 | virginica |
6.8 | 3.0 | 5.5 | 2.1 | virginica |
5.7 | 2.5 | 5.0 | 2.0 | virginica |
5.8 | 2.8 | 5.1 | 2.4 | virginica |
6.4 | 3.2 | 5.3 | 2.3 | virginica |
6.5 | 3.0 | 5.5 | 1.8 | virginica |
7.7 | 3.8 | 6.7 | 2.2 | virginica |
7.7 | 2.6 | 6.9 | 2.3 | virginica |
6.0 | 2.6 | 5.0 | 1.5 | virginica |
6.9 | 3.2 | 5.7 | 2.3 | virginica |
5.6 | 2.8 | 4.9 | 2.0 | virginica |
7.2 | 2.8 | 6.7 | 2.3 | virginica |
6.3 | 2.7 | 5.0 | 1.5 | virginica |
6.7 | 3.3 | 5.7 | 2.1 | virginica |
7.2 | 3.1 | 6.0 | 1.8 | virginica |
6.2 | 2.8 | 4.8 | 1.8 | virginica |
6.1 | 3.0 | 4.9 | 1.9 | virginica |
6.4 | 2.8 | 5.6 | 2.1 | virginica |
7.2 | 3.0 | 5.8 | 1.6 | virginica |
6.7 | 2.8 | 6.1 | 1.9 | virginica |
7.9 | 3.8 | 6.4 | 2.0 | virginica |
6.4 | 2.8 | 5.6 | 2.2 | virginica |
6.3 | 2.7 | 5.0 | 1.5 | virginica |
6.1 | 2.6 | 5.6 | 1.4 | virginica |
6.7 | 3.0 | 6.1 | 2.3 | virginica |
6.3 | 3.4 | 5.6 | 2.4 | virginica |
6.4 | 3.1 | 5.5 | 1.8 | virginica |
6.0 | 3.0 | 4.8 | 1.8 | virginica |
6.9 | 3.1 | 5.4 | 2.1 | virginica |
6.7 | 3.1 | 5.6 | 2.4 | virginica |
6.9 | 3.1 | 5.1 | 2.3 | virginica |
5.8 | 2.7 | 5.1 | 1.9 | virginica |
6.8 | 3.2 | 5.9 | 2.3 | virginica |
6.9 | 3.3 | 5.7 | 2.5 | virginica |
6.7 | 3.0 | 5.2 | 2.3 | virginica |
6.3 | 3.0 | 5.0 | 1.9 | virginica |
6.5 | 3.1 | 5.2 | 2.0 | virginica |
6.2 | 3.4 | 5.4 | 2.3 | virginica |
5.9 | 3.0 | 5.1 | 1.8 | virginica |
sepal_length sepal_width petal_length petal_width species
0 0 0 0 0
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[112] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[149] 0 0
species | cnt |
---|---|
setosa | 50 |
versicolor | 50 |
virginica | 50 |
removing outliers
sepal_length sepal_width petal_length petal_width
Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100
1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300
Median :5.800 Median :3.000 Median :4.300 Median :1.300
Mean :5.837 Mean :3.054 Mean :3.759 Mean :1.198
3rd Qu.:6.400 3rd Qu.:3.300 3rd Qu.:5.100 3rd Qu.:1.800
Max. :7.900 Max. :4.400 Max. :6.900 Max. :2.500
species
setosa :50
versicolor:50
virginica :50
sepal_length sepal_width petal_length petal_width
[1,] 5.1 3.5 1.4 0.2
[2,] 4.9 3.0 1.4 0.2
[3,] 4.7 3.2 1.3 0.2
[4,] 5.0 3.1 1.5 0.2
[5,] 5.0 3.6 1.9 0.2
[6,] 5.4 3.9 1.7 0.4
[7,] 4.6 3.4 1.4 0.3
[8,] 5.0 3.4 1.5 0.2
[9,] 4.4 2.9 1.4 0.2
[10,] 4.9 3.1 1.5 0.2
[11,] 5.4 3.7 1.5 0.2
[12,] 4.8 3.4 1.6 0.2
[13,] 4.8 3.0 1.6 0.1
[14,] 4.3 3.0 1.1 0.1
[15,] 5.8 4.0 1.2 0.2
[16,] 5.7 2.8 1.5 0.4
[17,] 5.4 3.9 1.3 0.4
[18,] 5.1 3.5 1.4 0.3
[19,] 5.7 4.0 1.7 0.3
[20,] 5.1 3.8 1.5 0.3
[21,] 5.4 3.4 1.7 0.2
[22,] 5.1 3.7 1.5 0.4
[23,] 4.6 3.6 1.0 0.2
[24,] 5.1 3.3 1.7 0.5
[25,] 4.8 3.4 1.9 0.2
[26,] 5.0 3.0 1.4 0.2
[27,] 5.0 3.4 1.6 0.4
[28,] 5.2 3.5 1.5 0.2
[29,] 5.2 3.4 1.4 0.6
[30,] 4.7 3.2 1.6 0.2
[31,] 4.8 3.1 1.6 0.2
[32,] 5.4 3.9 1.5 0.4
[33,] 5.2 2.8 1.5 0.1
[34,] 5.5 3.9 1.4 0.2
[35,] 4.9 3.1 1.5 0.2
[36,] 5.0 3.2 1.2 0.2
[37,] 5.5 3.5 1.3 0.2
[38,] 4.9 3.6 1.4 0.1
[39,] 4.4 3.0 1.3 0.2
[40,] 5.1 3.4 1.5 0.2
[41,] 5.0 3.5 1.3 0.3
[42,] 4.5 2.3 1.3 0.3
[43,] 4.4 3.2 1.4 0.2
[44,] 5.0 3.5 1.6 0.6
[45,] 5.1 2.6 1.9 0.1
[46,] 4.8 3.0 1.4 0.3
[47,] 5.1 3.8 1.6 0.2
[48,] 4.6 3.2 1.4 0.2
[49,] 5.3 3.7 1.5 0.2
[50,] 5.0 3.3 1.4 0.2
[51,] 7.0 3.2 4.7 1.4
[52,] 6.4 3.2 4.5 1.5
[53,] 6.9 3.1 4.9 1.5
[54,] 5.5 2.3 4.0 1.3
[55,] 6.5 2.8 4.6 1.5
[56,] 5.7 2.8 4.5 1.3
[57,] 6.3 3.3 4.7 1.6
[58,] 4.9 2.3 3.3 1.0
[59,] 6.6 2.9 4.6 1.3
[60,] 5.2 2.7 3.9 1.0
[61,] 5.0 2.8 3.5 1.0
[62,] 5.9 3.0 4.2 1.5
[63,] 6.0 2.2 4.0 1.0
[64,] 6.1 2.9 4.7 1.4
[65,] 5.6 2.9 4.2 1.3
[66,] 6.7 3.1 4.4 1.4
[67,] 5.6 3.0 4.5 1.5
[68,] 5.8 2.6 4.1 1.0
[69,] 6.2 2.2 4.5 1.5
[70,] 5.6 2.5 3.9 1.1
[71,] 6.8 3.1 4.8 1.8
[72,] 6.1 2.8 4.0 1.5
[73,] 6.3 2.5 4.9 1.5
[74,] 6.1 2.8 4.7 1.2
[75,] 6.4 2.9 4.3 1.3
[76,] 6.6 3.0 4.4 1.4
[77,] 6.8 2.8 4.8 1.4
[78,] 6.7 3.0 5.0 1.7
[79,] 5.2 2.9 3.5 1.5
[80,] 5.7 2.6 3.5 1.0
[81,] 5.5 2.4 3.8 1.1
[82,] 5.5 2.4 3.8 1.0
[83,] 5.8 2.7 3.9 1.2
[84,] 6.0 2.8 5.1 1.4
[85,] 5.4 3.0 4.5 1.5
[86,] 6.0 3.4 4.5 1.6
[87,] 6.7 3.1 4.7 1.5
[88,] 6.3 2.3 4.4 1.3
[89,] 5.6 3.0 4.1 1.3
[90,] 5.5 2.5 4.0 1.3
[91,] 5.5 2.6 4.4 1.2
[92,] 6.1 3.0 4.6 1.4
[93,] 5.8 2.6 4.0 1.2
[94,] 5.0 2.3 3.3 1.0
[95,] 5.6 2.7 4.2 1.3
[96,] 5.7 3.0 4.2 1.2
[97,] 5.7 2.9 4.2 1.3
[98,] 5.8 2.5 4.3 1.3
[99,] 5.1 2.5 3.0 1.1
[100,] 5.7 2.8 4.0 1.3
[101,] 7.2 3.3 6.0 2.5
[102,] 5.8 2.7 5.1 2.0
[103,] 6.9 3.0 5.9 2.1
[104,] 6.3 2.9 5.6 1.8
[105,] 6.5 3.0 5.8 2.2
[106,] 7.6 3.0 6.6 2.1
[107,] 4.9 2.5 4.5 1.7
[108,] 7.6 3.0 6.3 1.8
[109,] 6.7 2.5 5.8 1.8
[110,] 7.2 3.6 6.1 2.5
[111,] 6.5 3.2 5.1 1.8
[112,] 6.4 2.7 5.3 1.9
[113,] 6.8 3.0 5.5 2.1
[114,] 5.7 2.5 5.0 2.0
[115,] 5.8 2.8 5.1 2.4
[116,] 6.4 3.2 5.3 2.3
[117,] 6.5 3.0 5.5 1.8
[118,] 7.7 3.8 6.7 2.2
[119,] 7.7 2.6 6.9 2.3
[120,] 6.0 2.6 5.0 1.5
[121,] 6.9 3.2 5.7 2.3
[122,] 5.6 2.8 4.9 2.0
[123,] 7.2 2.8 6.7 2.3
[124,] 6.3 2.7 5.0 1.5
[125,] 6.7 3.3 5.7 2.1
[126,] 7.2 3.1 6.0 1.8
[127,] 6.2 2.8 4.8 1.8
[128,] 6.1 3.0 4.9 1.9
[129,] 6.4 2.8 5.6 2.1
[130,] 7.2 3.0 5.8 1.6
[131,] 6.7 2.8 6.1 1.9
[132,] 7.9 3.8 6.4 2.0
[133,] 6.4 2.8 5.6 2.2
[134,] 6.3 2.7 5.0 1.5
[135,] 6.1 2.6 5.6 1.4
[136,] 6.7 3.0 6.1 2.3
[137,] 6.3 3.4 5.6 2.4
[138,] 6.4 3.1 5.5 1.8
[139,] 6.0 3.0 4.8 1.8
[140,] 6.9 3.1 5.4 2.1
[141,] 6.7 3.1 5.6 2.4
[142,] 6.9 3.1 5.1 2.3
[143,] 5.8 2.7 5.1 1.9
[144,] 6.8 3.2 5.9 2.3
[145,] 6.9 3.3 5.7 2.5
[146,] 6.7 3.0 5.2 2.3
[147,] 6.3 3.0 5.0 1.9
[148,] 6.5 3.1 5.2 2.0
[149,] 6.2 3.4 5.4 2.3
[150,] 5.9 3.0 5.1 1.8
variable importance
Boruta performed 9 iterations in 0.2404349 secs.
4 attributes confirmed important: petal_length, petal_width,
sepal_length, sepal_width;
No attributes deemed unimportant.
Length Class Mode
finalDecision 4 factor numeric
ImpHistory 63 -none- numeric
pValue 1 -none- numeric
maxRuns 1 -none- numeric
light 1 -none- logical
mcAdj 1 -none- logical
timeTaken 1 difftime numeric
roughfixed 1 -none- logical
call 3 -none- call
impSource 1 -none- character
meanImp | medianImp | minImp | maxImp | normHits | decision | |
---|---|---|---|---|---|---|
petal_length | 31.95207 | 32.07526 | 30.31581 | 33.17381 | 1 | Confirmed |
petal_width | 30.64759 | 30.12608 | 29.29565 | 33.41465 | 1 | Confirmed |
sepal_length | 15.34600 | 15.05829 | 14.44868 | 16.39415 | 1 | Confirmed |
sepal_width | 10.98677 | 10.65324 | 10.31884 | 12.53375 | 1 | Confirmed |
Linear regression using R
x | y |
---|---|
1 | 8.366832 |
2 | 12.746207 |
3 | 17.494133 |
4 | 20.141324 |
5 | 24.574645 |
6 | 23.964041 |
7 | 29.850902 |
8 | 32.902596 |
9 | 35.351320 |
10 | 35.838560 |
x y
x 1.0000000 0.9878864
y 0.9878864 1.0000000
Call:
lm(formula = y ~ x, data = d)
Residuals:
Min 1Q Median 3Q Max
-2.222 -1.415 0.526 1.071 2.000
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.088 1.067 6.641 0.000162 ***
x 3.097 0.172 18.006 9.28e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.562 on 8 degrees of freedom
Multiple R-squared: 0.9759, Adjusted R-squared: 0.9729
F-statistic: 324.2 on 1 and 8 DF, p-value: 9.284e-08
List of 12
$ coefficients : Named num [1:2] 7.09 3.1
..- attr(*, "names")= chr [1:2] "(Intercept)" "x"
$ residuals : Named num [1:10] -1.819 -0.537 1.114 0.664 2 ...
..- attr(*, "names")= chr [1:10] "1" "2" "3" "4" ...
$ effects : Named num [1:10] -76.28 28.13 1.56 1.1 2.43 ...
..- attr(*, "names")= chr [1:10] "(Intercept)" "x" "" "" ...
$ rank : int 2
$ fitted.values: Named num [1:10] 10.2 13.3 16.4 19.5 22.6 ...
..- attr(*, "names")= chr [1:10] "1" "2" "3" "4" ...
$ assign : int [1:2] 0 1
$ qr :List of 5
..$ qr : num [1:10, 1:2] -3.162 0.316 0.316 0.316 0.316 ...
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : chr [1:10] "1" "2" "3" "4" ...
.. .. ..$ : chr [1:2] "(Intercept)" "x"
.. ..- attr(*, "assign")= int [1:2] 0 1
..$ qraux: num [1:2] 1.32 1.27
..$ pivot: int [1:2] 1 2
..$ tol : num 1e-07
..$ rank : int 2
..- attr(*, "class")= chr "qr"
$ df.residual : int 8
$ xlevels : Named list()
$ call : language lm(formula = y ~ x, data = d)
$ terms :Classes 'terms', 'formula' language y ~ x
.. ..- attr(*, "variables")= language list(y, x)
.. ..- attr(*, "factors")= int [1:2, 1] 0 1
.. .. ..- attr(*, "dimnames")=List of 2
.. .. .. ..$ : chr [1:2] "y" "x"
.. .. .. ..$ : chr "x"
.. ..- attr(*, "term.labels")= chr "x"
.. ..- attr(*, "order")= int 1
.. ..- attr(*, "intercept")= int 1
.. ..- attr(*, "response")= int 1
.. ..- attr(*, ".Environment")=<environment: R_GlobalEnv>
.. ..- attr(*, "predvars")= language list(y, x)
.. ..- attr(*, "dataClasses")= Named chr [1:2] "numeric" "numeric"
.. .. ..- attr(*, "names")= chr [1:2] "y" "x"
$ model :'data.frame': 10 obs. of 2 variables:
..$ y: num [1:10] 8.37 12.75 17.49 20.14 24.57 ...
..$ x: num [1:10] 1 2 3 4 5 6 7 8 9 10
..- attr(*, "terms")=Classes 'terms', 'formula' language y ~ x
.. .. ..- attr(*, "variables")= language list(y, x)
.. .. ..- attr(*, "factors")= int [1:2, 1] 0 1
.. .. .. ..- attr(*, "dimnames")=List of 2
.. .. .. .. ..$ : chr [1:2] "y" "x"
.. .. .. .. ..$ : chr "x"
.. .. ..- attr(*, "term.labels")= chr "x"
.. .. ..- attr(*, "order")= int 1
.. .. ..- attr(*, "intercept")= int 1
.. .. ..- attr(*, "response")= int 1
.. .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv>
.. .. ..- attr(*, "predvars")= language list(y, x)
.. .. ..- attr(*, "dataClasses")= Named chr [1:2] "numeric" "numeric"
.. .. .. ..- attr(*, "names")= chr [1:2] "y" "x"
- attr(*, "class")= chr "lm"
x |
---|
5.5 |
9.3 |
x | py |
---|---|
5.5 | 24.12306 |
9.3 | 35.89250 |
histogram with normal density curve in R
data science with Julia
Julia setup
nothing to add
nothing to add
glfw initialised
sample project
masti with Julia
-5:1:5
my (generic function with 1 method)
Plots.GRBackend()
working with dataframes
TaskLocalRNG()
6×2 DataFrame
Row │ popat1 popat2
│ Float64 Float64
─────┼─────────────────────
1 │ 0.0491718 0.944318
2 │ 0.119079 0.46105
3 │ 0.393271 0.830334
4 │ 0.0240943 0.573132
5 │ 0.691857 0.176625
6 │ 0.767518 0.114935
2×7 DataFrame
Row │ variable mean min median max nmissing eltype
│ Symbol Float64 Float64 Float64 Float64 Int64 DataType
─────┼───────────────────────────────────────────────────────────────────────
1 │ popat1 0.445195 0.0240943 0.527348 0.855718 0 Float64
2 │ popat2 0.524112 0.114935 0.517091 0.944318 0 Float64
[0.0491718221481211, 0.11907881640750706, 0.3932710232252806, 0.024094310524527707, 0.6918572875342215, 0.7675180540873912, 0.08725304891274233, 0.8557176841095734, 0.8025607099234905, 0.661425351684768]
[0.0491718221481211, 0.11907881640750706, 0.3932710232252806, 0.024094310524527707, 0.6918572875342215, 0.7675180540873912, 0.08725304891274233, 0.8557176841095734, 0.8025607099234905, 0.661425351684768]
["popat1", "popat2"]
10×2 DataFrame
Row │ popat1 popat2
│ Float64 Float64
─────┼─────────────────────
1 │ 0.0491718 0.944318
2 │ 0.119079 0.46105
3 │ 0.393271 0.830334
4 │ 0.0240943 0.573132
5 │ 0.691857 0.176625
6 │ 0.767518 0.114935
7 │ 0.087253 0.7864
8 │ 0.855718 0.892598
9 │ 0.802561 0.207253
10 │ 0.661425 0.254472
10×2 DataFrame
Row │ popat1 popat2
│ Float64 Float64
─────┼─────────────────────
1 │ 0.0491718 0.944318
2 │ 0.119079 0.46105
3 │ 0.393271 0.830334
4 │ 0.0240943 0.573132
5 │ 0.691857 0.176625
6 │ 0.767518 0.114935
7 │ 0.087253 0.7864
8 │ 0.855718 0.892598
9 │ 0.802561 0.207253
10 │ 0.661425 0.254472
solving small linear equation
[1 1; 1 -1]
[10, 5]
2-element Vector{Float64}:
7.5
2.5
[7.5, 2.5]
solving large linear equation
4.740436406477113
-2.7048316242181025
8.84445031591571
-12.18760403297759
-10.760104744507274
-0.6370867741423903
2.92433835274419
3.763709603261683
3.188440276898675
18.76174192711995
10×1 Matrix{Float64}:
2.220446049250313e-16
-1.6653345369377348e-15
3.4416913763379853e-15
-1.1102230246251565e-16
-1.3877787807814457e-16
-9.992007221626409e-16
1.4432899320127035e-15
-2.220446049250313e-15
2.2620794126737565e-15
-6.661338147750939e-16
2.220446049250313e-16
-1.6653345369377348e-15
3.4416913763379853e-15
-1.1102230246251565e-16
-1.3877787807814457e-16
-9.992007221626409e-16
1.4432899320127035e-15
-2.220446049250313e-15
2.2620794126737565e-15
-6.661338147750939e-16
histogram with frequency & density
Normal{Float64}(μ=100.0, σ=10.0)
1000-element Vector{Float64}:
107.14239454177303
112.15416632163475
122.50508395669189
89.69436513203053
87.6361252843894
91.1750826426113
110.72775710668704
90.05507424672686
94.24706740996659
107.40201249783048
⋮
103.02805925456413
124.58899439180635
94.98397866596254
80.01139491277324
82.92420298648162
101.55509941876329
91.3235805424571
95.6705118100269
103.08985851332379
Plots.Series(RecipesPipeline.DefaultsDict(:plot_object => Plot{Plots.GRBackend() n=1}, :subplot => Subplot{1}, :markershape => :none, :label => "y1", :fillalpha => nothing, :orientation => :vertical, :linealpha => nothing, :x_extrema => (NaN, NaN), :arrow => nothing, :series_index => 1…))
5.0
Linear Regression
4-element Vector{String}:
"Random"
"DataFrames"
"CSV"
"GLM"
TaskLocalRNG()
10
1:10
my (generic function with 2 methods)
10-element Vector{Float64}:
8.366831772346464
12.746207447785931
17.49413341845734
20.14132370171251
24.574645018314158
23.964040581229376
29.85090173942833
32.902596318375934
35.35131979172247
35.838560532354634
[8.366831772346464, 12.746207447785931, 17.49413341845734, 20.14132370171251, 24.574645018314158, 23.964040581229376, 29.85090173942833, 32.902596318375934, 35.35131979172247, 35.838560532354634]
"C:\\jr29102024\\tmp.png"
10×2 Matrix{Float64}:
1.0 8.36683
2.0 12.7462
3.0 17.4941
4.0 20.1413
5.0 24.5746
6.0 23.964
7.0 29.8509
8.0 32.9026
9.0 35.3513
10.0 35.8386
10×2 DataFrame
Row │ x y
│ Float64 Float64
─────┼───────────────────
1 │ 1.0 8.36683
2 │ 2.0 12.7462
3 │ 3.0 17.4941
4 │ 4.0 20.1413
5 │ 5.0 24.5746
6 │ 6.0 23.964
7 │ 7.0 29.8509
8 │ 8.0 32.9026
9 │ 9.0 35.3513
10 │ 10.0 35.8386
10×2 DataFrame
Row │ x y
│ Float64 Float64
─────┼───────────────────
1 │ 1.0 8.36683
2 │ 2.0 12.7462
3 │ 3.0 17.4941
4 │ 4.0 20.1413
5 │ 5.0 24.5746
6 │ 6.0 23.964
7 │ 7.0 29.8509
8 │ 8.0 32.9026
9 │ 9.0 35.3513
10 │ 10.0 35.8386
"tmp.csv"
StatsModels.TableRegressionModel{LinearModel{GLM.LmResp{Vector{Float64}}, GLM.DensePredChol{Float64, CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}}}, Matrix{Float64}}
y ~ 1 + x
Coefficients:
───────────────────────────────────────────────────────────────────────
Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95%
───────────────────────────────────────────────────────────────────────
(Intercept) 7.08833 1.06729 6.64 0.0002 4.62715 9.54951
x 3.09722 0.17201 18.01 <1e-07 2.70057 3.49388
───────────────────────────────────────────────────────────────────────
StatsModels.TableRegressionModel{LinearModel{GLM.LmResp{Vector{Float64}}, GLM.DensePredChol{Float64, CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}}}, Matrix{Float64}}
y ~ 1 + x
Coefficients:
───────────────────────────────────────────────────────────────────────
Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95%
───────────────────────────────────────────────────────────────────────
(Intercept) 7.08833 1.06729 6.64 0.0002 4.62715 9.54951
x 3.09722 0.17201 18.01 <1e-07 2.70057 3.49388
───────────────────────────────────────────────────────────────────────
[7.088329718063239, 3.097222966201723]
2×1 DataFrame
Row │ x
│ Float64
─────┼─────────
1 │ 5.5
2 │ 9.3
2-element Vector{Union{Missing, Float64}}:
24.123056032172716
35.89250330373926
Union{Missing, Float64}[24.123056032172716, 35.89250330373926]
2-element Vector{Union{Missing, Float64}}:
24.123056032172716
35.89250330373926
2×2 DataFrame
Row │ x py
│ Float64 Float64?
─────┼───────────────────
1 │ 5.5 24.1231
2 │ 9.3 35.8925
histogram with normal density curve in julia
hwnc (generic function with 1 method)
100
10
100
Normal{Float64}(μ=100.0, σ=10.0)
100-element Vector{Float64}:
111.7802591371556
103.85511601627927
104.04152107206976
98.96424017031497
105.95319156684396
104.55470483254561
92.98082482726603
87.3291108433959
98.92129655504161
107.1833151703558
⋮
108.25303693370215
102.46148788764755
110.76246060033249
89.85041368927503
100.07460362971408
112.08620015351264
92.46866102892267
94.02111638978063
98.50938982305627
100
"C:\\jr29102024\\tmp1.png"
100
bhankas with julia
kbv_hwnc (generic function with 1 method)
-5:1:5
kbv1 (generic function with 1 method)
11-element Vector{Int64}:
-208
-115
-52
-13
8
17
20
23
32
53
92
Plots.GRBackend()
"C:\\jr29102024\\jup1.png"
TaskLocalRNG()
10000
50
10
10000-element Vector{Float64}:
50.6193274031408
52.78405814164
44.04175584635948
50.466593895733816
60.85794021543276
34.23435077414016
51.759399913010746
58.653808054093254
22.09718994450693
31.079844417740873
⋮
52.413115928596625
49.025474847116975
76.3170646324677
59.048108777995076
48.00603105315709
43.491790609401015
48.29383789460438
48.4884742176607
36.51482096334351
Julia variable importance
method -1
UnivariateFeatureSelector(FeatureSelectors.pearson_correlation, 5, nothing)
5-element Vector{String}:
"LStat"
"Rm"
"PTRatio"
"Indus"
"Tax"
5×7 DataFrame
Row │ variable mean min median max nmissing eltype
│ Symbol Union… Any Union… Any Int64 DataType
─────┼────────────────────────────────────────────────────────────────────────────────────────────
1 │ SepalLength 5.84333 4.3 5.8 7.9 0 Float64
2 │ SepalWidth 3.05733 2.0 3.0 4.4 0 Float64
3 │ PetalLength 3.758 1.0 4.35 6.9 0 Float64
4 │ PetalWidth 1.19933 0.1 1.3 2.5 0 Float64
5 │ Species setosa virginica 0 CategoricalValue{String, UInt8}
UnivariateFeatureSelector(FeatureSelectors.pearson_correlation, 4, nothing)
4-element Vector{String}:
"PetalWidth"
"PetalLength"
"SepalLength"
"SepalWidth"
["PetalWidth", "PetalLength", "SepalLength", "SepalWidth"]
method-2
test julia
5.6---60.16
data visualisation with julia
150×5 DataFrame
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
│ Float64 Float64 Float64 Float64 Cat…
─────┼─────────────────────────────────────────────────────────────
1 │ 5.1 3.5 1.4 0.2 setosa
2 │ 4.9 3.0 1.4 0.2 setosa
3 │ 4.7 3.2 1.3 0.2 setosa
4 │ 4.6 3.1 1.5 0.2 setosa
5 │ 5.0 3.6 1.4 0.2 setosa
6 │ 5.4 3.9 1.7 0.4 setosa
7 │ 4.6 3.4 1.4 0.3 setosa
8 │ 5.0 3.4 1.5 0.2 setosa
⋮ │ ⋮ ⋮ ⋮ ⋮ ⋮
144 │ 6.8 3.2 5.9 2.3 virginica
145 │ 6.7 3.3 5.7 2.5 virginica
146 │ 6.7 3.0 5.2 2.3 virginica
147 │ 6.3 2.5 5.0 1.9 virginica
148 │ 6.5 3.0 5.2 2.0 virginica
149 │ 6.2 3.4 5.4 2.3 virginica
150 │ 5.9 3.0 5.1 1.8 virginica
135 rows omitted
Plots.GRBackend()
"C:\\jr29102024\\q1.png"
3×2 DataFrame
Row │ Species Count
│ Cat… Int64
─────┼───────────────────
1 │ setosa 50
2 │ versicolor 50
3 │ virginica 50
3-element Vector{Float64}:
33.333333333333336
33.333333333333336
33.333333333333336
3×3 DataFrame
Row │ Species Count pct
│ Cat… Int64 Float64
─────┼────────────────────────────
1 │ setosa 50 33.3333
2 │ versicolor 50 33.3333
3 │ virginica 50 33.3333
my_round (generic function with 2 methods)
3-element CategoricalArray{String,1,UInt8}:
"setosa"
"versicolor"
"virginica"
3-element Vector{Int64}:
50
50
50
3-element Vector{Float64}:
33.333333333333336
33.333333333333336
33.333333333333336
3-element Vector{Float64}:
33.33
33.33
33.33
3-element Vector{Float64}:
33.333333333333336
33.333333333333336
33.333333333333336
3-element Vector{Float64}:
33.33
33.33
33.33
3-element Vector{Float64}:
0.0
0.0
0.0
3-element Vector{Float64}:
0.0
0.0
0.0
3-element Vector{Float64}:
60.0
180.00000000000003
300.0
3-element Vector{Tuple{Float64, Float64}}:
(0.8660254037844386, 0.5)
(-4.960524086056721e-16, -1.0)
(-0.8660254037844386, 0.5)
zip([33.33, 33.33, 33.33], [(0.8660254037844386, 0.5), (-4.960524086056721e-16, -1.0), (-0.8660254037844386, 0.5)])
lp with julia
A JuMP Model
├ solver: GLPK
├ objective_sense: FEASIBILITY_SENSE
├ num_variables: 0
├ num_constraints: 0
└ Names registered in the model: none
x
y
12 x + 20 y
x + y <= 100
2 x + 3 y <= 120
y <= 30
Max 12 x + 20 y
Subject to
x + y <= 100
2 x + 3 y <= 120
y <= 30
x >= 0
y >= 0
Optimal solution:
objective value is 780.0
x = 15.0
y = 30.0
rndom forest dt mining with julia
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3][1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3][0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
0.9333333333333333
decision tree using julia
########################
difeerent models in mlj
########################
1---ABODDetector---OutlierDetectionNeighbors
2---ABODDetector---OutlierDetectionPython
3---ARDRegressor---MLJScikitLearnInterface
4---AdaBoostClassifier---MLJScikitLearnInterface
5---AdaBoostRegressor---MLJScikitLearnInterface
6---AdaBoostStumpClassifier---DecisionTree
7---AffinityPropagation---MLJScikitLearnInterface
8---AgglomerativeClustering---MLJScikitLearnInterface
9---AutoEncoder---BetaML
10---BM25Transformer---MLJText
11---BaggingClassifier---MLJScikitLearnInterface
12---BaggingRegressor---MLJScikitLearnInterface
13---BayesianLDA---MLJScikitLearnInterface
14---BayesianLDA---MultivariateStats
15---BayesianQDA---MLJScikitLearnInterface
16---BayesianRidgeRegressor---MLJScikitLearnInterface
17---BayesianSubspaceLDA---MultivariateStats
18---BernoulliNBClassifier---MLJScikitLearnInterface
19---Birch---MLJScikitLearnInterface
20---BisectingKMeans---MLJScikitLearnInterface
21---BorderlineSMOTE1---Imbalance
22---CBLOFDetector---OutlierDetectionPython
23---CDDetector---OutlierDetectionPython
24---COFDetector---OutlierDetectionNeighbors
25---COFDetector---OutlierDetectionPython
26---COPODDetector---OutlierDetectionPython
27---CatBoostClassifier---CatBoost
28---CatBoostRegressor---CatBoost
29---ClusterUndersampler---Imbalance
30---ComplementNBClassifier---MLJScikitLearnInterface
31---ConstantClassifier---MLJModels
32---ConstantRegressor---MLJModels
33---ContinuousEncoder---MLJModels
34---CountTransformer---MLJText
35---DBSCAN---Clustering
36---DBSCAN---MLJScikitLearnInterface
37---DNNDetector---OutlierDetectionNeighbors
38---DecisionTreeClassifier---BetaML
39---DecisionTreeClassifier---DecisionTree
40---DecisionTreeRegressor---BetaML
41---DecisionTreeRegressor---DecisionTree
42---DeterministicConstantClassifier---MLJModels
43---DeterministicConstantRegressor---MLJModels
44---DummyClassifier---MLJScikitLearnInterface
45---DummyRegressor---MLJScikitLearnInterface
46---ECODDetector---OutlierDetectionPython
47---ENNUndersampler---Imbalance
48---ElasticNetCVRegressor---MLJScikitLearnInterface
49---ElasticNetRegressor---MLJLinearModels
50---ElasticNetRegressor---MLJScikitLearnInterface
51---EpsilonSVR---LIBSVM
52---EvoLinearRegressor---EvoLinear
53---EvoSplineRegressor---EvoLinear
54---EvoTreeClassifier---EvoTrees
55---EvoTreeCount---EvoTrees
56---EvoTreeGaussian---EvoTrees
57---EvoTreeMLE---EvoTrees
58---EvoTreeRegressor---EvoTrees
59---ExtraTreesClassifier---MLJScikitLearnInterface
60---ExtraTreesRegressor---MLJScikitLearnInterface
61---FactorAnalysis---MultivariateStats
62---FeatureAgglomeration---MLJScikitLearnInterface
63---FeatureSelector---MLJModels
64---FillImputer---MLJModels
65---GMMDetector---OutlierDetectionPython
66---GaussianMixtureClusterer---BetaML
67---GaussianMixtureImputer---BetaML
68---GaussianMixtureRegressor---BetaML
69---GaussianNBClassifier---MLJScikitLearnInterface
70---GaussianNBClassifier---NaiveBayes
71---GaussianProcessClassifier---MLJScikitLearnInterface
72---GaussianProcessRegressor---MLJScikitLearnInterface
73---GeneralImputer---BetaML
74---GradientBoostingClassifier---MLJScikitLearnInterface
75---GradientBoostingRegressor---MLJScikitLearnInterface
76---HBOSDetector---OutlierDetectionPython
77---HDBSCAN---MLJScikitLearnInterface
78---HierarchicalClustering---Clustering
79---HistGradientBoostingClassifier---MLJScikitLearnInterface
80---HistGradientBoostingRegressor---MLJScikitLearnInterface
81---HuberRegressor---MLJLinearModels
82---HuberRegressor---MLJScikitLearnInterface
83---ICA---MultivariateStats
84---IForestDetector---OutlierDetectionPython
85---INNEDetector---OutlierDetectionPython
86---ImageClassifier---MLJFlux
87---InteractionTransformer---MLJModels
88---KDEDetector---OutlierDetectionPython
89---KMeans---Clustering
90---KMeans---MLJScikitLearnInterface
91---KMeans---ParallelKMeans
92---KMeansClusterer---BetaML
93---KMedoids---Clustering
94---KMedoidsClusterer---BetaML
95---KNNClassifier---NearestNeighborModels
96---KNNDetector---OutlierDetectionNeighbors
97---KNNDetector---OutlierDetectionPython
98---KNNRegressor---NearestNeighborModels
99---KNeighborsClassifier---MLJScikitLearnInterface
100---KNeighborsRegressor---MLJScikitLearnInterface
101---KPLSRegressor---PartialLeastSquaresRegressor
102---KernelPCA---MultivariateStats
103---KernelPerceptronClassifier---BetaML
104---LADRegressor---MLJLinearModels
105---LDA---MultivariateStats
106---LGBMClassifier---LightGBM
107---LGBMRegressor---LightGBM
108---LMDDDetector---OutlierDetectionPython
109---LOCIDetector---OutlierDetectionPython
110---LODADetector---OutlierDetectionPython
111---LOFDetector---OutlierDetectionNeighbors
112---LOFDetector---OutlierDetectionPython
113---LarsCVRegressor---MLJScikitLearnInterface
114---LarsRegressor---MLJScikitLearnInterface
115---LassoCVRegressor---MLJScikitLearnInterface
116---LassoLarsCVRegressor---MLJScikitLearnInterface
117---LassoLarsICRegressor---MLJScikitLearnInterface
118---LassoLarsRegressor---MLJScikitLearnInterface
119---LassoRegressor---MLJLinearModels
120---LassoRegressor---MLJScikitLearnInterface
121---LinearBinaryClassifier---GLM
122---LinearCountRegressor---GLM
123---LinearRegressor---GLM
124---LinearRegressor---MLJLinearModels
125---LinearRegressor---MLJScikitLearnInterface
126---LinearRegressor---MultivariateStats
127---LinearSVC---LIBSVM
128---LogisticCVClassifier---MLJScikitLearnInterface
129---LogisticClassifier---MLJLinearModels
130---LogisticClassifier---MLJScikitLearnInterface
131---MCDDetector---OutlierDetectionPython
132---MeanShift---MLJScikitLearnInterface
133---MiniBatchKMeans---MLJScikitLearnInterface
134---MultiTaskElasticNetCVRegressor---MLJScikitLearnInterface
135---MultiTaskElasticNetRegressor---MLJScikitLearnInterface
136---MultiTaskLassoCVRegressor---MLJScikitLearnInterface
137---MultiTaskLassoRegressor---MLJScikitLearnInterface
138---MultinomialClassifier---MLJLinearModels
139---MultinomialNBClassifier---MLJScikitLearnInterface
140---MultinomialNBClassifier---NaiveBayes
141---MultitargetGaussianMixtureRegressor---BetaML
142---MultitargetKNNClassifier---NearestNeighborModels
143---MultitargetKNNRegressor---NearestNeighborModels
144---MultitargetLinearRegressor---MultivariateStats
145---MultitargetNeuralNetworkRegressor---BetaML
146---MultitargetNeuralNetworkRegressor---MLJFlux
147---MultitargetRidgeRegressor---MultivariateStats
148---MultitargetSRRegressor---SymbolicRegression
149---NeuralNetworkClassifier---BetaML
150---NeuralNetworkClassifier---MLJFlux
151---NeuralNetworkRegressor---BetaML
152---NeuralNetworkRegressor---MLJFlux
153---NuSVC---LIBSVM
154---NuSVR---LIBSVM
155---OCSVMDetector---OutlierDetectionPython
156---OPTICS---MLJScikitLearnInterface
157---OneClassSVM---LIBSVM
158---OneHotEncoder---MLJModels
159---OneRuleClassifier---OneRule
160---OrthogonalMatchingPursuitCVRegressor---MLJScikitLearnInterface
161---OrthogonalMatchingPursuitRegressor---MLJScikitLearnInterface
162---PCA---MultivariateStats
163---PCADetector---OutlierDetectionPython
164---PLSRegressor---PartialLeastSquaresRegressor
165---PPCA---MultivariateStats
166---PartLS---PartitionedLS
167---PassiveAggressiveClassifier---MLJScikitLearnInterface
168---PassiveAggressiveRegressor---MLJScikitLearnInterface
169---PegasosClassifier---BetaML
170---PerceptronClassifier---BetaML
171---PerceptronClassifier---MLJScikitLearnInterface
172---ProbabilisticNuSVC---LIBSVM
173---ProbabilisticSGDClassifier---MLJScikitLearnInterface
174---ProbabilisticSVC---LIBSVM
175---QuantileRegressor---MLJLinearModels
176---RANSACRegressor---MLJScikitLearnInterface
177---RODDetector---OutlierDetectionPython
178---ROSE---Imbalance
179---RandomForestClassifier---BetaML
180---RandomForestClassifier---DecisionTree
181---RandomForestClassifier---MLJScikitLearnInterface
182---RandomForestImputer---BetaML
183---RandomForestRegressor---BetaML
184---RandomForestRegressor---DecisionTree
185---RandomForestRegressor---MLJScikitLearnInterface
186---RandomOversampler---Imbalance
187---RandomUndersampler---Imbalance
188---RandomWalkOversampler---Imbalance
189---RidgeCVClassifier---MLJScikitLearnInterface
190---RidgeCVRegressor---MLJScikitLearnInterface
191---RidgeClassifier---MLJScikitLearnInterface
192---RidgeRegressor---MLJLinearModels
193---RidgeRegressor---MLJScikitLearnInterface
194---RidgeRegressor---MultivariateStats
195---RobustRegressor---MLJLinearModels
196---SGDClassifier---MLJScikitLearnInterface
197---SGDRegressor---MLJScikitLearnInterface
198---SMOTE---Imbalance
199---SMOTEN---Imbalance
200---SMOTENC---Imbalance
201---SODDetector---OutlierDetectionPython
202---SOSDetector---OutlierDetectionPython
203---SRRegressor---SymbolicRegression
204---SVC---LIBSVM
205---SVMClassifier---MLJScikitLearnInterface
206---SVMLinearClassifier---MLJScikitLearnInterface
207---SVMLinearRegressor---MLJScikitLearnInterface
208---SVMNuClassifier---MLJScikitLearnInterface
209---SVMNuRegressor---MLJScikitLearnInterface
210---SVMRegressor---MLJScikitLearnInterface
211---SelfOrganizingMap---SelfOrganizingMaps
212---SimpleImputer---BetaML
213---SpectralClustering---MLJScikitLearnInterface
214---StableForestClassifier---SIRUS
215---StableForestRegressor---SIRUS
216---StableRulesClassifier---SIRUS
217---StableRulesRegressor---SIRUS
218---Standardizer---MLJModels
219---SubspaceLDA---MultivariateStats
220---TSVDTransformer---TSVD
221---TfidfTransformer---MLJText
222---TheilSenRegressor---MLJScikitLearnInterface
223---TomekUndersampler---Imbalance
224---UnivariateBoxCoxTransformer---MLJModels
225---UnivariateDiscretizer---MLJModels
226---UnivariateFillImputer---MLJModels
227---UnivariateStandardizer---MLJModels
228---UnivariateTimeTypeToContinuous---MLJModels
229---XGBoostClassifier---XGBoost
230---XGBoostCount---XGBoost
231---XGBoostRegressor---XGBoost
####################################
difeerent classifiers models in mlj
####################################
1---AdaBoostClassifier---MLJScikitLearnInterface
2---AdaBoostStumpClassifier---DecisionTree
3---BaggingClassifier---MLJScikitLearnInterface
4---BayesianLDA---MLJScikitLearnInterface
5---BayesianLDA---MultivariateStats
6---BayesianQDA---MLJScikitLearnInterface
7---BayesianSubspaceLDA---MultivariateStats
8---CatBoostClassifier---CatBoost
9---ConstantClassifier---MLJModels
10---DecisionTreeClassifier---BetaML
11---DecisionTreeClassifier---DecisionTree
12---DeterministicConstantClassifier---MLJModels
13---DummyClassifier---MLJScikitLearnInterface
14---EvoTreeClassifier---EvoTrees
15---ExtraTreesClassifier---MLJScikitLearnInterface
16---GaussianNBClassifier---MLJScikitLearnInterface
17---GaussianNBClassifier---NaiveBayes
18---GaussianProcessClassifier---MLJScikitLearnInterface
19---GradientBoostingClassifier---MLJScikitLearnInterface
20---HistGradientBoostingClassifier---MLJScikitLearnInterface
21---KNNClassifier---NearestNeighborModels
22---KNeighborsClassifier---MLJScikitLearnInterface
23---KernelPerceptronClassifier---BetaML
24---LDA---MultivariateStats
25---LGBMClassifier---LightGBM
26---LinearSVC---LIBSVM
27---LogisticCVClassifier---MLJScikitLearnInterface
28---LogisticClassifier---MLJLinearModels
29---LogisticClassifier---MLJScikitLearnInterface
30---MultinomialClassifier---MLJLinearModels
31---NeuralNetworkClassifier---BetaML
32---NeuralNetworkClassifier---MLJFlux
33---NuSVC---LIBSVM
34---PassiveAggressiveClassifier---MLJScikitLearnInterface
35---PegasosClassifier---BetaML
36---PerceptronClassifier---BetaML
37---PerceptronClassifier---MLJScikitLearnInterface
38---ProbabilisticNuSVC---LIBSVM
39---ProbabilisticSGDClassifier---MLJScikitLearnInterface
40---ProbabilisticSVC---LIBSVM
41---RandomForestClassifier---BetaML
42---RandomForestClassifier---DecisionTree
43---RandomForestClassifier---MLJScikitLearnInterface
44---RidgeCVClassifier---MLJScikitLearnInterface
45---RidgeClassifier---MLJScikitLearnInterface
46---SGDClassifier---MLJScikitLearnInterface
47---SVC---LIBSVM
48---SVMClassifier---MLJScikitLearnInterface
49---SVMLinearClassifier---MLJScikitLearnInterface
50---SVMNuClassifier---MLJScikitLearnInterface
51---StableForestClassifier---SIRUS
52---StableRulesClassifier---SIRUS
53---SubspaceLDA---MultivariateStats
54---XGBoostClassifier---XGBoost
#############################
mlj deecision tree classifier
#############################
start mlj deecision tree classifier
Accuracy: 0.94
ConfusionMatrix{3}([14 0 0; 0 17 2; 0 1 16])
[14 0 0; 0 17 2; 0 1 16]
#################################
starting random forest classifier
#################################
Accuracy: 0.94
ConfusionMatrix{3}([14 0 0; 0 17 2; 0 1 16])
[14 0 0; 0 17 2; 0 1 16]
######################
mlj xgboost classifier
######################
Accuracy: 0.96
ConfusionMatrix{3}([14 0 0; 0 17 1; 0 1 17])
[14 0 0; 0 17 1; 0 1 17]
#######################
mlj adaboost classifier
#######################
Accuracy: 0.9
ConfusionMatrix{3}([14 0 0; 0 17 4; 0 1 14])
[14 0 0; 0 17 4; 0 1 14]
#############################
mlj adaboost stump classifier
#############################
Accuracy: 0.96
ConfusionMatrix{3}([14 0 0; 0 17 1; 0 1 17])
[14 0 0; 0 17 1; 0 1 17]
############################
mlj NuSVC libsvm classifier
############################
Accuracy: 0.96
ConfusionMatrix{3}([14 0 0; 0 18 2; 0 0 16])
[14 0 0; 0 18 2; 0 0 16]
##############################
mlj Neural network classifier
##############################
***
*** Training for 200 epochs with algorithm ADAM.
Training.. avg loss on epoch 1 (1): 1.8944182288019402
Training of 200 epoch completed. Final epoch error: 2.1567533608672576.
Accuracy: 0.28
ConfusionMatrix{3}([14 18 18; 0 0 0; 0 0 0])
[14 18 18; 0 0 0; 0 0 0]
######################################################
mlj random forest classifer from decision tree package
######################################################
machine(RandomForestClassifier(max_depth = -1, …), …)
Accuracy: 0.96
ConfusionMatrix{3}([14 0 0; 0 17 1; 0 1 17])
[14 0 0; 0 17 1; 0 1 17]
###############################
KNeighborsClassifier Classifier
###############################
Accuracy: 0.98
ConfusionMatrix{3}([14 0 0; 0 18 1; 0 0 17])
[14 0 0; 0 18 1; 0 0 17]
################################
using SVC classifier from libsvm
################################
Accuracy: 0.94
ConfusionMatrix{3}([14 0 0; 0 18 3; 0 0 15])
[14 0 0; 0 18 3; 0 0 15]
#########################
using Catboost classifier
#########################
Accuracy: 0.96
ConfusionMatrix{3}([14 0 0; 0 17 1; 0 1 17])
[14 0 0; 0 17 1; 0 1 17]
#######################
using PegasosClassifier
#######################
import BetaML ✔
Accuracy: 0.96
ConfusionMatrix{3}([14 0 0; 0 17 1; 0 1 17])
[14 0 0; 0 17 1; 0 1 17]
data mining with decision tree
Test set accuracy: 0.94
Feature 3 < 2.6 ?
├─ 1 : 33/33
└─ Feature 4 < 1.75 ?
├─ Feature 3 < 5.35 ?
├─ 2 : 31/31
└─ 3 : 2/2
└─ Feature 3 < 4.85 ?
├─ Feature 2 < 3.1 ?
├─ 3 : 2/2
└─ 2 : 1/1
└─ 3 : 31/31
plotting with makie
6×3 DataFrame
Row │ x y1 y2
│ Float64 Float64 Float64
─────┼───────────────────────────────
1 │ -5.0 0.958924 0.283662
2 │ -4.9 0.982453 0.186512
3 │ -4.8 0.996165 0.087499
4 │ -4.7 0.999923 -0.0123887
5 │ -4.6 0.993691 -0.112153
6 │ -4.5 0.97753 -0.210796
symbolics math symbolics
#############################
using Symbolics julia package
#############################
using symbolics
-35 + 3x + 5y = 0
x - y = 0
[4.375, 4.375]
-123 - 7x - 5(x^2) + x^3
Differential(x)(-123 - 7x - 5(x^2) + x^3)
-7 - 10x + 3(x^2)
8x + 4(x^2)
x^6 + 6(x^5)*y + 15(x^4)*(y^2) + 20(x^3)*(y^3) + 15(x^2)*(y^4) + 6x*(y^5) + y^6
symbolics math sympy
#########################
using SymPy julia package
#########################
############################
solving non linear equations
############################
1
CRootOf(x^6 + x^5 + x^4 + x^3 + x^2 + x + 3, 0)
CRootOf(x^6 + x^5 + x^4 + x^3 + x^2 + x + 3, 1)
CRootOf(x^6 + x^5 + x^4 + x^3 + x^2 + x + 3, 2)
CRootOf(x^6 + x^5 + x^4 + x^3 + x^2 + x + 3, 3)
CRootOf(x^6 + x^5 + x^4 + x^3 + x^2 + x + 3, 4)
CRootOf(x^6 + x^5 + x^4 + x^3 + x^2 + x + 3, 5)
1
-1.1280707714543692 - 0.5876060832247132im
-1.1280707714543692 + 0.5876060832247132im
-0.16403887800672787 - 1.21306844998484im
-0.16403887800672787 + 1.21306844998484im
0.7921096494610971 - 0.7810724308829708im
0.7921096494610971 + 0.7810724308829708im
################################
solving derivative of a function
################################
3*x^2 - 7
#################################
solving integration of a function
#################################
x^4/4 - 7*x^2/2
###########################
solving non linear equation
###########################
-3/((-1/2 - sqrt(3)*I/2)*(27*sqrt(35) + 162)^(1/3)) - (-1/2 - sqrt(3)*I/2)*(27*sqrt(35) + 162)^(1/3)/3
-(-1/2 + sqrt(3)*I/2)*(27*sqrt(35) + 162)^(1/3)/3 - 3/((-1/2 + sqrt(3)*I/2)*(27*sqrt(35) + 162)^(1/3))
-(27*sqrt(35) + 162)^(1/3)/3 - 3/(27*sqrt(35) + 162)^(1/3)
1.3609461421185716 + 1.5989131324879002im
1.3609461421185716 - 1.5989131324879002im
-2.721892284237143
##################################
substituting values in a function
##################################
2*y^2 + y + 4
####################
expanding expression
####################
x^5 + 5*x^4*y + 10*x^3*y^2 + 10*x^2*y^3 + 5*x*y^4 + y^5
x^4 + 6*x^3 + 11*x^2 + 6*x
#######################
solving three variables
#######################
2
2
trial & error calculations
#####################
iterative calculation
#####################
f1 = 0
1 0.0 -1.0e7 1.0e7 -145.0
2 5.0e6 0.0 1.0e7 1.2499992499997e20
3 2.5e6 0.0 5.0e6 1.5624981249985e19
4 1.25e6 0.0 2.5e6 1.9531203124924997e18
5 625000.0 0.0 1.25e6 2.4413945312124982e17
6 312500.0 0.0 625000.0 3.0517285154374856e16
7 156250.0 0.0 312500.0 3.814624022499855e15
8 78125.0 0.0 156250.0 4.76818847187355e14
9 39062.5 0.0 78125.0 5.9600066904151875e13
10 19531.25 0.0 39062.5 7.449436070411641e12
11 9765.625 0.0 19531.25 9.310364135818066e11
12 4882.8125 0.0 9765.625 1.1634376681132935e11
13 2441.40625 0.0 4882.8125 1.4534019041496735e10
14 1220.703125 0.0 2441.40625 1.8145115859689522e9
15 610.3515625 0.0 1220.703125 2.262522812443185e8
16 305.17578125 0.0 610.3515625 2.8140336603331864e7
17 152.587890625 0.0 305.17578125 3.48180395836059e6
18 76.2939453125 0.0 152.587890625 426024.1479041474
19 38.14697265625 0.0 76.2939453125 50771.69482681027
20 19.073486328125 0.0 38.14697265625 5588.0593438109645
21 9.5367431640625 0.0 19.073486328125 392.2928684721501
22 4.76837158203125 0.0 9.5367431640625 -133.40211487660667
23 7.152557373046875 4.76837158203125 9.5367431640625 24.525658051394885
24 5.9604644775390625 4.76837158203125 7.152557373046875 -75.58596041567432
25 6.556510925292969 5.9604644775390625 7.152557373046875 -31.452358893347537
26 6.854534149169922 6.556510925292969 7.152557373046875 -5.023311687583373
27 7.003545761108398 6.854534149169922 7.152557373046875 9.351256697903352
28 6.92903995513916 6.854534149169922 7.003545761108398 2.065234155078201
29 6.891787052154541 6.854534149169922 6.92903995513916 -1.5035682574081761
30 6.910413503646851 6.891787052154541 6.92903995513916 0.2746811890004892
31 6.901100277900696 6.891787052154541 6.910413503646851 -0.6159790507817888
32 6.905756890773773 6.901100277900696 6.910413503646851 -0.17103311295772983
33 6.908085197210312 6.905756890773773 6.910413503646851 0.05172795463928992
34 6.9069210439920425 6.905756890773773 6.908085197210312 -0.059676595271554334
35 6.907503120601177 6.9069210439920425 6.908085197210312 -0.003980324935838553
36 6.9077941589057446 6.907503120601177 6.908085197210312 0.02387231362286002
37 6.907648639753461 6.907503120601177 6.9077941589057446 0.009945619045481635
38 6.907575880177319 6.907503120601177 6.907648639753461 0.002982553231476004
39 6.907539500389248 6.907503120601177 6.907575880177319 -0.0004989093078791029
40 6.907557690283284 6.907539500389248 6.907575880177319 0.0012418160978882042
41 6.907548595336266 6.907539500389248 6.907557690283284 0.00037145192897014567
42 6.907544047862757 6.907539500389248 6.907548595336266 -6.372905590978917e-5
43 6.907546321599511 6.907544047862757 6.907548595336266 0.00015386134492700876
44 6.907545184731134 6.907544047862757 6.907546321599511 4.5066121600711995e-5
45 6.907544616296946 6.907544047862757 6.907545184731134 -9.331472881513037e-6
46 6.90754490051404 6.907544616296946 6.907545184731134 1.7867322924303153e-5
47 6.907544758405493 6.907544616296946 6.90754490051404 4.2679246519128355e-6
48 6.907544687351219 6.907544616296946 6.907544758405493 -2.531774185854374e-6
49 6.907544722878356 6.907544687351219 6.907544758405493 8.680752330292307e-7
50 6.907544705114788 6.907544687351219 6.907544722878356 -8.318495190451358e-7
51 6.907544713996572 6.907544705114788 6.907544722878356 1.811281435948331e-8
52 6.90754470955568 6.907544705114788 6.907544713996572 -4.068683097102621e-7
53 6.907544711776126 6.90754470955568 6.907544713996572 -1.9437777609709883e-7
54 6.907544712886349 6.907544711776126 6.907544713996572 -8.813245244709833e-8
55 6.90754471344146 6.907544712886349 6.907544713996572 -3.5009804832952796e-8
56 6.907544713719016 6.90754471344146 6.907544713996572 -8.448466815025313e-9
57 6.907544713857794 6.907544713719016 6.907544713996572 4.832173772228998e-9
58 6.907544713788405 6.907544713719016 6.907544713857794 -1.8081323105434421e-9
59 6.9075447138231 6.907544713788405 6.907544713857794 1.5120633634069236e-9
60 6.907544713805752 6.907544713788405 6.9075447138231 -1.4807710613240488e-10
61 6.907544713814426 6.907544713805752 6.9075447138231 6.819789177825442e-10
62 6.907544713810089 6.907544713805752 6.907544713814426 2.6696511667978484e-10
63 6.907544713807921 6.907544713805752 6.907544713810089 5.951505954726599e-11
converged to 6.907544713807921 after 63 iteration
makie plot
nothing to add
more with dataframe
["year,language", "1951,Regional Assembly Language", "1952,Autocode", "1954,IPL", "1955,FLOW-MATIC", "1957,FORTRAN", "1957,COMTRAN", "1958,LISP", "1958,ALGOL 58", "1959,FACT", "1959,COBOL", "1959,RPG", "1962,APL", "1962,Simula", "1962,SNOBOL", "1963,CPL", "1964,Speakeasy", "1964,BASIC", "1964,PL/I", "1966,JOSS", "1967,BCPL", "1968,Logo", "1969,B", "1970,Pascal", "1970,Forth", "1972,C", "1972,Smalltalk", "1972,Prolog", "1973,ML", "1975,Scheme", "1978,SQL ", "1980,C++ ", "1983,Ada", "1984,Common Lisp", "1984,MATLAB", "1984,dBase III", "1985,Eiffel", "1986,Objective-C", "1986,LabVIEW ", "1986,Erlang", "1987,Perl", "1988,Tcl", "1988,Wolfram Language ", "1989,FL ", "1990,Haskell", "1991,Python", "1991,Visual Basic", "1993,Lua", "1993,R", "1994,CLOS ", "1995,Ruby", "1995,Ada 95", "1995,Java", "1995,Delphi ", "1995,JavaScript", "1995,PHP", "1997,Rebol", "2000,ActionScript", "2001,C#", "2001,D", "2002,Scratch", "2003,Groovy", "2003,Scala", "2005,F#", "2006,PowerShell", "2007,Clojure", "2009,Go", "2010,Rust", "2011,Dart", "2011,Kotlin", "2011,Red", "2011,Elixir", "2012,Julia", "2014,Swift"]
73×2 DataFrame
Row │ year language
│ Int64 String31
─────┼───────────────────────────────────
1 │ 1951 Regional Assembly Language
2 │ 1952 Autocode
3 │ 1954 IPL
4 │ 1955 FLOW-MATIC
5 │ 1957 FORTRAN
6 │ 1957 COMTRAN
7 │ 1958 LISP
8 │ 1958 ALGOL 58
9 │ 1959 FACT
10 │ 1959 COBOL
11 │ 1959 RPG
12 │ 1962 APL
13 │ 1962 Simula
14 │ 1962 SNOBOL
15 │ 1963 CPL
16 │ 1964 Speakeasy
17 │ 1964 BASIC
18 │ 1964 PL/I
19 │ 1966 JOSS
20 │ 1967 BCPL
21 │ 1968 Logo
22 │ 1969 B
23 │ 1970 Pascal
24 │ 1970 Forth
25 │ 1972 C
26 │ 1972 Smalltalk
27 │ 1972 Prolog
28 │ 1973 ML
29 │ 1975 Scheme
30 │ 1978 SQL
31 │ 1980 C++
32 │ 1983 Ada
33 │ 1984 Common Lisp
34 │ 1984 MATLAB
35 │ 1984 dBase III
36 │ 1985 Eiffel
37 │ 1986 Objective-C
38 │ 1986 LabVIEW
39 │ 1986 Erlang
40 │ 1987 Perl
41 │ 1988 Tcl
42 │ 1988 Wolfram Language
43 │ 1989 FL
44 │ 1990 Haskell
45 │ 1991 Python
46 │ 1991 Visual Basic
47 │ 1993 Lua
48 │ 1993 R
49 │ 1994 CLOS
50 │ 1995 Ruby
51 │ 1995 Ada 95
52 │ 1995 Java
53 │ 1995 Delphi
54 │ 1995 JavaScript
55 │ 1995 PHP
56 │ 1997 Rebol
57 │ 2000 ActionScript
58 │ 2001 C#
59 │ 2001 D
60 │ 2002 Scratch
61 │ 2003 Groovy
62 │ 2003 Scala
63 │ 2005 F#
64 │ 2006 PowerShell
65 │ 2007 Clojure
66 │ 2009 Go
67 │ 2010 Rust
68 │ 2011 Dart
69 │ 2011 Kotlin
70 │ 2011 Red
71 │ 2011 Elixir
72 │ 2012 Julia
73 │ 2014 Swift
(73, 2)
2×7 DataFrame
Row │ variable mean min median max nmissing eltype
│ Symbol Union… Any Union… Any Int64 DataType
─────┼────────────────────────────────────────────────────────────────────
1 │ year 1982.99 1951 1986.0 2014 0 Int64
2 │ language ALGOL 58 dBase III 0 String31
4×2 DataFrame
Row │ year language
│ Int64 String31
─────┼─────────────────
1 │ 2011 Dart
2 │ 2011 Kotlin
3 │ 2011 Red
4 │ 2011 Elixir
2×2 DataFrame
Row │ year language
│ Int64 String31
─────┼─────────────────
1 │ 1993 R
2 │ 2011 Red
73×2 DataFrame
Row │ language cnt
│ String31 Int64
─────┼───────────────────────────────────
1 │ Regional Assembly Language 1
2 │ Autocode 1
3 │ IPL 1
4 │ FLOW-MATIC 1
5 │ FORTRAN 1
6 │ COMTRAN 1
7 │ LISP 1
8 │ ALGOL 58 1
9 │ FACT 1
10 │ COBOL 1
11 │ RPG 1
12 │ APL 1
13 │ Simula 1
14 │ SNOBOL 1
15 │ CPL 1
16 │ Speakeasy 1
17 │ BASIC 1
18 │ PL/I 1
19 │ JOSS 1
20 │ BCPL 1
21 │ Logo 1
22 │ B 1
23 │ Pascal 1
24 │ Forth 1
25 │ C 1
26 │ Smalltalk 1
27 │ Prolog 1
28 │ ML 1
29 │ Scheme 1
30 │ SQL 1
31 │ C++ 1
32 │ Ada 1
33 │ Common Lisp 1
34 │ MATLAB 1
35 │ dBase III 1
36 │ Eiffel 1
37 │ Objective-C 1
38 │ LabVIEW 1
39 │ Erlang 1
40 │ Perl 1
41 │ Tcl 1
42 │ Wolfram Language 1
43 │ FL 1
44 │ Haskell 1
45 │ Python 1
46 │ Visual Basic 1
47 │ Lua 1
48 │ R 1
49 │ CLOS 1
50 │ Ruby 1
51 │ Ada 95 1
52 │ Java 1
53 │ Delphi 1
54 │ JavaScript 1
55 │ PHP 1
56 │ Rebol 1
57 │ ActionScript 1
58 │ C# 1
59 │ D 1
60 │ Scratch 1
61 │ Groovy 1
62 │ Scala 1
63 │ F# 1
64 │ PowerShell 1
65 │ Clojure 1
66 │ Go 1
67 │ Rust 1
68 │ Dart 1
69 │ Kotlin 1
70 │ Red 1
71 │ Elixir 1
72 │ Julia 1
73 │ Swift 1
45×2 DataFrame
Row │ year cnt
│ Int64 Int64
─────┼──────────────
1 │ 1951 1
2 │ 1952 1
3 │ 1954 1
4 │ 1955 1
5 │ 1957 2
6 │ 1958 2
7 │ 1959 3
8 │ 1962 3
9 │ 1963 1
10 │ 1964 3
11 │ 1966 1
12 │ 1967 1
13 │ 1968 1
14 │ 1969 1
15 │ 1970 2
16 │ 1972 3
17 │ 1973 1
18 │ 1975 1
19 │ 1978 1
20 │ 1980 1
21 │ 1983 1
22 │ 1984 3
23 │ 1985 1
24 │ 1986 3
25 │ 1987 1
26 │ 1988 2
27 │ 1989 1
28 │ 1990 1
29 │ 1991 2
30 │ 1993 2
31 │ 1994 1
32 │ 1995 6
33 │ 1997 1
34 │ 2000 1
35 │ 2001 2
36 │ 2002 1
37 │ 2003 2
38 │ 2005 1
39 │ 2006 1
40 │ 2007 1
41 │ 2009 1
42 │ 2010 1
43 │ 2011 4
44 │ 2012 1
45 │ 2014 1
16×2 DataFrame
Row │ year cnt
│ Int64 Int64
─────┼──────────────
1 │ 1957 2
2 │ 1958 2
3 │ 1959 3
4 │ 1962 3
5 │ 1964 3
6 │ 1970 2
7 │ 1972 3
8 │ 1984 3
9 │ 1986 3
10 │ 1988 2
11 │ 1991 2
12 │ 1993 2
13 │ 1995 6
14 │ 2001 2
15 │ 2003 2
16 │ 2011 4
ggplot graphs from julia
transferring dataframe to R
forecasting
scikit learn
nothing to add
########################################
using logistic regression of scikitlearn
########################################
accuracy: 0.94
[0.9090909090909091, 0.9090909090909091, 0.9, 0.8888888888888888, 1.0]
0.9214141414141415 0.044709950748680026
####################################
using Random forest from scikitlearn
####################################
[0.9090909090909091, 0.8181818181818182, 0.9, 0.8888888888888888, 1.0]
0.9032323232323233 0.06490007073737401
#############################
using gradient boosting model
#############################
[0.9090909090909091, 0.8181818181818182, 0.9, 0.8888888888888888, 1.0]
0.9032323232323233 0.06490007073737401
#########################
using decision tree model
#########################
[0.9090909090909091, 0.8181818181818182, 0.9, 0.8888888888888888, 1.0]
0.9032323232323233 0.06490007073737401
##
hi
##
data science with Python
sample
5.0 12.0 13.0
import csv file using panda
sepal_length sepal_width petal_length petal_width species
0 5.1 3.5 1.4 0.2 setosa
1 4.9 3.0 1.4 0.2 NaN
2 4.7 3.2 1.3 0.2 setosa
3 NaN 3.1 1.5 0.2 setosa
4 5.0 3.6 NaN 0.2 NaN
.. ... ... ... ... ...
145 6.7 3.0 5.2 2.3 virginica
146 6.3 NaN 5.0 1.9 virginica
147 6.5 NaN 5.2 2.0 virginica
148 6.2 3.4 5.4 2.3 virginica
149 5.9 3.0 5.1 1.8 virginica
[150 rows x 5 columns]
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 150 entries, 0 to 149
Data columns (total 5 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 sepal_length 138 non-null float64
1 sepal_width 134 non-null float64
2 petal_length 138 non-null float64
3 petal_width 134 non-null float64
4 species 131 non-null object
dtypes: float64(4), object(1)
memory usage: 6.0+ KB
sepal_length sepal_width petal_length petal_width
count 138.000000 134.000000 138.000000 134.000000
mean 5.786957 3.058955 3.821739 1.182090
std 0.789329 0.423770 1.776519 0.760871
min 4.300000 2.000000 1.000000 0.100000
25% 5.100000 2.800000 1.600000 0.300000
50% 5.700000 3.000000 4.400000 1.300000
75% 6.400000 3.300000 5.100000 1.800000
max 7.900000 4.400000 6.900000 2.500000
150
5
array(['sepal_length', 'sepal_width', 'petal_length', 'petal_width',
'species'], dtype=object)
how to remove missing values in python using pandas
sepal_length 12
sepal_width 16
petal_length 12
petal_width 16
species 19
dtype: int64
sepal_length sepal_width petal_length petal_width species
0 5.1 3.5 1.4 0.2 setosa
1 4.9 3.0 1.4 0.2 setosa
2 4.7 3.2 1.3 0.2 setosa
3 4.7 3.1 1.5 0.2 setosa
4 5.0 3.6 1.5 0.2 setosa
.. ... ... ... ... ...
145 6.7 3.0 5.2 2.3 virginica
146 6.3 3.0 5.0 1.9 virginica
147 6.5 3.0 5.2 2.0 virginica
148 6.2 3.4 5.4 2.3 virginica
149 5.9 3.0 5.1 1.8 virginica
[150 rows x 5 columns]
sepal_length 0
sepal_width 0
petal_length 0
petal_width 0
species 0
dtype: int64