File:Learning curve models- Wright, Plateau, Stanford-B, DeJong, S-curve.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 785 × 491 pixels, file size: 52 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Desc

    Matplotlib

    %config InlineBackend.figure_formats = ['svg']
    
    import matplotlib.pyplot as plt
    %matplotlib inline
    import matplotlib.pyplot as plt
    import numpy as np
    
    # Define range of x (total number of units made)
    x = np.exp(np.linspace(0, np.log(1000), 1000))
    
    # Define constant parameters
    K = 100
    K0 = 3
    n = -0.3 # np.log(2) / np.log(0.8)  # Learning rate of 80%
    K0 = 50
    B = 10
    M = 0.5
    
    # Define models
    wright = K * x ** n
    plateau = np.maximum(wright, K0)
    stanford_b = K * (x + B) ** n + (K - K * B ** n)
    dejong = K * (M + (1 - M) * x ** n)
    s_curve = K * (M + (1 - M) * (x + B) ** n) +  K - K * (M + (1-M) * B ** n)
    
    # Create log-log plot
    plt.figure(figsize=(10, 6))
    plt.loglog(x, wright, label="Wright's model")
    plt.loglog(x, plateau, label="Plateau model")
    plt.loglog(x, stanford_b, label="Stanford-B model")
    plt.loglog(x, dejong, label="DeJong’s model")
    plt.loglog(x, s_curve, label="S-curve model")
    plt.ylim(30, 120)
    plt.legend()
    
    plt.title('Learning Curve Models')
    plt.xlabel('Total Number of Units Made (log scale)')
    plt.ylabel('Cost of x-th Unit (log scale)')
    plt.grid(True, which="both", ls="--")
    plt.show()

    Date
    Source Own work
    Author Cosmia Nebula

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    23 July 2023

    53,504 byte

    image/svg+xml

    4af4ad9ba749138a184cfab27a22c321126cb182

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current02:17, 24 July 2023Thumbnail for version as of 02:17, 24 July 2023785 × 491 (52 KB)wikimediacommons>Cosmia NebulaUploaded while editing "Learning curve" on en.wikipedia.org

    There are no pages that use this file.