Skip to main content

Spatial Uncertainty Research Framework

Project description

Spatial Uncertainty Research Framework

pelicun

What is SURF?

SURF is a Python package for performing spatial uncertainty analysis uisng random fields and machine leaning.

Install

pip install pySURF

Examples

The example below shows how to train a neural network on a data set, and use it to predict.

    from surf.NN import SpatialNeuralNet

    #---------------------------------------
    # 1. Prepare your data
    #---------------------------------------

    # ... see SURF.ET-AI.py 

    #---------------------------------------
    # 2. Train the neural network
    #---------------------------------------
    
    nn = SpatialNeuralNet(rawData = data, numNei = 20)
    nn.build_model()
    nn.train()

    #---------------------------------------
    # 3. Predict
    #---------------------------------------

    unkown_point = [x, y] # define a point  
    predicted = nn.predict(unkown_point) # predict

The example below shows how to define a spatial model for a data set, and insert it into random field to predict.

    from surf.rf import SK
    import surf.spatialModel as m

    #---------------------------------------
    # 1. Prepare your data
    #---------------------------------------

    # ... see SURF.ET.py 

    #---------------------------------------
    # 2. Define spatial model 
    #---------------------------------------

    colLength = 0.1
    sill = np.var( data[:,2] )
    cov = m.cov( m.exponential, ( colLength, sill ) )

    #---------------------------------------
    # 3. Predict
    #---------------------------------------
    
    unkown_point = [x, y] # define a point  
    predicted_mu, predicted_std = SK( data, cov, unkown_point, N=100 )

Application examples

BRAILS

Soft-Story Detection

License

SURF is distributed under the BSD 3-Clause license.

Acknowledgement

This material is based upon work supported by the National Science Foundation under Grant No. 1612843. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

Contact

Charles Wang, NHERI SimCenter, University of California, Berkeley, c_w@berkeley.edu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pySURF-0.2.4.tar.gz (1.9 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page