PrimerAI / blanc

Human-free quality estimation of document summaries
MIT License
94 stars 11 forks source link

Estime returns NaN #52

Closed UntotaufUrlaub closed 1 year ago

UntotaufUrlaub commented 1 year ago

In some cases estim returns NaN. Is this on purpose or a bug?

If needed I could schedule a rerun and post an example.

OlegVasilyev4096 commented 1 year ago

Thanks, an example would be helpful. ESTIME-soft?

UntotaufUrlaub commented 1 year ago

I am using Estime(output=['alarms', 'soft', 'coherence'], device='cuda').evaluate_claims(doc, [summ]). Seems like ESTIME-coherence.

Log with doc-summ-result pairs:

-- doc --
It says something for the way the team have fallen from past greatness that the result they are talking about is the fourth row of the grid - or the third if things go especially well - and some decent points.
This, from a team that has won 182 grands prix, at a win rate of 23.18%, 12 drivers' world championships, and eight constructors' titles. And which still, despite its dire current results, has two world champions in the cockpit - one of them, Fernando Alonso, arguably the best on the grid.
Listen: Dennis on Alonso, loyalty & mentality
The slump started in 2013, when McLaren lost its way on chassis design, but still had the best engine.
Now, the team seem to have got their mojo back with the car but the problems lie with the Honda power-unit.
This is a far cry from the previous era of one of the most famous partnerships in F1 - it is with Honda that McLaren achieved their greatest successes of an illustrious history.
In 1988, they swept a season like no-one has since, even Mercedes. With the two best drivers in the world in their cars, Ayrton Senna and Alain Prost, they won 15 of the 16 races.
They dominated the next four years, before spending several years in the doldrums - a dip at times as bad as the latest one - before more resounding success, with Mika Hakkinen and Mercedes engines in 1998-99.
Amazingly, the team's last constructors' title was in the first of those two years of victories with the 'flying Finn'.
They should have won it again, in 2007, when Alonso and Lewis Hamilton were team-mates and finished agonisingly tied in the championship, a single point behind the winner, Kimi Raikkonen of Ferrari.
But although the team scored more points than any other, McLaren were kicked out of the constructors' championship that year - and fined $100m - after being found guilty of benefitting from their illegal possession of reams of Ferrari technical information.
There was another scandal two years later - this time dubbed 'lie-gate' - after Hamilton and  sporting director Dave Ryan were found to have misled the stewards at the Australian Grand Prix. This led to a humiliating public apology from Hamilton, and the sack for Ryan.
Until 2012, when Hamilton and team-mate Jenson Button won seven races between them, the victories kept coming, but other than Hamilton's in 2008, the titles dried up - and now the wins have, too.
In many ways, their current predicament is nothing surprising. McLaren's F1 history has, like those of many long-term participants, been a cycle of triumph and decline.
Their first decade, following the team's establishment by the New Zealand F1 driver Bruce McLaren was spent building up the team into an increasingly powerful force, a process that continued despite the founder's death in a testing crash in 1970.
Their maiden title came in 1974, with the Brazilian Emerson Fittipaldi. Another followed two years later, courtesy of James Hunt in his now-famous battle with Ferrari's Niki Lauda.
But then the team began to slip backwards, left behind by the technology of the time. Rather like now.
So alarming was the dip in form that main sponsor Marlboro engineered a coup, bringing on board Ron Dennis, first as co-team boss. He took complete control shortly afterwards and has held it ever since, in one role or another.
Dennis built the team up to its first period of real domination in 1984-5, followed by the Honda era, then a partnership with Mercedes, before stepping back in 2009, only to take back control after the team's disastrous 2013 season.
So far, his return has not had its intended effect. But is McLaren in a period of slow - some would even say terminal - decline? Or are the good times around the corner again?
Dennis insists it is only a matter of time before success will return.
It is McLaren, he told BBC Sport in an interview to mark the team's golden anniversary, who will break Mercedes' hegemony in F1, and become the next team after the German giants to win the title.
This, after all, is why Alonso returned to the team in 2015 - a decision widely questioned at the time because of the difficult relationship he had with Dennis when they worked together in 2007.
The Spanish two-time champion left Ferrari because he felt they would never get there; joined McLaren partly because there was nowhere else to go, but also because he felt the renewed Honda partnership was his best chance to win an elusive third title in the end.
Dennis and his lieutenants believe they are in the process of arresting the slide, that the car is among the very best this year, and that next year Honda - who last year re-entered F1 too soon - will ensure their engine is, too.
They can see the progress, they say, and it is only a matter of time before they again deliver "championships, plural", as Dennis puts it.
But right now, belief is all they have. And on it rests not only a successful end to the career of one of the sport's greatest ever drivers, but also the reputation of one of its greatest names.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
-- summ -
mclaren have a lot to do with them this year.
-- res: [8, 0.10800962569192052, nan]
-- doc --
Fellow tenants Newport Gwent Dragons are subject to a takeover bid from the Welsh Rugby Union, who have said they see Rodney Parade "as a rugby venue."
County have a lease to use the ground - and have primacy of fixtures on the venue if they remain in the Football League - until 2023.
"Our view is quite clear - we've got a contract," Foxall said.
"That is something that we're expecting to be honoured.
"Obviously there is a vote in early May by the shareholders for Newport Rugby and we'll wait and see what happens with that."
The WRU's takeover of Newport Gwent Dragons will be put to the vote on Tuesday, 9 May.
In 2013 the Exiles agreed a 10-year lease to use the stadium after gaining promotion to the Football League from the Conference.
Newport RFC chairman Will Godfrey said both County and Newport Squash Club, who are also based at Rodney Parade, are protected under their current agreements.
Godfrey said the WRU had been made aware of that fact. The WRU have signalled their intention to install an artificial surface which is against Football League rules.
On the pitch, County are two points clear of the League Two relegation with two games remaining after six wins in 10 games under caretaker manager Mike Flynn and can clinch survival this weekend if they win and rivals Hartlepool lose.
Newport secured promotion back to the Football League in 2013 and Foxall said relegation to the National League would be a "massive" blow,
"To lose that status again, in a relatively short space of time would be pretty devastating for the fans but also for the city of Newport," Foxall told BBC Wales Today.
-- summ -
newport county director of rugby steve foxall says he expects to sign a new contract at rodney parade.
-- res: [7, 0.1604315393737384, nan]
UntotaufUrlaub commented 1 year ago

further_estime_nan_examples.txt

OlegVasilyev4096 commented 1 year ago

Thanks, this helps, will check. This issue is probably not yet fixed by the fix of #50.

OlegVasilyev4096 commented 1 year ago

Turns out, it is the property of Kendall Tau as calculated by scipy to produce NaN when all values for either X or Y are the same. https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient For example: scipy.stats.kendalltau([3, 13, 4, 15, 11, 19, 16], [81, 81, 81, 81, 81, 81, 81], variant='c') result: KendalltauResult(correlation=nan, pvalue=nan) scipy.stats.kendalltau([3, 13, 4, 15, 11, 19, 16], [81, 81, 81, 81, 81, 81, 81], variant='b') result: KendalltauResult(correlation=nan, pvalue=nan)

I think it is better to leave it as it is, because it gives a good info. Of course for practical purposes you can replace NaN by zero. I will add the note about this in readme when make the next change (as we discussed in issue #50). Thanks again!

UntotaufUrlaub commented 1 year ago

Thanks for the explanation! I agree, that sounds like the best solution.