The TfidfTransformer return negative weights for terms appear in every
documents. In http://en.wikipedia.org/wiki/Tf%E2%80%93idf they do mention
negative weights, but I also doubt that would make sense. I actually
already made a pull request. You can have a look at it.
On Sat, Dec 24, 2011 at 5:52 PM, Lars Buitinck <[email protected]> wrote:
> 2011/12/24 xinfan meng <[email protected]>:
> > In the current implementation of TfidfTransformer. It is possible to
> have
> > a negative tf-idf weight. In IR area, it probably make sense, but for the
> > text classification task, I would probably never expect a negative value.
>
> What do you mean? Does the TfidfTransformer return negative weights
> for your data, or does it not perform sufficient input validation?
>
> In neither IR nor ML do negative tf-idf values make any sense; they
> are a non-negative quantity (tf) divided by (the log of) a positive
> quantity (df).
>
> --
> Lars Buitinck
> Scientific programmer, ILPS
> University of Amsterdam
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
--
Best Wishes
--------------------------------------------
Meng Xinfan(蒙新泛)
Institute of Computational Linguistics
Department of Computer Science & Technology
School of Electronic Engineering & Computer Science
Peking University
Beijing, 100871
China
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general