Add mdlp version to Makefile

Refactor sample.py
This commit is contained in:
2023-04-25 17:11:40 +02:00
parent 17a66858f8
commit 3a100bbba7
2 changed files with 14 additions and 4 deletions

View File

@@ -40,6 +40,7 @@ audit: ## Audit pip
version:
@echo "Current Python version .: $(shell python --version)"
@echo "Current FImdlp version .: $(shell python -c "from fimdlp import _version; print(_version.__version__)")"
@echo "Current mdlp version ...: $(shell python -c "from fimdlp.cppfimdlp import CFImdlp; print(CFImdlp().get_version().decode())")"
@echo "Installed FImdlp version: $(shell pip show fimdlp | grep Version | cut -d' ' -f2)"
help: ## Show help message

View File

@@ -1,7 +1,6 @@
import time
import argparse
import os
from scipy.io import arff
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from fimdlp.mdlp import FImdlp
@@ -18,11 +17,21 @@ datasets = {
ap = argparse.ArgumentParser()
ap.add_argument(
"--min_length", type=int, default=3, help="Minimum length of interval"
"-n",
"--min_length",
type=int,
default=3,
help="Minimum length of interval",
)
ap.add_argument("--max_depth", type=int, default=9999, help="Maximum depth")
ap.add_argument(
"--max_cuts", type=float, default=0, help="Maximum number of cut points"
"-m", "--max_depth", type=int, default=9999, help="Maximum depth"
)
ap.add_argument(
"-c",
"--max_cuts",
type=float,
default=0,
help="Maximum number of cut points",
)
ap.add_argument("dataset", type=str, choices=datasets.keys())
args = ap.parse_args()