Re: [scikit-learn] How use get_depth
The function is added in the latest release, you probably need to update the package and then you should have it. On Mon., Jun. 17, 2019, 15:42 Brown J.B. via scikit-learn, < scikit-learn@python.org> wrote: > Perhaps you mean: > DecisionTreeRegressor.tree_.max_depth , where DecisionTreeRegressor.tree_ > is available after calling fit() ? > > > 2019年6月17日(月) 22:29 Wendley Silva : > >> Hi all, >> >> I tried several ways to use the get_depth() method from >> DecisionTreeRegression, but I always get the same error: >> >> self.clf.*get_depth()* >> AttributeError: *'DecisionTreeRegressor' object has no attribute >> 'get_depth'* >> >> I researched the internet and found no solution. Any idea how to use it >> correctly? >> >> *Description of get_depth():* >> >> https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeRegressor.html >> >> Thanks in advance. >> >> Best, >> *Wendley S. Silva* >> Universidade Federal do Ceará - Brasil >> >> +55 (88) 3695.4608 >> wend...@ufc.br >> www.ec.ufc.br/wendley >> Rua Cel. Estanislau Frota, 563, Centro, Sobral-CE, Brasil - CEP 62.0 >> 10-560 >> ___ >> scikit-learn mailing list >> scikit-learn@python.org >> https://mail.python.org/mailman/listinfo/scikit-learn >> > ___ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn > ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
Re: [scikit-learn] How use get_depth
Perhaps you mean: DecisionTreeRegressor.tree_.max_depth , where DecisionTreeRegressor.tree_ is available after calling fit() ? 2019年6月17日(月) 22:29 Wendley Silva : > Hi all, > > I tried several ways to use the get_depth() method from > DecisionTreeRegression, but I always get the same error: > > self.clf.*get_depth()* > AttributeError: *'DecisionTreeRegressor' object has no attribute > 'get_depth'* > > I researched the internet and found no solution. Any idea how to use it > correctly? > > *Description of get_depth():* > > https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeRegressor.html > > Thanks in advance. > > Best, > *Wendley S. Silva* > Universidade Federal do Ceará - Brasil > > +55 (88) 3695.4608 > wend...@ufc.br > www.ec.ufc.br/wendley > Rua Cel. Estanislau Frota, 563, Centro, Sobral-CE, Brasil - CEP 62.0 > 10-560 > ___ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn > ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
[scikit-learn] How use get_depth
Hi all, I tried several ways to use the get_depth() method from DecisionTreeRegression, but I always get the same error: self.clf.*get_depth()* AttributeError: *'DecisionTreeRegressor' object has no attribute 'get_depth'* I researched the internet and found no solution. Any idea how to use it correctly? *Description of get_depth():* https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeRegressor.html Thanks in advance. Best, *Wendley S. Silva* Universidade Federal do Ceará - Brasil +55 (88) 3695.4608 wend...@ufc.br www.ec.ufc.br/wendley Rua Cel. Estanislau Frota, 563, Centro, Sobral-CE, Brasil - CEP 62.010-560 ___ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn