コード例 #1
0
        public IActionResult GetProductUnitDemandEstimation(string productId,
                                                            [FromQuery] int year, [FromQuery] int month,
                                                            [FromQuery] float units, [FromQuery] float avg,
                                                            [FromQuery] int count, [FromQuery] float max,
                                                            [FromQuery] float min, [FromQuery] float prev)
        {
            // next,productId,year,month,units,avg,count,max,min,prev
            var nextMonthUnitDemandEstimation = productSales.Predict($"{appSettings.ForecastModelsPath}/product_month_fastTreeTweedie.zip", productId, year, month, units, avg, count, max, min, prev);

            return(Ok(nextMonthUnitDemandEstimation.Score));
        }
コード例 #2
0
        public IActionResult GetProductUnitDemandEstimation(string productId,
                                                            [FromQuery] int year, [FromQuery] int month,
                                                            [FromQuery] float units, [FromQuery] float avg,
                                                            [FromQuery] int count, [FromQuery] float max,
                                                            [FromQuery] float min, [FromQuery] float prev,
                                                            [FromQuery] float price, [FromQuery] string color,
                                                            [FromQuery] string size, [FromQuery] string shape,
                                                            [FromQuery] string agram, [FromQuery] string bgram,
                                                            [FromQuery] string ygram, [FromQuery] string zgram)
        {
            var nextMonthUnitDemandEstimation = productSales.Predict($"{appSettings.AIModelsPath}/product_month_fastTreeTweedle.zip", productId, year, month, units, avg, count, max, min, prev, price, color, size, shape, agram, bgram, ygram, zgram);

            return(Ok(nextMonthUnitDemandEstimation.Score));
        }