This repository provides code examples of various machine learning algorithms implemented in Python and R. The examples cover a range of tasks such as classification, regression, hypothesis testing, and more. Whether you are an R or Python programmer, this collection offers practical implementations for both languages.
One thrilling example is the Shapley Metric!
Nonparametric statistics is a branch of statistics that does not make strong assumptions about the underlying probability distribution or parameters of the population from which the data is sampled. It is often used when the data does not meet the assumptions of parametric statistics or when the research question does not require specific distributional assumptions. Here are some examples of nonparametric statistical tests and techniques:
The repository includes examples for the following algorithms:
-
Mann-Whitney U test:
- Python:
mann_whitney_u_test.py
- R:
mann_whitney_u_test.R
- Python:
-
Kruskal-Wallis test:
- Python:
kruskal_wallis_test.py
- R:
kruskal_wallis_test.R
- Python:
-
Spearman's rank correlation:
- Python:
spearman_rank_correlation.py
- R:
spearman_rank_correlation.R
- Python:
-
Kendall's rank correlation:
- Python:
kendall_rank_correlation.py
- R:
kendall_rank_correlation.R
- Python:
-
Wilcoxon signed-rank test:
- Python:
wilcoxon_signed_rank_test.py
- R:
wilcoxon_signed_rank_test.R
- Python:
-
Friedman test:
- Python:
friedman_test.py
- R:
friedman_test.R
- Python:
-
Chi-squared test:
- Python:
chi_squared_test.py
- R:
chi_squared_test.R
- Python:
-
Bootstrapping:
- Python:
bootstrapping.py
- R:
bootstrapping.R
- Python:
9a. XGBoost (Classification):
- Python:
xgboost_classification.py
- R:
xgboost_classification.R
9b. XGBoost with Shapley (Classification):
- Python:
xgboost_shapley.py
- R:
xgboost_shapley.R
(PENDING)
The code examples provide a practical implementation of each algorithm using sample datasets or simulated data. You can explore each file for detailed code and instructions on running the algorithms.
- Clone the repository to your local machine:
git clone https://github.com/greydoubt/nonparametic_statistics.git
-
Navigate to the desired algorithm folder (e.g.,
kruskal_wallis_test.py
for the Kruskal-Wallis test in Python orkruskal_wallis_test.R
for R). -
Open and run the file using your preferred development environment or command line.
-
Modify the code and datasets as needed to fit your specific use case. Each example file contains comments to guide you through the necessary modifications.
Contributions to this repository are highly appreciated. If you have improvements, bug fixes, or additional examples for other machine learning algorithms, please submit a pull request.
This repository is licensed under the MIT License.
Feel free to explore and utilize the code examples for your machine learning projects in either Python or R. Happy learning and coding!