This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function survival_probability(options) { | |
var group_size = 1; | |
if(options.hasOwnProperty("custom_beta")) { | |
var betas = [options.custom_beta] | |
} else { | |
var betas = [100, 50, 25]; | |
} | |
x_values = [-1, -0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75, 1]; | |
plot_data = []; | |
betas.forEach(function(beta) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Training the AutoML algorithm | |
pipeline_optimizer.fit(X_train, y_train) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loading a dataset for training | |
data = datasets.load_breast_cancer() | |
# Splitting our data into train and test sets | |
X_train, X_test, y_train, y_test = train_test_split(data["data"], | |
data["target"], | |
test_size=0.2, | |
stratify=data["target"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initializing our TPOT pipeline optimizer | |
pipeline_optimizer = TPOTClassifier(generations=5, verbosity=2, config_dict="TPOT light") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing necessary tools and libraries | |
import tpot | |
from tpot import TPOTClassifier | |
import pandas as pd | |
from sklearn import datasets | |
from sklearn.model_selection import train_test_split |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
classifier_config_dict = { | |
# Classifiers | |
'sklearn.naive_bayes.GaussianNB': { | |
}, | |
'sklearn.naive_bayes.BernoulliNB': { | |
'alpha': [1e-3, 1e-2, 1e-1, 1., 10., 100.], | |
'fit_prior': [True, False] | |
}, |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration Name,Description,Operators | |
Default TPOT,"TPOT will search over a broad range of preprocessors, feature constructors, feature selectors, models, and parameters to find a series of operators that minimize the error of the model predictions. Some of these operators are complex and may take a long time to run, especially on larger datasets. | |
Note: This is the default configuration for TPOT. To use this configuration, use the default value (None) for the config_dict parameter.","Classification | |
Regression" | |
TPOT light,"TPOT will search over a restricted range of preprocessors, feature constructors, feature selectors, models, and parameters to find a series of operators that minimize the error of the model predictions. Only simpler and fast-running operators will be used in these pipelines, so TPOT light is useful for finding quick and simple pipelines for a classification or regression problem. | |
This configuration works for both the TPOTClassifier and TPOTRegressor.","Classification |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration Name,Description,Operators | |
Default TPOT,"TPOT will search over a broad range of preprocessors, feature constructors, feature selectors, models, and parameters to find a series of operators that minimize the error of the model predictions. Some of these operators are complex and may take a long time to run, especially on larger datasets." | |
"Note: This is the default configuration for TPOT. To use this configuration, use the default value (None) for the config_dict parameter.",Classification | |
Regression | |
TPOT light,"TPOT will search over a restricted range of preprocessors, feature constructors, feature selectors, models, and parameters to find a series of operators that minimize the error of the model predictions. Only simpler and fast-running operators will be used in these pipelines, so TPOT light is useful for finding quick and simple pipelines for a classification or regression problem." | |
This configuration works for both the TPOTClassifier and TPOTRegressor.,Classification | |
Regression | |
TPOT MDR,"T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loading our model | |
model = h2o.load_model(model_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Saving our model | |
model_path = h2o.save_model(model=best_model, | |
path="/tmp/leader_model", | |
force=True) |
NewerOlder