Skip to content

Commit

Permalink
Eddie Bergman: Merge pull request #1379 from automl/v0.14.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions committed Jan 25, 2022
1 parent 1828f2c commit e2d270e
Show file tree
Hide file tree
Showing 145 changed files with 8,904 additions and 6,709 deletions.
2 changes: 1 addition & 1 deletion master/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 13a06760a87ac8d7b659b4aa6efbd203
config: ba5b8e6ad6e1c8d0fcc11a6163f03902
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
"import sklearn.datasets\nimport sklearn.metrics\n\nimport autosklearn.classification"
"from pprint import pprint\n\nimport sklearn.datasets\nimport sklearn.metrics\n\nimport autosklearn.classification"
]
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
},
"outputs": [],
"source": [
"print(automl.show_models())"
"pprint(automl.show_models(), indent=4)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
sequentially. The example below shows how to first fit the models and build the
ensembles afterwards.
"""
from pprint import pprint

import sklearn.model_selection
import sklearn.datasets
Expand Down Expand Up @@ -48,7 +49,7 @@
# Print the final ensemble constructed by auto-sklearn
# ====================================================

print(automl.show_models())
pprint(automl.show_models(), indent=4)

############################################################################
# Get the Score of the final ensemble
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
The following example demonstrates how to create a new regression
component for using in auto-sklearn.
"""
from pprint import pprint

from ConfigSpace.configuration_space import ConfigurationSpace
from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \
Expand Down Expand Up @@ -137,4 +138,4 @@ def get_hyperparameter_search_space(dataset_properties=None):
# =====================================
y_pred = reg.predict(X_test)
print("r2 score: ", sklearn.metrics.r2_score(y_pred, y_test))
print(reg.show_models())
pprint(reg.show_models(), indent=4)
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
"import numpy as np\n\nimport sklearn.datasets\nimport sklearn.metrics\nfrom sklearn.utils.multiclass import type_of_target\n\nimport autosklearn.classification"
"import numpy as np\nfrom pprint import pprint\n\nimport sklearn.datasets\nimport sklearn.metrics\nfrom sklearn.utils.multiclass import type_of_target\n\nimport autosklearn.classification"
]
},
{
Expand All @@ -44,7 +44,7 @@
},
"outputs": [],
"source": [
"# Using reuters multilabel dataset -- https://www.openml.org/d/40594\nX, y = sklearn.datasets.fetch_openml(data_id=40594, return_X_y=True, as_frame=False)\n\n# fetch openml downloads a numpy array with TRUE/FALSE strings. Re-map it to\n# integer dtype with ones and zeros\n# This is to comply with Scikit-learn requirement:\n# \"Positive classes are indicated with 1 and negative classes with 0 or -1.\"\n# More information on: https://scikit-learn.org/stable/modules/multiclass.html\ny[y == 'TRUE'] = 1\ny[y == 'FALSE'] = 0\ny = y.astype(np.int)\n\n# Using type of target is a good way to make sure your data\n# is properly formatted\nprint(f\"type_of_target={type_of_target(y)}\")\n\nX_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(\n X, y, random_state=1\n)"
"# Using reuters multilabel dataset -- https://www.openml.org/d/40594\nX, y = sklearn.datasets.fetch_openml(data_id=40594, return_X_y=True, as_frame=False)\n\n# fetch openml downloads a numpy array with TRUE/FALSE strings. Re-map it to\n# integer dtype with ones and zeros\n# This is to comply with Scikit-learn requirement:\n# \"Positive classes are indicated with 1 and negative classes with 0 or -1.\"\n# More information on: https://scikit-learn.org/stable/modules/multiclass.html\ny[y == 'TRUE'] = 1\ny[y == 'FALSE'] = 0\ny = y.astype(int)\n\n# Using type of target is a good way to make sure your data\n# is properly formatted\nprint(f\"type_of_target={type_of_target(y)}\")\n\nX_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(\n X, y, random_state=1\n)"
]
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
},
"outputs": [],
"source": [
"print(automl.show_models())"
"pprint(automl.show_models(), indent=4)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
"import sklearn.model_selection\nimport sklearn.datasets\nimport sklearn.metrics\n\nimport autosklearn.classification"
"from pprint import pprint\n\nimport sklearn.model_selection\nimport sklearn.datasets\nimport sklearn.metrics\n\nimport autosklearn.classification"
]
},
{
Expand Down Expand Up @@ -80,7 +80,7 @@
},
"outputs": [],
"source": [
"print(automl.show_models())"
"pprint(automl.show_models(), indent=4)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
The following example shows how to inspect the models which *auto-sklearn*
optimizes over and how to restrict them to an interpretable subset.
"""
from pprint import pprint

import autosklearn.classification
import sklearn.datasets
import sklearn.metrics
Expand Down Expand Up @@ -70,7 +72,7 @@
# Print the final ensemble constructed by auto-sklearn
# ====================================================

print(automl.show_models())
pprint(automl.show_models(), indent=4)

###########################################################################
# Get the Score of the final ensemble
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
The following example shows how to fit a simple regression model with
*auto-sklearn*.
"""
from pprint import pprint

import sklearn.datasets
import sklearn.metrics

Expand Down Expand Up @@ -43,7 +45,7 @@
# Print the final ensemble constructed by auto-sklearn
# ====================================================

print(automl.show_models())
pprint(automl.show_models(), indent=4)

#####################################
# Get the Score of the final ensemble
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*auto-sklearn*.
"""
import numpy as numpy
from pprint import pprint

from sklearn.datasets import make_regression
from sklearn.metrics import r2_score
Expand Down Expand Up @@ -46,7 +47,7 @@
# Print the final ensemble constructed by auto-sklearn
# ====================================================

print(automl.show_models())
pprint(automl.show_models(), indent=4)

###########################################################################
# Get the Score of the final ensemble
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
The following example demonstrates how to create a new classification
component for using in auto-sklearn.
"""
from pprint import pprint

from ConfigSpace.configuration_space import ConfigurationSpace
from ConfigSpace.hyperparameters import CategoricalHyperparameter, \
Expand Down Expand Up @@ -149,4 +150,4 @@ def get_hyperparameter_search_space(dataset_properties=None):

y_pred = clf.predict(X_test)
print("accuracy: ", sklearn.metrics.accuracy_score(y_pred, y_test))
print(clf.show_models())
pprint(clf.show_models(), indent=4)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
To get the BOHB algorithm, simply import Hyperband and use it as the intensification strategy.
""" # noqa (links are too long)

from pprint import pprint

import sklearn.model_selection
import sklearn.datasets
Expand Down Expand Up @@ -110,7 +110,7 @@ def get_smac_object(
)
automl.fit(X_train, y_train, dataset_name='breast_cancer')

print(automl.show_models())
pprint(automl.show_models(), indent=4)
predictions = automl.predict(X_test)
# Print statistics about the auto-sklearn run such as number of
# iterations, number of models failed with a time out.
Expand Down Expand Up @@ -143,7 +143,7 @@ def get_smac_object(
automl.fit(X_train, y_train, dataset_name='breast_cancer')

# Print the final ensemble constructed by auto-sklearn.
print(automl.show_models())
pprint(automl.show_models(), indent=4)
automl.refit(X_train, y_train)
predictions = automl.predict(X_test)
# Print statistics about the auto-sklearn run such as number of
Expand Down Expand Up @@ -177,7 +177,7 @@ def get_smac_object(
automl.fit(X_train, y_train, dataset_name='breast_cancer')

# Print the final ensemble constructed by auto-sklearn.
print(automl.show_models())
pprint(automl.show_models(), indent=4)
automl.refit(X_train, y_train)
predictions = automl.predict(X_test)
# Print statistics about the auto-sklearn run such as number of
Expand Down Expand Up @@ -208,7 +208,7 @@ def get_smac_object(
automl.fit(X_train, y_train, dataset_name='breast_cancer')

# Print the final ensemble constructed by auto-sklearn.
print(automl.show_models())
pprint(automl.show_models(), indent=4)
predictions = automl.predict(X_test)
# Print statistics about the auto-sklearn run such as number of
# iterations, number of models failed with a time out.
Expand Down Expand Up @@ -245,7 +245,7 @@ def get_smac_object(
automl.fit(X_train, y_train, dataset_name='breast_cancer')

# Print the final ensemble constructed by auto-sklearn.
print(automl.show_models())
pprint(automl.show_models(), indent=4)
predictions = automl.predict(X_test)
# Print statistics about the auto-sklearn run such as number of
# iterations, number of models failed with a time out.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
"import autosklearn.classification\nimport sklearn.datasets\nimport sklearn.metrics"
"from pprint import pprint\n\nimport autosklearn.classification\nimport sklearn.datasets\nimport sklearn.metrics"
]
},
{
Expand Down Expand Up @@ -116,7 +116,7 @@
},
"outputs": [],
"source": [
"print(automl.show_models())"
"pprint(automl.show_models(), indent=4)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
The following example demonstrates how to turn off data preprocessing step in auto-skearn.
"""
from pprint import pprint

import autosklearn.classification
import autosklearn.pipeline.components.data_preprocessing
Expand Down Expand Up @@ -89,4 +90,4 @@ def get_hyperparameter_search_space(dataset_properties=None):

y_pred = clf.predict(X_test)
print("accuracy: ", sklearn.metrics.accuracy_score(y_pred, y_test))
print(clf.show_models())
pprint(clf.show_models(), indent=4)
Loading

0 comments on commit e2d270e

Please sign in to comment.