prob renamed to stat

This commit is contained in:
Alexander Nozik 2020-10-28 09:16:21 +03:00
parent f8c3d1793c
commit dfa1bcaf01
29 changed files with 41 additions and 33 deletions

View File

@ -12,6 +12,7 @@
- A `Symbol` indexing scope. - A `Symbol` indexing scope.
- Basic optimization API for Commons-math. - Basic optimization API for Commons-math.
- Chi squared optimization for array-like data in CM - Chi squared optimization for array-like data in CM
- `Fitting` utility object in prob/stat
### Changed ### Changed
- Package changed from `scientifik` to `kscience.kmath`. - Package changed from `scientifik` to `kscience.kmath`.
@ -21,6 +22,7 @@
- Kotlin version: 1.3.72 -> 1.4.20-M1 - Kotlin version: 1.3.72 -> 1.4.20-M1
- `kmath-ast` doesn't depend on heavy `kotlin-reflect` library. - `kmath-ast` doesn't depend on heavy `kotlin-reflect` library.
- Full autodiff refactoring based on `Symbol` - Full autodiff refactoring based on `Symbol`
- `kmath-prob` renamed to `kmath-stat`
### Deprecated ### Deprecated

View File

@ -99,7 +99,7 @@ can be used for a wide variety of purposes from high performance calculations to
> - [buffers](kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt) : One-dimensional structure > - [buffers](kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt) : One-dimensional structure
> - [expressions](kmath-core/src/commonMain/kotlin/kscience/kmath/expressions) : Functional Expressions > - [expressions](kmath-core/src/commonMain/kotlin/kscience/kmath/expressions) : Functional Expressions
> - [domains](kmath-core/src/commonMain/kotlin/kscience/kmath/domains) : Domains > - [domains](kmath-core/src/commonMain/kotlin/kscience/kmath/domains) : Domains
> - [autodif](kmath-core/src/commonMain/kotlin/kscience/kmath/misc/AutoDiff.kt) : Automatic differentiation > - [autodif](kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation
<hr/> <hr/>
@ -151,7 +151,7 @@ can be used for a wide variety of purposes from high performance calculations to
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
<hr/> <hr/>
* ### [kmath-prob](kmath-prob) * ### [kmath-stat](kmath-stat)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
@ -201,4 +201,4 @@ with the same artifact names.
## Contributing ## Contributing
The project requires a lot of additional work. Please feel free to contribute in any way and propose new features. The project requires a lot of additional work. The most important thing we need is a feedback about what features are required the most. Feel free to open feature issues with requests. We are also welcome to code contributions, especially in issues marked as [waiting for a hero](https://github.com/mipt-npm/kmath/labels/waiting%20for%20a%20hero).

View File

@ -2,7 +2,7 @@ plugins {
id("ru.mipt.npm.project") id("ru.mipt.npm.project")
} }
val kmathVersion: String by extra("0.2.0-dev-2") val kmathVersion: String by extra("0.2.0-dev-3")
val bintrayRepo: String by extra("kscience") val bintrayRepo: String by extra("kscience")
val githubProject: String by extra("kmath") val githubProject: String by extra("kmath")

View File

@ -23,7 +23,7 @@ dependencies {
implementation(project(":kmath-core")) implementation(project(":kmath-core"))
implementation(project(":kmath-coroutines")) implementation(project(":kmath-coroutines"))
implementation(project(":kmath-commons")) implementation(project(":kmath-commons"))
implementation(project(":kmath-prob")) implementation(project(":kmath-stat"))
implementation(project(":kmath-viktor")) implementation(project(":kmath-viktor"))
implementation(project(":kmath-dimensions")) implementation(project(":kmath-dimensions"))
implementation(project(":kmath-ejml")) implementation(project(":kmath-ejml"))

View File

@ -4,7 +4,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import kscience.kmath.chains.BlockingRealChain import kscience.kmath.chains.BlockingRealChain
import kscience.kmath.prob.* import kscience.kmath.stat.*
import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler
import org.apache.commons.rng.simple.RandomSource import org.apache.commons.rng.simple.RandomSource
import java.time.Duration import java.time.Duration

View File

@ -3,9 +3,9 @@ package kscience.kmath.commons.prob
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import kscience.kmath.chains.Chain import kscience.kmath.chains.Chain
import kscience.kmath.chains.collectWithState import kscience.kmath.chains.collectWithState
import kscience.kmath.prob.Distribution import kscience.kmath.stat.Distribution
import kscience.kmath.prob.RandomGenerator import kscience.kmath.stat.RandomGenerator
import kscience.kmath.prob.normal import kscience.kmath.stat.normal
private data class AveragingChainState(var num: Int = 0, var value: Double = 0.0) private data class AveragingChainState(var num: Int = 0, var value: Double = 0.0)

View File

@ -6,7 +6,7 @@ description = "Commons math binding for kmath"
dependencies { dependencies {
api(project(":kmath-core")) api(project(":kmath-core"))
api(project(":kmath-coroutines")) api(project(":kmath-coroutines"))
api(project(":kmath-prob")) api(project(":kmath-stat"))
api(project(":kmath-functions")) api(project(":kmath-functions"))
api("org.apache.commons:commons-math3:3.6.1") api("org.apache.commons:commons-math3:3.6.1")
} }

View File

@ -1,6 +1,10 @@
package kscience.kmath.commons.optimization package kscience.kmath.commons.optimization
import kscience.kmath.expressions.* import kscience.kmath.expressions.*
import kscience.kmath.stat.OptimizationFeature
import kscience.kmath.stat.OptimizationProblem
import kscience.kmath.stat.OptimizationProblemFactory
import kscience.kmath.stat.OptimizationResult
import org.apache.commons.math3.optim.* import org.apache.commons.math3.optim.*
import org.apache.commons.math3.optim.nonlinear.scalar.GoalType import org.apache.commons.math3.optim.nonlinear.scalar.GoalType
import org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer import org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer

View File

@ -4,7 +4,9 @@ import kscience.kmath.commons.expressions.DerivativeStructureField
import kscience.kmath.expressions.DifferentiableExpression import kscience.kmath.expressions.DifferentiableExpression
import kscience.kmath.expressions.Expression import kscience.kmath.expressions.Expression
import kscience.kmath.expressions.Symbol import kscience.kmath.expressions.Symbol
import kscience.kmath.prob.Fitting import kscience.kmath.stat.Fitting
import kscience.kmath.stat.OptimizationResult
import kscience.kmath.stat.optimizeWith
import kscience.kmath.structures.Buffer import kscience.kmath.structures.Buffer
import kscience.kmath.structures.asBuffer import kscience.kmath.structures.asBuffer
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure import org.apache.commons.math3.analysis.differentiation.DerivativeStructure

View File

@ -1,6 +1,6 @@
package kscience.kmath.commons.random package kscience.kmath.commons.random
import kscience.kmath.prob.RandomGenerator import kscience.kmath.stat.RandomGenerator
public class CMRandomGeneratorWrapper( public class CMRandomGeneratorWrapper(
public val factory: (IntArray) -> RandomGenerator, public val factory: (IntArray) -> RandomGenerator,

View File

@ -2,10 +2,10 @@ package kscience.kmath.commons.optimization
import kscience.kmath.commons.expressions.DerivativeStructureExpression import kscience.kmath.commons.expressions.DerivativeStructureExpression
import kscience.kmath.expressions.symbol import kscience.kmath.expressions.symbol
import kscience.kmath.prob.Distribution import kscience.kmath.stat.Distribution
import kscience.kmath.prob.Fitting import kscience.kmath.stat.Fitting
import kscience.kmath.prob.RandomGenerator import kscience.kmath.stat.RandomGenerator
import kscience.kmath.prob.normal import kscience.kmath.stat.normal
import kscience.kmath.structures.asBuffer import kscience.kmath.structures.asBuffer
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
import kotlin.math.pow import kotlin.math.pow

View File

@ -7,7 +7,7 @@ The core features of KMath:
- [buffers](src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt) : One-dimensional structure - [buffers](src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt) : One-dimensional structure
- [expressions](src/commonMain/kotlin/kscience/kmath/expressions) : Functional Expressions - [expressions](src/commonMain/kotlin/kscience/kmath/expressions) : Functional Expressions
- [domains](src/commonMain/kotlin/kscience/kmath/domains) : Domains - [domains](src/commonMain/kotlin/kscience/kmath/domains) : Domains
- [autodif](src/commonMain/kotlin/kscience/kmath/misc/AutoDiff.kt) : Automatic differentiation - [autodif](src/commonMain/kotlin/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation
> #### Artifact: > #### Artifact:

View File

@ -41,6 +41,6 @@ readme {
feature( feature(
id = "autodif", id = "autodif",
description = "Automatic differentiation", description = "Automatic differentiation",
ref = "src/commonMain/kotlin/kscience/kmath/misc/SimpleAutoDiff.kt" ref = "src/commonMain/kotlin/kscience/kmath/expressions/SimpleAutoDiff.kt"
) )
} }

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kscience.kmath.chains.Chain import kscience.kmath.chains.Chain
import kscience.kmath.chains.collect import kscience.kmath.chains.collect

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kscience.kmath.chains.Chain import kscience.kmath.chains.Chain
import kscience.kmath.chains.SimpleChain import kscience.kmath.chains.SimpleChain

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kscience.kmath.expressions.* import kscience.kmath.expressions.*
import kscience.kmath.operations.ExtendedField import kscience.kmath.operations.ExtendedField

View File

@ -1,4 +1,4 @@
package kscience.kmath.commons.optimization package kscience.kmath.stat
import kscience.kmath.expressions.DifferentiableExpression import kscience.kmath.expressions.DifferentiableExpression
import kscience.kmath.expressions.Expression import kscience.kmath.expressions.Expression

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kscience.kmath.chains.Chain import kscience.kmath.chains.Chain

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kotlin.random.Random import kotlin.random.Random

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kscience.kmath.chains.Chain import kscience.kmath.chains.Chain
import kscience.kmath.chains.ConstantChain import kscience.kmath.chains.ConstantChain

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kscience.kmath.chains.Chain import kscience.kmath.chains.Chain
import kscience.kmath.chains.SimpleChain import kscience.kmath.chains.SimpleChain

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import org.apache.commons.rng.UniformRandomProvider import org.apache.commons.rng.UniformRandomProvider
import org.apache.commons.rng.simple.RandomSource import org.apache.commons.rng.simple.RandomSource

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kscience.kmath.chains.BlockingIntChain import kscience.kmath.chains.BlockingIntChain
import kscience.kmath.chains.BlockingRealChain import kscience.kmath.chains.BlockingRealChain

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kotlinx.coroutines.flow.take import kotlinx.coroutines.flow.take
import kotlinx.coroutines.flow.toList import kotlinx.coroutines.flow.toList

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import kotlin.test.Test import kotlin.test.Test

View File

@ -1,4 +1,4 @@
package kscience.kmath.prob package kscience.kmath.stat
import kotlinx.coroutines.flow.drop import kotlinx.coroutines.flow.drop
import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.first

View File

@ -34,7 +34,7 @@ include(
":kmath-histograms", ":kmath-histograms",
":kmath-commons", ":kmath-commons",
":kmath-viktor", ":kmath-viktor",
":kmath-prob", ":kmath-stat",
":kmath-dimensions", ":kmath-dimensions",
":kmath-for-real", ":kmath-for-real",
":kmath-geometry", ":kmath-geometry",