Giter VIP home page Giter VIP logo

[Question]: 我想使用UIE模型去进行关系或实体抽取的zero-shot,我想使用我的数据然后使用我定义的标签去完成,这些都可以实现,但是结果给到的是具体的实体和关系,我想问下UIE模型中有对zero-shot的f1、precision、recall值得计算程序吗,在哪里呢?的计算程序嘛 about paddlenlp HOT 3 CLOSED

741060686 avatar 741060686 commented on June 15, 2024
[Question]: 我想使用UIE模型去进行关系或实体抽取的zero-shot,我想使用我的数据然后使用我定义的标签去完成,这些都可以实现,但是结果给到的是具体的实体和关系,我想问下UIE模型中有对zero-shot的f1、precision、recall值得计算程序吗,在哪里呢?的计算程序嘛

from paddlenlp.

Comments (3)

w5688414 avatar w5688414 commented on June 15, 2024

可以看看这个:

precision, recall, f1 = metric.accumulate()

from paddlenlp.

741060686 avatar 741060686 commented on June 15, 2024

谢谢您的回答,但是我还是不能搞清楚UIE模型的Zero-shot这个怎么启动。因为我做few-shot时,使用doccano.py可以按照比例划分出三个数据集,但是zero-shot中我使用doccano.py划分不了数据集,显示为空。zero-shot的启动和few-shot一样吗,期待您的回答。

from paddlenlp.

w5688414 avatar w5688414 commented on June 15, 2024

zero-shot是直接进行抽取,不进行训练,可以参考文档。

https://github.com/PaddlePaddle/PaddleNLP/blob/beb433a9aef8a4f8575c866be0bca2660dee2039/docs/model_zoo/taskflow.md?plain=1#L949C1-L949C74

直接使用这个函数就能算zero-shot的指标。

def evaluate(model, metric, data_loader, multilingual=False):

from paddlenlp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.