alteryx / alteryx/evalml

Coordinate equivalent output from `component_dict` across list and dict inputs

Abierto
#2,836 0 comentarios 0 reacciones 0 asignados Ver en GitHub
good first issue refactor
Lenguaje dominante
Python
Estrellas
850
Forks
96
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Currently if a list is passed as a `component_graph` to a pipeline, the `component_dict` outputs the class object as the first item in the value of the list within `_make_component_dict_from_component_list`
```
class LinearRegressionPipeline(RegressionPipeline):
"""Linear Regression Pipeline for regression problems."""

component_graph = [
"One Hot Encoder",
"Imputer",
"Standard Scaler",
"Linear Regressor",
]
custom_name = "Linear Regression Pipeline"

def __init__(self, parameters, random_seed=0):
super().__init__(
self.component_graph,
parameters=parameters,
custom_name=self.custom_name,
random_seed=random_seed,
)

pipeline_ = LinearRegressionPipeline({})
print(pipeline_.component_graph.component_dict)
----------------------------------------------------------
{'Imputer': [,
'One Hot Encoder.x',
'y'],
'Linear Regressor': [,
'Standard Scaler.x',
'y'],
'One Hot Encoder': [,
'X',
'y'],
'Standard Scaler': [,
'Imputer.x',
'y']}
```

If a dictionary is passed, then the name of the component is passed instead since the `component_graph` is passed directly to the `ComponentGraph` class
```
component_graph = {
"Imputer": ["Imputer", "X", "y"],
"Target Imputer": ["Target Imputer", "X", "y"],
"OneHot_RandomForest": ["One Hot Encoder", "Imputer.x", "Target Imputer.y"],
"OneHot_ElasticNet": ["One Hot Encoder", "Imputer.x", "y"],
"Random Forest": ["Random Forest Classifier", "OneHot_RandomForest.x", "y"],
"Elastic Net": ["Elastic Net Classifier", "OneHot_ElasticNet.x", "y"],
"Logistic Regression": [
"Logistic Regression Classifier",
"Random Forest.x",
"Elastic Net.x",
"y",
],
}
----------------------------------------------------------
{'Elastic Net': ['Elastic Net Classifier', 'OneHot_ElasticNet.x', 'y'],
'Imputer': ['Imputer', 'X', 'y'],
'Logistic Regression': ['Logistic Regression Classifier',
'Random Forest.x',
'Elastic Net.x',
'y'],
'OneHot_ElasticNet': ['One Hot Encoder', 'Imputer.x', 'y'],
'OneHot_RandomForest': ['One Hot Encoder', 'Imputer.x', 'Target Imputer.y'],
'Random Forest': ['Random Forest Classifier', 'OneHot_RandomForest.x', 'y'],
'Target Imputer': ['Target Imputer', 'X', 'y']}
```

Since `component_dict` is easily accessible for OS users, this should be standardized.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.