Code Monkey home page Code Monkey logo

Comments (6)

maximtrp avatar maximtrp commented on August 16, 2024

@zhoul14 Please give a minimal working example (dataset and code you are getting errors with).

from scikit-posthocs.

zhoul14 avatar zhoul14 commented on August 16, 2024

Minimal Working Example:
a=[0.0758620672966,0.0973375093743,0.0823115474934,0.0778925139413,0.0819465429785,0.0796656581338,0.0785154747212,0.076680191776,0.0768629885181,0.0788061349247,0.0779293561256,0.0790246794075,0.0790269516254,0.0777317636504,0.0757962833886,0.0775519895172,0.0778238646216,0.0780491246774,0.0794335135563,0.0759235310095,0.0833858503532,0.0768906781928,0.080384079316,0.0766948770573,0.0800948111699,0.082430089598,0.0740328629397,0.0789000913681,0.0779414300755,0.0790291666155,0.078657255494,0.0802241085545,0.0739809571224,0.076056244802,0.0761171781977,0.0728913220625,0.0744615341682,0.0725346394267,0.0743544717507,0.0709101944836,0.0752602311179,0.0785679418376,0.0725486099901,0.077237473364,0.0714355286539,0.0734376552041,0.0743690764601,0.0778208712667,0.0748293049788,0.0733981127026,0.0744273593654,0.0728530104913,0.0701381212573,0.0707073842833,0.068084805764,0.0734187555235,0.0726690312918,0.0651494324964,0.0673265119361,0.064044664499,0.0521803145495,0.0523705612868,0.0532560177287,0.0508246024279,0.0455519004764,0.045351524404,0.0456084475144,0.0695967875796,0.0694068269889,0.0683948681249,0.0663860249727,0.0656443483654,0.0684094562818,0.0693893045484,0.069333656528,0.0652543864573,0.0665306292816,0.0640296728562,0.0632387311432,0.0625893952856,0.0651539956474,0.0666448362681,0.0666099544756,0.0685935665265,0.0665430130162,0.0635760584895,0.0643642459146,0.0650119206937,0.0462430980888,0.0654321468831,0.066845471534]

def show_outliers():
    a=[0.0758620672966,0.0973375093743,0.0823115474934,0.0778925139413,0.0819465429785,0.0796656581338,0.0785154747212,0.076680191776,0.0768629885181,0.0788061349247,0.0779293561256,0.0790246794075,0.0790269516254,0.0777317636504,0.0757962833886,0.0775519895172,0.0778238646216,0.0780491246774,0.0794335135563,0.0759235310095,0.0833858503532,0.0768906781928,0.080384079316,0.0766948770573,0.0800948111699,0.082430089598,0.0740328629397,0.0789000913681,0.0779414300755,0.0790291666155,0.078657255494,0.0802241085545,0.0739809571224,0.076056244802,0.0761171781977,0.0728913220625,0.0744615341682,0.0725346394267,0.0743544717507,0.0709101944836,0.0752602311179,0.0785679418376,0.0725486099901,0.077237473364,0.0714355286539,0.0734376552041,0.0743690764601,0.0778208712667,0.0748293049788,0.0733981127026,0.0744273593654,0.0728530104913,0.0701381212573,0.0707073842833,0.068084805764,0.0734187555235,0.0726690312918,0.0651494324964,0.0673265119361,0.064044664499,0.0521803145495,0.0523705612868,0.0532560177287,0.0508246024279,0.0455519004764,0.045351524404,0.0456084475144,0.0695967875796,0.0694068269889,0.0683948681249,0.0663860249727,0.0656443483654,0.0684094562818,0.0693893045484,0.069333656528,0.0652543864573,0.0665306292816,0.0640296728562,0.0632387311432,0.0625893952856,0.0651539956474,0.0666448362681,0.0666099544756,0.0685935665265,0.0665430130162,0.0635760584895,0.0643642459146,0.0650119206937,0.0462430980888,0.0654321468831,0.066845471534]
    from matplotlib import pyplot as plt
    plt.plot(a)
    outliers = outliers_gesd(np.array(a),outliers=10)
    for i,x_i in enumerate(a):
        if x_i not in outliers:
            plt.plot(i,x_i,'r*')
    plt.show()

from scikit-posthocs.

zhoul14 avatar zhoul14 commented on August 16, 2024

image

from scikit-posthocs.

zhoul14 avatar zhoul14 commented on August 16, 2024

when i change the code:

ms.append(lms + [np.argmax(abs_d)])

to

ms.append(lms + np.where(data == data_proc[np.argmax(abs_d)])[0].tolist())

or

        ms.append(lms + [data.tolist().index(data_proc[np.argmax(abs_d)])])

from scikit-posthocs.

zhoul14 avatar zhoul14 commented on August 16, 2024

The outlier point changed:
image

from scikit-posthocs.

maximtrp avatar maximtrp commented on August 16, 2024

Sorry for a delayed answer.
Thank you! You are right. I've corrected the wrong code.

from scikit-posthocs.

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.