我正在编写一个Maven MOJO,我希望修改自动生成的plugin.xml。 例如,我想在那里写一个不同的版本,并有一组不同的依赖项。
是否可以自定义此文件?我尝试过使用maven-plugin-plugin:3.5:我的pom中的描述符目标如下:
def __init__(self, estimator, dtype=float, sparse=True):
"""
:param estimator: scikit-learn classifier object.
:param dtype: data type used when building feature array.
scikit-learn estimators work exclusively on numeric data. The
default value should be fine for almost all situations.
:param sparse: Whether to use sparse matrices internally.
The estimator must support these; not all scikit-learn classifiers
do (see their respective documentation and look for "sparse
matrix"). The default value is True, since most NLP problems
involve sparse feature sets. Setting this to False may take a
great amount of memory.
:type sparse: boolean.
"""
self._clf = estimator
self._encoder = LabelEncoder()
self._vectorizer = DictVectorizer(dtype=dtype, sparse=sparse)
似乎没有效果。
有人能举例说明如何做到这一点吗?