mirror of
https://github.com/Doctorado-ML/STree.git
synced 2025-08-17 08:26:00 +00:00
rename get_dataset to load_dataset add features and impurity to __str__ of node
18 lines
405 B
Python
18 lines
405 B
Python
from sklearn.datasets import make_classification
|
|
|
|
|
|
def load_dataset(random_state=0, n_classes=2):
|
|
X, y = make_classification(
|
|
n_samples=1500,
|
|
n_features=3,
|
|
n_informative=3,
|
|
n_redundant=0,
|
|
n_repeated=0,
|
|
n_classes=n_classes,
|
|
n_clusters_per_class=2,
|
|
class_sep=1.5,
|
|
flip_y=0,
|
|
random_state=random_state,
|
|
)
|
|
return X, y
|