ensure that all attributes with trailing underscore in fit are leared after the entire logic has succeded
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Refatoração
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- python, scikit-learn
- Domínio
- machine-learning
Direção de pesquisa
Start with the test_encoders test the issue quotes, which shows the non-fitted-error pattern, and copy it for each unchecked module (encoding, outliers, scaling, datetime, text, selection, time series, preproc, wrappers). In each module's fit() method, move every assignment of a trailing-underscore attribute to after the last step that can raise. Done means the new parametrized test passes for every module and the existing tests still pass. Related PR #917 is referenced but not linked, so check it before starting.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
All attributes with trailing underscore must be set up at the end of the fit() functionality, when we are sure that all fit logic worked. At the moment, it is not like that for all transformers.
Add a test like the one in test_encoders:
@pytest.mark.parametrize("estimator", _estimators)
def test_raises_non_fitted_error_when_error_during_fit(estimator):
X, y = test_df(categorical=True)
X.loc[len(X) - 1] = nan
transformer = clone(estimator)
with pytest.raises(ValueError):
transformer.fit(X, y)
# Test when fit is not called prior to transform.
with pytest.raises(NotFittedError):
transformer.transform(X)
Modules encoding and preprocessing already have this functionality.
Modules to update:
- imputation
- encoding
- discretisation
- outliers
- transformation
- scaling
- creation
- datetime
- text
- selection
- time series
- preproc
- wrappers
Related PRs:
- #917
- Linguagem predominante
- Python
- Estrelas
- 2.3k
- Forks
- 391
- Merge médio
- 11h 34min
- PRs com merge (30d)
- 11
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de feature-engine/feature_engine
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
feature-engine/feature_engine#1141 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
docs
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
feature-engine/feature_engine#393 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
feature-engine/feature_engine#1140 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
CategoricalImputer fails when fill_value is already a categoryTalvez já em andamento @AryanRG assumiu há 13 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 18/100
feature-engine/feature_engine#1113 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
OneHotEncoder loses a dummy name when it matches an encoded input columnTalvez já em andamento @Aadrit555 assumiu há 7 dias. Aberta
Dificuldade 3/5 Meio dia Facilidade para iniciantes 25/100
feature-engine/feature_engine#1106 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de feature-engine/feature_engine
Issues semelhantes
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount dueTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 79/100
developmentseed/titiler-covjson#164 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
awslabs/visual-asset-management-system#2164 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
MakazhanAlpamys/Soup#3589 ·
Mantenedores costumam responder em até 1 dia
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
Mantenedores costumam responder em até 1 dia