对于自动完成,您可以在笔记本的任何位置使用此行;
%config Completer.use_jedi = False
使用此行将帮助您能够使用 tab 进行自动完成。
如果我想打印出文档——例如,如果我想打印出SVC 的文档,这样我就可以添加超参数变量。
from sklearn.svm import SVC
那么,
SVC?
输出
Init signature:
SVC(
*,
C=1.0,
kernel='rbf',
degree=3,
gamma='scale',
coef0=0.0,
shrinking=True,
probability=False,
tol=0.001,
cache_size=200,
class_weight=None,
verbose=False,
max_iter=-1,
decision_function_shape='ovr',
break_ties=False,
random_state=None,
)
Docstring:
C-Support Vector Classification.
The implementation is based on libsvm. The fit time scales at least
quadratically with the number of samples and maybe impractical
beyond tens of thousands of samples. For large datasets
consider using :class:`sklearn.SVM.LinearSVC` or
:class:`sklearn.linear_model.SGDClassifier` instead, possibly after a
:class:`sklearn.kernel_approximation.Nystroem` transformer.
The multiclass support is handled according to a one-vs-one scheme.
For details on the precise mathematical formulation of the provided
kernel functions and how `gamma`, `coef0` and `degree` affect each
other, see the corresponding section in the narrative documentation:
:ref:`svm_kernels`.
...
对于 Shallowing,您可以使用 Shift + Tab 显示任何类的文档,或 ()中的函数@
希望有帮助