neuraxle

Neuraxle's RandomSearch() successor

青春壹個敷衍的年華 提交于 2020-07-19 06:17:18
问题 I updated Neuraxle to the latest version (3.4). I noticed the whole auto_ml.py was redone. I checked the documentation but there is nothing about it. On git it seems method RandomSearch() was replaced a long time ago by AutoML() method. However the parameters are different. Does somebody knows how can I channel Boston Housing example pipeline to automatic parameter search in latest Neuraxle version (3.4)? import numpy as np from sklearn.cluster import KMeans from sklearn.datasets import load

Getting model attributes from scikit-learn pipeline

主宰稳场 提交于 2019-12-17 15:43:01
问题 I typically get PCA loadings like this: pca = PCA(n_components=2) X_t = pca.fit(X).transform(X) loadings = pca.components_ If I run PCA using a scikit-learn pipline ... from sklearn.pipeline import Pipeline pipeline = Pipeline(steps=[ ('scaling',StandardScaler()), ('pca',PCA(n_components=2)) ]) X_t=pipeline.fit_transform(X) ... is it possible to get the loadings? Simply trying loadings = pipeline.components_ fails: AttributeError: 'Pipeline' object has no attribute 'components_' Thanks! (Also

How do I generate Log Uniform Distribution in Python?

♀尐吖头ヾ 提交于 2019-11-30 22:59:19
问题 I could not find a built-in function in Python to generate a log uniform distribution given a min and max value (the R equivalent is here), something like: loguni[n, exp(min), exp(max), base] that returns n log uniformly distributed in the range exp(min) and exp(max). The closest I found though was numpy.random.uniform. 回答1: From http://ecolego.facilia.se/ecolego/show/Log-Uniform%20Distribution: In a loguniform distribution, the logtransformed random variable is assumed to be uniformly