Ticket #1253 (closed bug: fixed)

Opened 22 months ago

Last modified 19 months ago

Error in probability estimator constructor argument parsing

Reported by: ales Owned by: janez
Milestone: Component: library
Severity: minor Keywords:
Cc: matija Blocking:
Blocked By:

Description

ProbabilityEstimatorConstructor_call does not parse the argument tuple correctly when using None for the distribution (as documented  here)

import Orange
iris = Orange.data.Table('iris')

Orange.statistics.estimate.M(None, iris)
# raises TypeError: Invalid arguments for 'ProbabilityEstimatorConstructor.call'

prior = Orange.statistics.distribution.Distribution("iris", iris)

Orange.statistics.estimate.M(None, prior, iris)
# raises TypeError: Invalid arguments for 'ProbabilityEstimatorConstructor.call'

Is this even worth fixing? Considering that no builtin constructors actually use the instances argument. Instead we could just simplify the documented interface (leave out the instances and weight_id parameters). Instead have helper functions in the estimate package that compute estimators from Orange.data.Table.

Attachments

patch1.diff Download (1.2 KB) - added by ales 22 months ago.

Change History

Changed 22 months ago by ales

comment:1 Changed 22 months ago by janez

Aleš, I agree: we shouldn't waste time with this. Please simplify the documentation or do whatever is the easiest.

comment:2 Changed 19 months ago by ales

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in da96782f1c2b and 02feeae55f5f

Note: See TracTickets for help on using tickets.