Machine Learning PCA K-Fold Framework
- Create venv with
python3 -m venv v-env - Active your environment
source v-env/bin/active - install all dependencies
pip3 install -r requirements.txt - Set the mandatory parameters for the choosen algorithm parameters in the run.py
python3 run.py
- n_split: K of K-fold
- n_components: PCA number of components
- test_size: percentage of data used in the test part (0<test_size<1)
- start_date: date in in string format to add in dataset
- data_path: dataset path
- columns: columns of dataset (must have a y column)
- epochs: number of epochs
algo_conf = {
'name': 'NN',
'n_layers': 3,
'input_dim': 2,
'n_neurons': [5, 8, 1],
'list_act_func': ['tanh', 'tanh', 'sigmoid'],
'loss': 'mean_squared_error',
'optimizer': 'sgd',
'metric': 'accuracy'
}
algo_conf = {
'name': 'naive_bayes_bcls',
'priors': None,
'var_smoothing': 0.1,
'metric': 'accuracy'
}
algo_conf = {
'name': 'logistic_regression_bcls',
'solver': 'liblinear',
'metric': 'accuracy'
}
algo_conf = {
'name': 'svm',
'metric': 'accuracy'
}
algo_conf = {
'name': 'decision_tree',
'metric': 'accuracy'
}
algo_conf = {
'name': 'random_forest',
'metric': 'accuracy'
}
algo_conf = {
'objective': 'binary:logistic',
'name': 'xgboost',
'metric': 'accuracy'
}
algo_conf = {
'name': 'lightgbm',
'metric': 'accuracy'
}
It's just a sample dataset, you can adapt your own dataset.
- Bitcoin: 2013-08-19 to 2016-07-19
- Data market price from charts.bitcoin