This file contains hidden or 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
| # library | |
| from mpl_toolkits.mplot3d import Axes3D | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| import seaborn as sns | |
| # Get the data (csv file is hosted on the web) | |
| url = 'https://python-graph-gallery.com/wp-content/uploads/volcano.csv' | |
| data = pd.read_csv(url) |
This file contains hidden or 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 libraries | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| fig = plt.figure() | |
| #creating a subplot | |
| ax1 = fig.add_subplot(1,1,1) | |
| def animate(i): |
This file contains hidden or 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
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| import numpy as np | |
| plt.style.use('dark_background') | |
| fig = plt.figure() | |
| ax = plt.axes(xlim=(-50, 50), ylim=(-50, 50)) | |
| line, = ax.plot([], [], lw=2) |
This file contains hidden or 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
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| from matplotlib.animation import FuncAnimation | |
| plt.style.use('seaborn-pastel') | |
| fig = plt.figure() | |
| ax = plt.axes(xlim=(0, 4), ylim=(-2, 2)) | |
| line, = ax.plot([], [], lw=3) |
This file contains hidden or 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
| Evaluated Logistic Regression, Random Forest models with 3 folds and AuPR metric. | |
| Evaluated 3 Logistic Regression models with AuPR between [0.6751930383321765, 0.7768725281794376] | |
| Evaluated 16 Random Forest models with AuPR between [0.7781671467343991, 0.8104798040316159] | |
| Selected model Random Forest classifier with parameters: | |
| |-----------------------|--------------| | |
| | Model Param | Value | | |
| |-----------------------|--------------| | |
| | modelType | RandomForest | | |
| | featureSubsetStrategy | auto | |
This file contains hidden or 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
| import com.salesforce.op._ | |
| import com.salesforce.op.readers._ | |
| import com.salesforce.op.features._ | |
| import com.salesforce.op.features.types._ | |
| import com.salesforce.op.stages.impl.classification._ | |
| import org.apache.spark.SparkConf | |
| import org.apache.spark.sql.SparkSession | |
| implicit val spark = SparkSession.builder.config(new SparkConf()).getOrCreate() | |
| import spark.implicits._ |
This file contains hidden or 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
| from keras.datasets import mnist | |
| from autokeras import ImageClassifier | |
| from autokeras.constant import Constant | |
| if __name__ == '__main__': | |
| (x_train, y_train), (x_test, y_test) = mnist.load_data() | |
| x_train = x_train.reshape(x_train.shape + (1,)) | |
| x_test = x_test.reshape(x_test.shape + (1,)) | |
| clf = ImageClassifier(verbose=True, augment=False) | |
| clf.fit(x_train, y_train, time_limit=30 * 60) |
This file contains hidden or 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
| import h2o | |
| from h2o.automl import H2OAutoML | |
| h2o.init() | |
| # Import a sample binary outcome train/test set into H2O | |
| train = h2o.import_file("https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv") | |
| test = h2o.import_file("https://s3.amazonaws.com/erin-data/higgs/higgs_test_5k.csv") | |
| # Identify predictors and response |
This file contains hidden or 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
| import sklearn.model_selection | |
| import sklearn.datasets | |
| import sklearn.metrics | |
| import autosklearn.regression | |
| def main(): | |
| X, y = sklearn.datasets.load_boston(return_X_y=True) | |
| feature_types = (['numerical'] * 3) + ['categorical'] + (['numerical'] * 9) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.