AgriTech sem limites: Churrasco, SAP e Data Science

Do campo para seu Churrasco

Domingo é dia de um bom churrasco, e quando possível, com aquele cardápio variado estrelando a linguicinha dos processadores de suínos de Santa Catarina, a picanha das gigantes multinacionais da carne do Mato Grosso, quem sabe até com alguns acompanhamentos e petiscos de uma das inúmeras cooperativas de laticínios que existem ao redor do país.

Esses heróis da economia nacional, além da produção das delícias que chegam à nossa mesa, também são responsáveis por acrescentar mais de R$1,7 trilhões de reais (Trilhão, com “T” mesmo) ao PIB brasileiro.

E o mais impressionante é que este número segue crescendo apesar das várias barreiras políticas, das falhas históricas em nossa infraestrutura e de uma recente pandemia.

Mas aí você me pergunta, o que churrasco, SAP e Ciência de Dados tem a ver?


Então vamos lá! É muito sobre ajudar essas empresas a sobrepor os desafios de tomada de decisão que cadeias de suprimentos, super complexas como estas, tem em seu dia-a-dia.

Montagem ou Desmontagem?

Pequenas e grandes indústrias têm tentado se utilizar de sistemas cada vez mais avançados de suporte à produção, a fim de enfrentar essas inúmeras adversidades.

E este tipo de tecnologia aplicada na agricultura, horticultura e aquicultura com o objetivo de melhorar o rendimento, a eficiência e a lucratividade é o que chamamos de Agritech.

Mas apesar de  conhecerem muito sobre seu negócio e cada detalhe de seu mercado, elas ainda encontram bastante dificuldade quando estas gigantes do mundo dos softwares tentam suprir suas expectativas e necessidades específicas de negócio.


Sabemos que o tamanho da operação pode mudar, mas que, geralmente, em todas as Indústrias, as obrigações fiscais e contábeis são as mesmas, e os desafios na área de marketing e de RH para alcançar seus resultados são bem parecidos.  

Mas é exatamente aí que termina a semelhança entre as Indústrias baseadas em matéria-prima Agropecuária e Indústrias de outros setores como as gigantes automotivas ou as grandes farmacêuticas.

Enquanto todas as demais indústrias lidam com a Montagem de elementos para chegar a um produto final, a indústria de proteínas (laticínios, carne suína, carne bovina, aves, etc..) lida com a Desmontagem de uma matéria prima única em diversas possibilidades de produto final.

Por exemplo, um fabricante de televisores trabalha na aquisição de chips, plásticos e peças, com base no tipo de TV que planeja produzir.

Já em um Frigorífico de Suínos, o desafio será o de transformar cada animal que entra na fábrica em múltiplas possibilidades de alimento de qualidade, com o menor desperdício possível e garantindo produtos frescos e de qualidade no supermercado mais próximo de seus consumidores.

E onde o SAP entra nessa?

O SAP é uma sólida ferramenta ERP que pode ser implementada, tanto nas indústrias de manufatura de médio, como nas de grande porte. Ele atende às necessidades de quase todos os tipos de Indústria, podendo até ser utilizado em sua versão padrão em uma vasta gama de processos de negócio.

E juntamente com suas licenças adicionais para HCM, BI, EWM, PO, TM, GTS e outros componentes (os experts em SAP já estão familiarizados com estas siglas), o SAP pode oferecer uma plataforma de dados unificada e melhorar bastante o acompanhamento consolidado de suas regras de negócio.

Mas apesar de oferecer o MRP e recursos avançados de planejamento de produção, o SAP se limita apenas em ajudar com algumas restrições específicas da Indústria de Desmonte.

Por ter seu foco muito forte em processos baseados em regras fixas, que são definidos como padrão e se encaixam em um roteiro de aplicação pré existente, o SAP algumas vezes falha ao lidar com as complexidades de mudanças repentinas de suprimentos, variabilidade de preços de commodities ou influências externas como a de uma pandemia.

Se por um lado vale muito a pena padronizar os processos, de outro também vale controlar os detalhes que te fazem diferente e melhor do que os outros, especialmente nessa corrida diária contra o Shelf-life, e é neste ponto que o SAP mais precisa de ajuda.

Juntando Forças

Nos últimos 15 anos, tenho trabalhado em adaptar o sistema SAP às necessidades dos clientes da Indústria de Desmonte ao redor do mundo, principalmente nas Indústrias da Frigoríficos e Laticínios.

Sou defensor ferrenho de que você precisa de sistema ERP como parte de seu stack tecnológico, mas o que tenho para te falar é: não acredite, nem por um segundo, que nem mesmo a última versão de um SAP-HANA irá fornecer-lhe a heurística necessária para te tornar um líder de mercado, porque você certamente vai precisar de um motor mais robusto de ciência de dados avançada em conjunto com o seu ERP, para alcançar este patamar.

10 coisas que você precisa saber

Cada vez mais, clientes SAP estão preferindo complementar seus sistemas com motores mais robustos de ciência de dados, muito pela flexibilidade que estas plataformas têm de lidar com as complexidades de suas empresas, cobrindo desde a rotina de planejamento de produção, até a integração total de decisões de toda a cadeia de suprimentos.

Abaixo, listo onde estão estes benefícios e o porquê desta decisão ser cada vez mais comum neste tipo de Indústria:

  1. O Poder e a Flexibilidade da Nuvem: Começo pelo poder ilimitado da nuvem e todas as suas inerentes facilidades, o que deixa as restrições de integração SAP já não são mais consideradas um fator limitador.
  2. Adiciono a capacidade de otimização avançada e modelagem independente de dados (discreta, repetitiva ou combinação) que estes sistemas trazem, não importando qual seja a sua configuração SAP.
  3. Não há limites para as restrições que você precisa configurar no seu modelo, a otimização em nuvem independente da Austin Data Labs, por exemplo, pode modelar a sua linha de produção de maneira precisa e sem os custos exorbitantes de uma implementação do SAP-APO.
  4. Nós sabemos que seus planos podem mudar a cada dia, então ter a capacidade de fazer as mudanças necessárias nas configurações de capacidade ou transferir os planos de uma planta para outra sem precisar contratar consultores ou pagar horas de desenvolvimento SAP, é muito importante!
  5. Ter de compartilhar os dados da sua empresa em LBN, só porque a SAP deixou de sustentar as ferramentas caras que vendeu no ano passado, deixa de ser um problema
  6. Usufruir do poder da ciência de dados sem ter que pagar pelo SAP-Leonardo, passa a ser um benefício
  7. Levar a inovação para o chão de fábrica! Ter as informações e os dashboards que sua operação precisa, de qualquer lugar e sem precisar gastar com as customizações Fiori e Tile, é uma boa vantagem
  8. Obter um RPO e RTO compatíveis com o seu negócio, sem necessidade de taxa de suporte.
  9. Otimizar, Otimizar e Otimizar! Executar seus modelos como e quando achar necessário, sem se preocupar que isso possa derrubar todo o sistema.
  10. E, finalmente, poder suportar melhores decisões para que você possa continuar impulsionando os seus negócios.

Estamos aqui se precisar! Teremos muito prazer em ajudá-lo a encontrar  a solução mais adequada para seus problemas de otimização de planejamento e integração das decisões de sua cadeia de suprimentos.

Post traduzido em Fev/2021. Texto Original aqui

Quer conhecer um pouco mais sobre como utilizamos estes conceitos para encontrar oportunidades de margem em seu negócio? Clique aqui

Ilustração para Esportes Individuais

Poderia a ciência de dados escolher astros de esportes individuais como o tênis?

A Ciência de Dados se transformou em uma ferramenta tão predominante em esportes coletivos nos dias de hoje que não me surpreenderia saber que times andam embasando seu recrutamento de potenciais astros utilizando-se seus princípios básicos.

Certamente, ficaria muito mais fácil explicar eventuais trocas futuras por jogadores desconhecidos, de times não tão famosos assim.

No baseball, isso já é feito há tanto tempo que já foi até colocado em roteiro, com 5 indicações aos Oscar (MoneyBall – O Homem que mudou o jogo de 2011).

No futebol americano, o pioneiro Bill Belichick, do Patriots, caminha por aí com seu ar de mago do esporte, conspirando visões sobre o dia em que techs do vale do silício comandarão times de futebol.

Ciência de Dados + Esportes Coletivos

Mesmo como leigo, se é que algo assim ainda existe nessa era cursos online sobre praticamente tudo, é fácil de entender o argumento central para o uso de estatística a esportes coletivos que é mais ou menos assim:

Sabemos que para ganhar jogos é necessário um time. E que um time formado por jogadores individualmente razoáveis, que provêm exatamente o que o time precisa a um preço baixo, em média, compete bem contra times maiores que constroem suas equipes em volta de algumas estrelas, mas que têm alguns elos fracos ou inexistentes.

E como se escolhe jogadores com este perfil?

É aí que entra a estatística – ou a sua nova e mais robusta forma, a ciência de dados.
Basicamente, deixe que desempenhos antigos falem por si mesmos.

No lugar de uma estrela do Baseball que faz muitos strikes out (eliminado por não acertar a bola) com 25% de acerto e 35 home-runs, um jogador cuja porcentagem de acertos é de 40%, mas sem potência para home-runs pode ser o que o time precisa.

Ou seja, a ciência de dados irá identificar parâmetros que realmente funcionam, ao invés de apoiar-se em números soltos e descorrelacionados, como era feito à moda antiga.

Assim, se constrorem modelos que simulam o desempenho médio do time a partir de um conjunto dado de jogadores e os afunila até criar um time com os requeridos ganhos percentuais e, igualmente importante para o clube, de justo tamanho nos contracheques.

E como ficam os esportes individuais?

Nesta reportagem Steve Woods, chairman da Aruba Networks, relata como o futuro astro do tênis Nick Kyrgios revelou-se a mistura perfeita de atributos, dando-lhe confiança para declará-lo uma futura estrela aos doze anos de idade.

O relato indica “genética, histórico familiar e formato do corpo” como elementos-chave para futuros astros, no lugar do talento puro, que pode sim estar correlacionado, mas que pode ser enganador quando analisado de forma isolada.

É evidente que essas constatações não são exatas; provavelmente há mais detalhes por trás disso. Seria ingênuo acreditarmos completamente nessas alegações, dado que são feitas por uma empresa de tecnologia que busca lucro.

Mas por outro lado, eu consigo entender que espécimes atléticos como Rafael Nadal e Nick Kyrgios pontuem alto nesses algoritmos, mas me pergunto se John McEnroe e seu corpo de boneco palito ou Serena Williams com sua aparência de guerreira lutadora teriam sido previstos como futuros astros por algum algoritmo que não levasse em conta o talento puro para jogar tênis como um fator primordial.

“Eles são apenas outliers”, diria o estatístico.

Ou, talvez, haja fatores desconhecidos até então no fundo do código genético dos jogadores, ou no histórico de cuidado e nutrição de seus primeiros dias de vida ou em algo ainda mais obscuro como os hábitos de assistir televisão dos seus pais, que explicariam os Johns e Serenas do mundo.

Ah. Nem que seja pela graça de mais Dados.

 

Post traduzido em Out/2020. Texto Original aqui

 

Quer conhecer um pouco mais sobre como utilizamos estes conceitos para encontrar oportunidades de margem em seu negócio? Clique aqui

Data Science when lives are at stake

Data Science when lives are at stake

Most data scientists apply their craft at predicting the mundane. If it’s retail, we’re talking about recommending an album, gizmo or such that has the best chance of wresting another dollar from the customer’s wallet. If the underlying data science model pushes the latest Cardi B on a father whose teenage daughter had hijacked his account for a day last week, no harm is done – one can even say it made the father feel a little hip for a second. If that Next thermostat tends to be set more to your significant other’s liking just because she cares to get up and change the setting and thus train the damn thing, you can only blame yourself and not the thermostat. And if Alexa fails to play your favorite song because of the way you roll your r’s, you shrug and move on and soon enough your favorite song becomes whatever Alexa does play on a consistent basis.

But data scientists are moving beyond the mundane more and more. 

Take self-driving. If your algorithm is going to decide if that blur, moving swiftly towards the car and having a vague resemblance to a bicycle is instead just white noise in the video or an artifact of the compression algorithm or a ghost reflection of an unknown variety in the radar (and so on.. the list is long here), and instruct the car to carry on without a worry in the world, you better be sure – like almost hundred percent sure (granting full perfection is unattainable). But how do you really be really, really sure? And how much is really, really sure? What if this particular bicycle has only a vague resemblance to most bicycles in the first place? What if it’s a unicycle? Or one of those giant-wheeled bicycles that make you wonder how the hell the rider got on it in the first place. Does the algorithm get a pass? Do such bikes and the riders that ride them are to blame here for not opting for a standard bike more visible to algorithms? Perhaps you can train your algorithm for these varieties of bicycles but how about the next odd incarnation of a bicycle. In a more mundane application, you wait for a few false negatives and retrain. Nothing wrong about learning from one’s mistakes. But the real question here is when is an algorithm ready to be put out in the field in the first place. What’s the right level of false negatives (or false positives for that matter)? In situations where lives depend upon the success of algorithms, it’s imperative that data scientists take it upon themselves to take a closer look at how to measure accuracy and how to set bars of performance and not rely solely on a word from above as it may only come when the lives have already been unnecessarily harmed.

The general principal on which to do this is clear enough. 

The algorithm must be more accurate than a human being.

It’s the application of this principal where short-cuts are made in the interest of time and money. When it comes to comparisons, the tendency is to choose a human being who is average in driving skills but an algorithm that is inside a car in a mint state operating in friendly conditions and deep within its trained domain of application. In other words, the tendency is to not compare an algorithm driving in snowy conditions next to an elementary school with jumpy kids to a parent driving carefully with all their experience but instead an algorithm driving a car on perfectly painted lanes to an average human driving with life’s distractions in their mind and a drink or two in their belly. This is not a high enough bar, not when lives are at stake. We should aim higher as in this guiding principal.

An algorithm with such high stakes is ready for prime time only when it can beat not the average human in average conditions but also the best of the human drivers in the worst of the conditions the algorithm would be allowed to encounter.

Take predictive maintenance in the Oil and Gas off-shore drilling as another example. A malfunction of the Blowout Preventer (BOP), which stops uncontrollable release of subsurface oil or gas, is not something to take lightly. If your algorithm is going to mine the IoT sensor history of a BOP, analyze the machine’s degradation with age and then provide assurance that the BOP can be safely used for another, say, three months without any reconfirmation from human experts, it better be sure – really, really sure. Is there even enough data to draw that conclusion with any reasonable confidence? A typical drilling company will have multiple models of BOPs from multiple suppliers at various drilling sites. Drawing behavioral conclusions from one model of BOP and applying to another is rife with risk unless data proves it otherwise. Often such concerns are ignored and overstated conclusions follow. No drilling company has enough data to solely depend upon a data science model to predict usability of infrequently used equipment such as a BOP. In this scenario, chances of both false positives and negatives are high unless the analysis is corroborated by more traditional physics models. What needs to be acknowledged in this scenario is that the data science model has a limited domain of application and it’s best used in conjunction with both physics-based models and human experts.

Where does it leave us data scientists? Here’s a more generalized version of the guiding principle to follow in such high stake applications.

In each of its domains of application, the algorithm must be more accurate than a human being without any impairment. The application containing the algorithm must fully ensure that the algorithm is never applied outside its domains of application and there must a fail-safe mechanism to take algorithm out of operation and control be handed over to a human being without any harm to any one whenever there is a danger of conditions shifting out the training domain. If the domain of application is such that such a hand-over is not possible, consider the algorithm not ready for the field.

Put even more simply, for god’s sake, do not overstate the model results. Lives are at stake.

If Isaac Newton were to be a data scientist

If Isaac Newton were to be a data scientist

Wanting to predict remaining useful life of a submersible pump or an turbo-engine on a plane? Or performance of an oil field? Or price of crude oil? If you are a data scientist, chances are that someone with pedigree harder than that of a data scientist has asked you the following question with an annoying smile on their face – “How does your model account for the underlying physics, you know real science, of these situations?” – and you have stumbled and bumbled your way out, unless, of course, you were a physicist before someone told you about an easier way to make a living than trying to come up with a theory of everything, not a small probability but still leaving out most of us. Well, merely claiming that many machine-learning models are theoretically capable of learning any physics model, a claim that may be true but in such an impractical way that it might as well be false, may come across as smug at the very least, merely unbelievable if you are lucky and downright fraudulent if you are dressed too well. Still, I thought why not get a bit deeper into this and muse what would’ve happened if machine-learning had come to be known before Newton watched that apple fall to the ground. Not possible unless an abacus is the computer of your choice, but, hey, let’s run with it for a while longer. Newton would’ve first done what most data scientists do, which, of course, is ask for data – more the better. In Newton’s case, since he also set up the problem, that meant collecting that data himself. Damn it. I hate it when they don’t even have data. But what data? It’s likely that Newton would have tried to predict how long an apple takes to fall to the ground. Or a book dropped from a building. Or something heavier from a different height. Then, his data would have been the weight of the object, the height it was dropped from and the time it took for the object to fall to the ground. After weeks of dropping of objects, clandestinely, naturally, to avoid raising suspicions among the less scientifically-inclined, he put together a little matrix of tabular data – weight, height and time, which could have looked something like this:

To start with, Newton, the data scientist, likely would have thrown the data as is at a straightforward linear regression. He would have been pleasantly surprised at how good the results look. A R-square of 0.986, standard error of 0.155. A very low p-value for two of three coefficients. Many a data scientists would take this without a second thought. If this model were to be deployed for a specific application – when should a stone be dropped to hit an approaching enemy’s helmeted head, for example – this type of accuracy is more than good enough. No real understanding of anything remotely connected to theory of gravitation is to be found here. But it does the job. Does this count as success? Does the model account of the underlying physics? No, but yet the model is not entirely wrong either. In fact, it’s good enough for that application.

Newton may have gone further and tried another standard trick in linear regression – try a log-linear model. The results would have been even better. A R-square of 0.995, standard error of 0.029. Even lower p-values for all coefficients. In terms of the application, the model would not be terribly different in its prediction, at least in the range of heights the training data was collected, but the model seems clearly better. What the data scientist may not stop to ponder is that the log model is not merely more accurate, it has discovered a key effect of the classical theory of gravity – a body will fall to earth at a constant rate of acceleration and that rate is independent of the mass of the body. Strictly speaking, the model has a small not zero coefficient against the weight. Newton, the data scientist, may not again stop to wonder if it’s exactly zero. To complicate matters, all the real-world issues step in. Atmosphere, variable wind resistance, inaccuracy in measurements of weight, time and height, presence of other bodies so on and so forth. These factors will stop even a perfect experiment to come up with an exact zero coefficient against the body weight. The platonic ideal form of the elegant Newton’s laws may not have ever been discovered by Newton, the data scientist. But like before, this does not deter from the usefulness, or even accuracy, of the log-linear regression model.

How far can this be taken? After all, we haven’t even gone beyond regression yet. Could all the measurements of planetary bodies taken by astronomers prior to Newton’s arrival on the scene been fed by Newton into a machine-learning model for him to create a representation of the full theory of gravitation? Could enough measurements data be used to learn and predict Einstein’s relativity theory, explaining the minute discrepancies in astronomical calculations from the Newtonian’s version? We are not talking about building a full understanding of the physics, of course, but still a good enough model for predictions in similar situations. The answer is a qualified yes. With enough data, a predictive model that performs very close to the ideal form can be built. The qualification is owed to the very real and often prohibitive issues in getting that finely granular data and also identifying and training the right machine-learning model in practical amount of time. Linear, log-linear or even generalized linear regression are certainly not going to be enough, but a multi-layered Boltzmann machine would, to an arbitrary level of precision, even though it’s possible that even with all the data, the training algorithms fail to find the the absolute best fit, which might be the only fit that reflects the actual physics.

If Newton were to be a data scientist then, he may have discovered the laws of motion and gravity but without really realizing it. These “laws” would have been approximate and statistical in nature and represented only through computational models. But they still would have been good enough to predict seasons and motion of planetary bodies. 

So, the next time someone asks you to build a machine-learning model to predict a natural phenomenon without learning the physics of it, feel free to hesitate but don’t shy away from it entirely. Chances are that within certain range the machine-learning model you create will perform well enough. If you have access to some type of physics model for that phenomenon, you can use it to create the right machine-learning model – sometimes as a Bayesian prior, sometimes to scale the variables and still other times to determine the right form of functional parameters for the machine-learning model.

Surprising Trends in Interest in Data Science

Surprising Trends in Interest in Data Science

You would think that the interest in data science and it’s largest sub-discipline, machine-learning, must have been rising steadily through the years. Well, if Google Trends is to be trusted, that is not the case. See the bowl shaped curves in the graph above. “Data Science” is in blue and “Machine Learning” is in red. 

This elicited some investigation. It turns out that the phrase “data science” has been in use for over thirty years, but real use of the term started in about 2001. The first journal with that phrase in its name – Data Science Journal – started in 2002, roughly at the beginning of the time series in the graph. Perhaps that activity created some buzz that waned, thus explaining the early decline in interest. But that doesn’t explain a similar bowl shaped curve for the phrase “machine learning”. To explain that, we added to the trend graph another phrase – “big data” – in yellow. See the new graph below. Note that the scale is not absolute in any sense. The graph only shows relative interest.

So it seems that renewed and rising interest in the two phrases “data science” and “machine learning” can be tied to the sudden explosion in interest in the much more distinctly new phrase “big data” which makes sense since many big data projects also have a data science component to them.