Skip to content

Commit

Permalink
docs: Preparing release notes for v1.5.3 [WIP 4]
Browse files Browse the repository at this point in the history
Signed-off-by: mandar2812 <mandar2812@gmail.com>
  • Loading branch information
mandar2812 committed Aug 13, 2018
1 parent 51b8e44 commit ef3b9b5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
31 changes: 31 additions & 0 deletions docs/releases/mydoc_release_notes_153.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,35 @@

## Additions

### Data Set API

The `DataSet` family of classes helps the user to create and transform potentially large number of data instances.
Users can create and perform complex transformations on data sets, using the `DataPipe` API or simple Scala functions.

```scala
import _root_.io.github.mandar2812.dynaml.probability._
import _root_.io.github.mandar2812.dynaml.pipes._
import io.github.mandar2812.dynaml.tensorflow._


val random_numbers = GaussianRV(0.0, 1.0) :* GaussianRV(1.0, 2.0)

//Create a data set.
val dataset1 = dtfdata.dataset(random_numbers.iid(10000).draw)

val filter_gr_zero = DataPipe[(Double, Double), Boolean](c => c._1 > 0d && c._2 > 0d)

//Filter elements
val data_gr_zero = dataset1.filter(filter_gr_zero)

val abs_func: (Double, Double) => (Double, Double) = (c: (Double, Double)) => (math.abs(c._1), math.abs(c._2))

//Map elements
val data_abs = dataset1.map(abs_func)

```

Find out more about the `DataSet` API and its capabilities in the scala [docs]().

### Tensorflow Integration

Expand Down Expand Up @@ -69,6 +97,9 @@

#### Dynamical Systems: Continuous Time RNN

Continuous time recurrent neural networks (CTRNN) are an important class of recurrent neural networks. They enable
the modelling of non-linear and potentially complex dynamical systems of multiple variables, with feedback.

- Added CTRNN layer: `dtflearn.ctrnn`

- Added CTRNN layer with inferable time step: `dtflearn.dctrnn`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,23 @@ class DataSet[X](val data: Iterable[X]) {

lazy val size: Int = data.toSeq.length


def filter(filterFn: X => Boolean): DataSet[X] = DataSet[X](data.filter(filterFn))

/**
* Filter elements of this data set which satisfy
* a predicate.
* */
def filter(pipe: DataPipe[X, Boolean]): DataSet[X] = DataSet[X](self.data.filter(pipe(_)))
def filter(pipe: DataPipe[X, Boolean]): DataSet[X] = filter(pipe.run _)


def filterNot(filterFn: X => Boolean): DataSet[X] = DataSet[X](data.filterNot(filterFn))

/**
* Filter elements of this data set which does not
* satisfy a predicate.
* */
def filterNot(pipe: DataPipe[X, Boolean]): DataSet[X] = DataSet[X](self.data.filterNot(pipe(_)))
def filterNot(pipe: DataPipe[X, Boolean]): DataSet[X] = filterNot(pipe.run _)

/**
* Creates a new data set of type [[Y]]
Expand Down Expand Up @@ -101,6 +107,9 @@ class DataSet[X](val data: Iterable[X]) {
* */
def concatenate(other: DataSet[X]): DataSet[X] = DataSet[X](self.data ++ other.data)


def transform[Y](transformation: Iterable[X] => Iterable[Y]): DataSet[Y] = DataSet[Y](transformation(data))

/**
* Transform the underlying collection in a way that uses potentially all of its elements.
* */
Expand Down

0 comments on commit ef3b9b5

Please sign in to comment.