mirror of
https://github.com/Doctorado-ML/FImdlp.git
synced 2025-08-16 07:55:52 +00:00
Add mdlp version to Makefile
Refactor sample.py
This commit is contained in:
1
Makefile
1
Makefile
@@ -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
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user