Git Product home page Git Product logo

bigdl-trainings's Introduction

DISCONTINUATION OF PROJECT

This project will no longer be maintained by Intel. Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project. Intel no longer accepts patches to this project.

BigDL-trainings

Training materials for BigDL

bigdl-trainings's People

Contributors

glorysdj avatar jason-dai avatar louie-tsai avatar sfblackl-intel avatar sujee avatar timfox456 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bigdl-trainings's Issues

the lambda passed to `ds.map` doesn't compile "SyntaxError: invalid syntax"

Did you mean to pass t and decompose t's members like this?

#convert ndarray data into RDD[Sample]
def array2rdd(ds):
    #build Sample from ndarrays
    def build_sample(c0,c1,c2,c3,prediction):
        feature = np.array([c0, c1, c2, c3]).flatten()
        label = np.array(prediction)
        #print("what ami", Sample.from_ndarray(feature, label))
        return Sample.from_ndarray(feature, label)
    rdd = ds.map(lambda t: build_sample(t[0],t[1],t[2],t[3],t[4]))
    return rdd

iris_rdd_train = array2rdd(iris_k_train)
iris_rdd_train.cache()
print("Training Count: " + str(iris_rdd_train.count()))

iris_rdd_test = array2rdd(iris_k_test)
iris_rdd_test.cache()
print ("Test Count: " + str(iris_rdd_test.count()))

see feedforward-iris.ipynb

Lambda function is not working in py36+

Working function

def array2rdd(ds):
#build Sample from ndarrays
def build_sample(balance,sex,education,marriage,age,default):
feature = np.array([balance,sex,education,marriage,age]).flatten()
label = np.array(default)
return Sample.from_ndarray(feature, label)

rdd = ds.map(lambda X: build_sample(X[0],X[1],X[2],X[3],X[4],X[5]))
return rdd

cc_rdd_train = array2rdd(trainingData.rdd.map(list))
cc_rdd_train.cache()
cc_rdd_train.count()

cc_rdd_test = array2rdd(validData.rdd.map(list))
cc_rdd_test.cache()
cc_rdd_test.count()

iris_training.csv is missing

There is a broken link between the /notebooks/feedforward-iris-pipeline.ipynb and the code which tries to load spark.read.csv("../data/iris/iris_training.csv",

Could you kindly point me to the csv?

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.