D21684: Hypothesis test: Dock and View for t test and z test

Stefan Gerlach noreply at phabricator.kde.org
Tue Jun 11 14:48:58 BST 2019


sgerlach added inline comments.

INLINE COMMENTS

> HypothesisTest.cpp:144
> +    d->PerformOneSampleTest(HypothesisTestPrivate::TestZ);
> +}
> +

At_least

> HypothesisTest.cpp:161
>  }
>  
>  HypothesisTestPrivate::~HypothesisTestPrivate() {

s.a.

> HypothesisTest.cpp:200
> +    // checking for cols;
> +    if (m_columns.size() != 2) {
> +        msg_box->setText(i18n("Inappropriate number of columns selected"));

comment is redundant

> HypothesisTest.cpp:206
> +
> +    // not checking modes becuase columns are selected on the basis of modes;
> +//    bool modeOk = true;

local variable "temp" hides global one. Please use a meaningful (different) name for both.

> HypothesisTest.cpp:767
> +                break;
> +        }
>  

different types for row1 and row2 is confusing. How about "name" and "value"?

> HypothesisTest.cpp:769
>  
> -    //Assuming equal variance
> -    double sp = qSqrt( ((n[0]-1)*qPow(std[0],2) + (n[1]-1)*qPow(std[1],2))/df);
>  
> +        resultModel->setData(resultModel->index(3, 0), i18n("Z value is %1", z), Qt::DisplayRole);

QString::isEmpty()

> HypothesisTest.cpp:773
> +        resultModel->setData(resultModel->index(5, 0), i18n("Significance level is %1", m_significance_level), Qt::DisplayRole);
> +        resultModel->setData(resultModel->index(7, 0), i18n("Assumption: Central Limit Theorem is Valid"), Qt::DisplayRole);
>  

You should use speaking error names by using an enum for example.

> HypothesisTestDock.cpp:218


translate

> HypothesisTestDock.cpp:226
>      ui.cbCol2->clear();
>      for (auto* col : m_hypothesisTest->dataSourceSpreadsheet()->children<Column>()) {
> +        ui.cbCol1Categorical->addItem(col->name());

translate

> HypothesisTestDock.cpp:229
> +        if (col->columnMode() == AbstractColumn::Integer || col->columnMode() == AbstractColumn::Numeric) {
> +            ui.cbCol2->addItem(col->name());
> +            ui.cbCol1->addItem(col->name());

translate

> HypothesisTestDock.cpp:244


what does "Rb" stands for? Can you add documentation for all functions to explain at least the name of the function?

> HypothesisTestDock.cpp:246


still not camelCase :-)

> devanshuagarwal wrote in HypothesisTestDock.cpp:94
> is utf8_qstring() a function. I am not getting any reference to this is a document. Please share me the link if possible.
> 
> These hexadecimal values are taken from the unicode table.

UTF8_QSTRING() is one of our macros defined in src/backend/lib/macros.h

REPOSITORY
  R262 LabPlot

REVISION DETAIL
  https://phabricator.kde.org/D21684

To: devanshuagarwal, sgerlach, asemke
Cc: kde-edu, #labplot, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190611/2d797b35/attachment-0001.html>


More information about the kde-edu mailing list