first_imgDevelopments in West Bengal in the past week have reverberated across the nation as the assault on one of the junior doctors at NRS Hospital received widespread criticism. Protests across Bengal with the support received from across the country was a sigil of solidarity even as this very solidarity rendered thousands of patients without medical facilities. Doctors refused to work in Delhi, UP, Bihar, Odisha, Jharkhand, Maharashtra, Karnataka and other parts of the country to display their support towards the demands of NRS doctors. AIIMS Delhi went a step ahead and gave the West Bengal government an ultimatum of 48 hours with a delegation of Indian Medical Council visiting the Union Health Minister over the concerned issue. The pertinent issue of lack of security and police personnel in government hospitals across the nation has been a corner of concern. Like government banks, railway stations, etc., even the government hospitals must have appropriate security and police presence to avoid any mishap. The incident which took place at NRS Hospital was indeed an unfortunate one but more than that it was a serious security lapse. Overreacting patients cannot be ruled out given the severity of issues hospitals deal with and the state of mind any particular individual might be in. Assaulting anyone is against law and there are always those who break laws. Hence, the requirement of adequate safeguards to ensure safety, and that too at someone’s workplace, is paramount. Rightly so then, the demand put forth by doctors of NRS hospital was justified as it echoed across the nation with supporters decrying the incident and demanding action. Of course, the issue was red-hot and at a vulnerable point to be politically exploited and further leading to more protests. Already, a pool of patients had to bear the brunt of doctors’ absence. In short, the state was getting severely affected and the issue would have compounded and became a problem with ramifications which would not be pleasant. Also Read – A compounding difficultyIn this chaos, West Bengal’s chief minister took steps which made NRS hospital, doctors across the state and nation as well as people of Bengal reinstate their faith in the system, especially Mamata above all. The consequence of any agitation in a democracy is always going to be reformist in nature. The seven-day standoff between doctors and state government over lack of security at the workplace came to an end thanks to the truce achieved by the Mamata administration and a delegation of junior doctors. The state secretariat witnessed a 100-minute meeting where Mamata managed to put a smile on faces of protesting junior doctors who, by their absence from the workplace, had brought health services across the state to a standstill; their protest was emulated by others across the nation bringing health services to a halt at many places including the private hospitals shutting their OPDs. The protests staged by doctors transformed into a round of applause as Mamata accepted all their demands and appealed to them to end their strike, calling them “good boys”. The doctors, prior to their meeting, had put forward a demand to live-stream the meeting on news channels instead of a closed-door meeting, setting a precedent that was hailed by all, and would result in increased transparency – something governments have always eluded in some way or another. Closed-door meetings have been conventionally followed to resolve issues, even if they involve the common people. In the garb of confidentiality, almost everything regarding the government is discreetly discussed without letting the layman witness any of it. The essence of democracy is dampened but decisions of authority prevail nevertheless. However, with a one-of-its-kind meeting, the Mamata administration has not only satisfied doctors but the entire state. The incident takes us back to when DD Lok Sabha aired proceedings of the lower house on national TV. Democracy was enriched with public viewership as the elected representatives discussed matters of national interest. The coverage showed Mamata patiently listening to all demands raised by the delegation of junior doctors, jotting down points while asking health and police officials in the room to act on issues as entire West Bengal and the country watched. Governance of this sort really places the administration on a different note. When a government is able to fearlessly pursue remedies and solutions to fix cracks in the system, which is their duty as representatives of people, with a public eye constantly watching, democracy is strengthened. In the context of doctor’s agitation, Mamata pioneered the grievance redressal as the strike ended and doctors returned to their daily work. In fact, the positive note of the meeting reflected in their actions as they went back to NRS Hospital cheering and smiling and apologised to patients and their families with folded hands. If governments – who are fond of setting up committees to look into issues and provide redressal – practice what the West Bengal government did in this case, chances of public redressal increase several folds. Even the quality of remedy is assured since actions of government are now accountable in the eyes of masses due to the live-streamed meeting. In essence, transparency is increased and in a democracy, that will be always desirable.last_img read more

first_img“Review and approval processes specific to Fort St. John are now underway,” she added.Shopland said that this week, the City received approval for several water main projects: on 111th Ave. north of C.M. Finch School, 113th Ave. at 103rd St., and 77th Ave. at 90th St.He added that the only project awaiting approval from the health authority is the Local Area Service extension to the Tahltan Road, though he said that project had only recently been approved by Council. Northern Health spokesperson Andrew Palmer said that the engineer position, which is based in Prince George, has been open since the spring and will remain open until filled by a qualified applicant.She said that recruitment for the engineer position is ongoing, though all health authorities in B.C. consider the position “difficult to fill” since it is a professional engineer position.Palmer explained that Northern Health has been collaborating with other professional engineering services and other health authorities, using their engineers to help fill the gap and get projects approved.Despite this, approvals since the departure of the engineer have slowed. Shopland said that the City received approval for only one project – the water and sewer replacement along 92a St. – in the spring.In a post on his Facebook page last week, councillor Byron Stewart stated that City Council stressed to Northern Health that the current outsourcing meant that the limited time devoted to the City’s files created a serious backlog in construction projects in town.Palmer said that due to the backlog in permits, Northern Health has resorted to employing external contractors and prioritizing outstanding permits in order to get permits reviewed as quickly as possible. FORT ST. JOHN, B.C. – Northern Health says that it is working to ease the backlog of pending water main construction permits from the City of Fort St. John that grew after the health authority’s engineer left earlier this year.Fort St. John’s General Manager of Integrated Services, Victor Shopland, explained that any time the City installs or replaces a water main, it must apply for a permit with Northern Health.The application is reviewed by the health authority’s engineer, who looks at such things as the main’s separation from sanitary or storm sewers, and ensures that the correct processes are laid out in the construction plans.last_img read more

In a statement released by his spokesman late Friday, Mr. Annan urged both sides to resume in earnest their negotiations, which are being organized under the auspices of the Intergovernmental Authority on Development (IGAD). The two parties were also called on to build on the progress made in July towards a comprehensive settlement of the conflict “that has brought untold misery to the people of the Sudan and devastation to the country.”The Secretary-General commended the “tireless efforts” of the Kenyan Government in leading the peace initiative, and pledged to keep in touch with the parties and the leaders of the IGAD countries. Mr. Annan’s Special Adviser, Mohamed Sahnoun, will represent the Secretary-General at Machakos. “The Secretary-General reiterates the support of the United Nations to the IGAD effort for the Sudan and stands ready to assist in the implementation of a peace agreement,” the spokesman said. read more

The Senate elections were due to take place in January 2012 at the latest – but some 13 months later, “the political elite are still trying to come to a consensus on the basis for organizing these elections,” said Nigel Fisher, proving that this political stand-off is a clear sign that Haiti is still not “open for business.”Briefing reporters after returning from his recent visit to New York, Mr. Fisher, the Acting Special Representative of the Secretary-General and head of the UN Stabilization Mission in Haiti (MINUSTAH), added that the elections must be “credible, fair and inclusive.”While in New York, the envoy met with members of the Security Council and the so-called ‘Friends of Haiti’, who shared their concerns and frustrations.The predominant concern was of an impasse, he said. Progress had been much slower than was expected back in 2012. “Investments have not reached the levels that were anticipated. GNP [gross national product] grew by approximately 2.5 per cent in 2012, compared to the 8 per cent foreseen.” In addition to the gloomy economic scenario, there were also doubts being raised regarding the independence of the judiciary. But if there is one issue that dominates the discourse and highlights the disappointment of Haiti’s friends, it is the impasse in the organization of the elections, he stated.Mr. Fisher said he plans to confer with Haiti’s leaders to come up with some tangible benchmarks – such as a date for elections by the end of 2013, a Transitional College for a permanent Electoral Council, and a political agreement to agree on steps to move towards elections.The Security Council and Secretary-General Ban Ki-moon have also entrusted him with elaborating, along with the Government, a roadmap for the coming years, which will clearly define the priorities for MINUSTAH to promote stability and security, and strengthen the rule of law, respect for human rights and good governance. “We need to constantly ask ourselves this question: ‘How are our efforts going to improve their lives in a tangible way?’” said the envoy.“I understand and support fully the desire of Haitians to be in charge of their own country’s affairs. And the role of the UN and other partners is to accompany them on this road. After all, what is sovereignty if it doesn’t include all Haitians?” stressed Mr. Fisher. read more

first_imgThe Division plans to release approximately seven million fish annually into the waters of Alaska over the next five years. The plan outlines the locations, numbers, and size or life stage for each species of fish that are planned for stocking. Starting on January 1 through January 30 interested individuals can submit their comments. You can submit public comments to Andrew Garry by email or by mail:William Jack Hernandez Sport Fish Hatcheryc/o Andrew Garry941 North Reeve BoulevardAnchorage, Alaska, 99501The public comment deadline is Wednesday, January 30, 2019. Only fish reared from the Division’s hatchery facilities and from private non-profit hatcheries that work in cooperation with ADF&G to improve sport fisheries are included in this plan. Statewide Stocking Coordinator Andrew Garry: “Receiving public input is extremely important to the Division as we finalize the Statewide Stocking Plan for 2019. The Division commits a significant portion of their annual budget towards stocking fish throughout the state, and hearing from anglers is a critical piece of the fisheries management process.” The Statewide Stocking Plan is available for review on the Division’s webpage. Hard copies are also available for review at local ADF&G offices. Facebook0TwitterEmailPrintFriendly分享The Alaska Department of Fish and Game will be accepting public comments for the 2019 Statewide Stocking Plan for Sport Fisheries.last_img read more

first_imgIndian e-retailer Flipkart’s co-owners Sachin and Binny Bansal have been featured in the Forbes India list for the first time. Each of them have a net worth of $1.3 billion.The Bansals, who are both IIT-Delhi graduates, have been ranked Number 86 in the list that includes the names of 100 richest persons in India.How did they make it to the list?Bansals, who initially worked with, started their own company–Flipkart Online Services Private Limited–in October 2007. Initially, their services were limited only to books, but soon they expanded to 70 different categories.In 2012-2013, India’s largest e-commerce company reached an approximate revenue of $300 million (Rs 2,000 crore), Business Standard reported.In 2012, they started producing their own products under the brand name DigiFlip. It produces items such as tablets, electronic accessories and USBs. They also changed their business pattern such as same day delivery guarantee so as to earn more revenue.Between May 2014 and May 2015, Flipkart received funding of around $560 million from investors, including Dragoneer Investment Group and South African media group Naspers that also owns OLX.In February 2014, Flipkart claimed to have reached their targeted $1 billion sales mark before the stipulated time in 2015 as against their rivals Myntra and Snapdeal, who had also set a target of achieving $1 billion gross merchandise value (GMV) by 2015.Last year, Flipkart also launched MotoG phones on the e-business portal.In May last year, Flipkart announced that it had bought Myntra for $370 million. “Flipkart and Myntra are getting together to create one of the largest e-commerce stories in the country,” The Economic Times had quoted Sachin Bansal as saying then.In September this year, the e-retailer confirmed its valuation at $15.2 billion.last_img read more

first_imgEgypt is providing Indian companies “duty-free access” to the markets in the European Union, North American and other African and Arab markets. Around 52 Indian companies are working in Egypt with an investment to the tune of $3 billion (about Rs 20,400 crore).Last month, Egyptian ambassador to India Hatem Tageldin addressed a business meet in Kolkata; he noted that the bilateral trade between the two countries stood at approximately $5 billion (about Rs 34,000 crore) every year, the Economic Times reported. Tageldin asked the participating Indian businesses to take advantage of the current investment opportunities in Egypt. According to him, the climate of investment in the Arab-land has reportedly witnessed major reforms, which would have an impact on domestic investments as well as on foreign direct investment (FDI).At the same time, Egyptian companies are looking at making additional investments in India. Kapci coatings, an Egypt-based company, which makes auto refinished products, is planning to invest about $50 million in setting up five factories in India. Kapci has already begun constructing its first unit in southern state Karnataka, the ambassador was quoted as saying by the ET.The Egyptian government has also launched various projects to create investment opportunities in sectors such as roads, railways, water plants, ports, solar energy among others. Meanwhile, 25 Indian companies are expected to take part in the Cairo International Fair (CIF), which would be held from March 16 to March 25, 2016. Some of the Indian companies operating in Egypt are: Dabur Egypt Limited, Essel Proback Egypt, Kirloskar Egypt, Ranbaxy Egypt Limited, Gas Authority of India (GAIL), Monginis and Pidilite Industries Egypt.[1 lakh = 100,000 | 1 crore = 10 million | 100 crore = 1 billion]last_img read more

first_imgListen at WEAA Live Stream:, Baltimore Mayor Stephanie Rawlings-Blake may have dropped  the biggest bombshell of 2015 in a year of perhaps unprecedented volatility, when she announced she will not seek re-election. We have reports on this breaking news story, from Roberto Alejandro of the AFRO and Taya Graham and Stephen Janis of The Real News Network and others.  It’s all coming up this evening on AFRO’s First Edition with Sean Yoes.last_img read more

first_imgWhen the Xbox One launched on November 22, it required new owners download a day one system update in order to use their console, which reportedly took 20 minutes. We’re now almost three weeks on from launch, and a second system update has been released. This one is all about fixing bugs.Having millions of gamers start using their Xbox One consoles on a daily basis and for a wide range of different activities is inevitably going to throw up a few issues. This latest system update, which became available late yesterday, addresses 6 key bugs that have been plaguing gamers.Here’s the list:Addresses SmartGlass issues for some users when coming in and out of connected standbyAddresses multiplayer issues for some users when re-joining gamesAddresses issues with inconsistent notifications for some usersAddresses dashboard performance for some usersOffers improvements for Xbox One’s TV, system update, and content update services for scaling over timeUpdated wireless networking driver to improve connectivity issues for some usersHow you apply the system update depends on how your Xbox One is setup to function. If you leave it in the Instant On state when not in use, then the update will have already been downloaded and your console will now be in an off state. Turning it back on will begin the installation process, which takes no more than 5 minutes.If you have turned the Instant On feature off, then the update is available as a manual download and install. Your console should inform you of its availability next time you turn it on.last_img read more

first_img Sleek new MIT solar car heads to the races E-Quickie New wireless charging technologies are appearing regularly these days, such as a wireless charging mat for charging electric cars while they are parked (see the PhysOrg article), but the new car takes its energy wirelessly from the road.Mechanical engineering and mechatronics students from the Karlsruhe University of Applied Sciences (HsKA) built the experimental car to test the practicality of the wireless technology. The car is propelled by an electrical hub drive, with energy drawn from conducting tracks on the ground via electrical induction. The receivers are fitted to the underside of the car, and there are small onboard batteries, which serve as a buffer for times when the car leaves the electrical conductor tracks.The conducting track was supplied by the company SEW-Eurodrive, based in Bruchsal. The components of the car were designed and built by the 14 students using carbon fiber for the vehicle body and high-tech materials for the chassis and braking and steering systems. The design was fully tested and optimized by computer in a “virtual wind channel” before the car was actually built. More information: Karlsruhe University of Applied Sciences: … html?pbanker=car#car Explore further E-Quickie This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no part may be reproduced without the written permission. The content is provided for information purposes only.center_img © 2010 ( — Students in Germany have built the “E-Quickie,” a three-wheeled electric car that draws energy wirelessly from electric conducting paths on the ground. The car resembles a reclining bicycle with the driver inside a capsule. It weighs only 60 kg, but the team hopes to reduce the weight to 40 kg in future. Head of the project, Professor Jürgen Walter, of the Mechanical Engineering and Mechatronics faculty at the university, said the team were aiming for a driver:vehicle weight ratio of 2:1, while for most vehicles the ratio is between 1:10 and 1:15.The lightweight design means the car can reach 50 km/h, even with its 2 kW motor. The car has successfully completed 40 laps on a 222-meter-long conductor track at the university, and the team plans to continue using the track to optimize the E-Quickie. They are also planning test drives from the university to the nearby castle and another university campus in the town.Professor Walter said the principle used by the car is not really new, but it could be used much more widely than it is at present. Industry could operate internal transport vehicles in this way for example, he said, but the students also wanted to demonstrate that wireless transfer of energy is also suitable for mass transit applications. Citation: Demonstration electric car draws energy from the road (2010, September 14) retrieved 18 August 2019 from E-Quickielast_img read more

first_imgAaron Rodgers ripping young receivers shows real leadershipAaron Rodgers made headlines yesterday when he publicly ripped some of his young wide receivers for not practicing up to his standards. Colin has criticized Rodgers for being passive aggressive in the past, but he thinks his direct, aggressive approach shows he’s grown as a leader. He’d like to see more soundbites like this from Andrew Luck, instead of constantly taking the blame for everything when his teammates aren’t doing their part. Bad look for Baker on ‘Hard Knocks’The new season of HBO’s long-running NFL docuseries Hard Knocks debuted last night, and this year they’ve descended on Browns camp. One scene from the show featured a mic’d up conversation with #1 overall pick Baker Mayfield and Hue Jackson where Jackson questioned why Mayfield was showing up to the facility after veteran Tyrod Taylor, to which Mayfield didn’t have a great answer. Colin thought it wasn’t a great look for Baker, who looked like he wasn’t as all in as a franchise QB needs to be. Even if there is a good explanation, the optics are bad.Also:– Colin’s College Football Final Four– Colin’s All-Time NBA Starting 5Guests:Nick Wright – Host of FS1’s First Thing’s First joins the show to talk Hard Knocks, and if Hue Jackson has any chance to survive the season.DeAngelo Hall – Former Pro Bowl Cornerback is in-studio talking Browns Hard Knocks, and why he thinks OBJ is better than DeAndre Hopkins.Chad Pennington – Former Jets and Dolphins QB on playing with Randy Moss in college, and why he would sit Baker Mayfield and Sam Darnold to start the season.Joel Klatt – FS1 College Football Analyst is in-studio on the Bama QB battle; why Colin is blowing Baker Mayfield’s Hard Knocks appearance out of proportion.last_img read more

first_imgThe Iris dataset is the simplest, yet the most famous data analysis task in the ML space. In this article, you will build a solution for data analysis & classification task from an Iris dataset using Scala. This article is an excerpt taken from Modern Scala Projects written by Ilango Gurusamy. The following diagrams together help in understanding the different components of this project. That said, this pipeline involves training (fitting), transformation, and validation operations. More than one model is trained and the best model (or mapping function) is selected to give us an accurate approximation predicting the species of an Iris flower (based on measurements of those flowers): Project block diagram A breakdown of the project block diagram is as follows: Spark, which represents the Spark cluster and its ecosystem Training dataset Model Dataset attributes or feature measurements An inference process, that produces a prediction column The following diagram represents a more detailed description of the different phases in terms of the functions performed in each phase. Later we will come to visualize pipeline in terms of its constituent stages. For now, the diagram depicts four stages, starting with a data pre-processing phase, which is considered separate from the numbered phases deliberately. Think of the pipeline as a two-step process: A data cleansing phase, or pre-processing phase. An important phase that could include a subphase of Exploratory Data Analysis (EDA) (not explicitly depicted in the latter diagram). A data analysis phase that begins with Feature Extraction, followed by Model Fitting, and Model validation, all the way to deployment of an Uber pipeline JAR into Spark: Pipeline diagram Referring to the preceding diagram, the first implementation objective is to set up Spark inside an SBT project. An SBT project is a self-contained application, which we can run on the command line to predict Iris labels. In the SBT project,  dependencies are specified in a build.sbt file and our application code will create its  own SparkSession and SparkContext. So that brings us to a listing of implementation objectives and these are as follows: Get the Iris dataset from the UCI Machine Learning Repository Conduct preliminary EDA in the Spark shell Create a new Scala project in IntelliJ, and carry out all implementation steps, until the evaluation of the Random Forest classifier Deploy the application to your local Spark cluster Step 1# Getting the Iris dataset from the UCI Machine Learning Repository Head over to the UCI Machine Learning Repository website at and click on Download: Data Folder. Extract this folder someplace convenient and copy over iris.csv into the root of your project folder. You may refer back to the project overview for an in-depth description of the Iris dataset. We depict the contents of the iris.csv file here, as follows: A snapshot of the Iris dataset with 150 sets You may recall that the iris.csv file is a 150-row file, with comma-separated values. Now that we have the dataset, the first step will be performing EDA on it. The Iris dataset is multivariate, meaning there is more than one (independent) variable, so we will carry out a basic multivariate EDA on it. But we need DataFrame to let us do that. How we create a dataframe as a prelude to EDA is the goal of the next section. Step 2# Preliminary EDA Before we get down to building the SBT pipeline project, we will conduct a preliminary EDA in spark-shell. The plan is to derive a dataframe out of the dataset and then calculate basic statistics on it. We have three tasks at hand for spark-shell: Fire up spark-shell Load the iris.csv file and build DataFrame Calculate the statistics We will then port that code over to a Scala file inside our SBT project. That said, let’s get down to loading the iris.csv file (inputting the data source) before eventually building DataFrame. Step 3# Creating an SBT project Lay out your SBT project in a folder of your choice and name it IrisPipeline or any name that makes sense to you. This will hold all of our files needed to implement and run the pipeline on the Iris dataset. The structure of our SBT project looks like the following: Project structure We will list dependencies in the build.sbt file. This is going to be an SBT project. Hence, we will bring in the following key libraries: Spark Core Spark MLlib Spark SQL The following screenshot illustrates the build.sbt file: The build.sbt file with Spark dependencies The build.sbt file referenced in the preceding snapshot is readily available for you in the book’s download bundle. Drill down to the folder Chapter01 code under ModernScalaProjects_Code and copy the folder over to a convenient location on your computer. Drop the iris.csv file that you downloaded in Step 1 – getting the Iris dataset from the UCI Machine Learning Repository into the root folder of our new SBT project. Refer to the earlier screenshot that depicts the updated project structure with the iris.csv file inside of it. Step 4# Creating Scala files in SBT project Step 4 is broken down into the following steps: Create the Scala file iris.scala in the com.packt.modern.chapter1 package. Up until now, we relied on SparkSession and SparkContext, which spark-shell gave us. This time around, we need to create SparkSession, which will, in turn, give us SparkContext. What follows is how the code is laid out in the iris.scala file. In iris.scala, after the package statement, place the following import statements: import org.apache.spark.sql.SparkSession Create SparkSession inside a trait, which we shall call IrisWrapper: lazy val session: SparkSession = SparkSession.builder().getOrCreate() Just one SparkSession is made available to all classes extending from IrisWrapper. Create val to hold the iris.csv file path: val dataSetPath = “>\\iris.csv” Create a method to build DataFrame. This method takes in the complete path to the Iris dataset path as String and returns DataFrame: def buildDataFrame(dataSet: String): DataFrame = {/* The following is an example of a dataSet parameter string: “C:\\Your\\Path\\To\\iris.csv”*/ Import the DataFrame class by updating the previous import statement for SparkSession: import org.apache.spark.sql.{DataFrame, SparkSession} Create a nested function inside buildDataFrame to process the raw dataset. Name this function getRows. getRows which takes no parameters but returns Array[(Vector, String)]. The textFile method on the SparkContext variable processes the iris.csv into RDD[String]: val result1: Array[String] = session.sparkContext.textFile(>) The resulting RDD contains two partitions. Each partition, in turn, contains rows of strings separated by a newline character, ‘\n’. Each row in the RDD represents its original counterpart in the raw data. In the next step, we will attempt several data transformation steps. We start by applying a flatMap operation over the RDD, culminating in the DataFrame creation. DataFrame is a view over Dataset, which happens to the fundamental data abstraction unit in the Spark 2.0 line. Step 5# Preprocessing, data transformation, and DataFrame creation We will get started by invoking flatMap, by passing a function block to it, and successive transformations listed as follows, eventually resulting in Array[(, String)]. A vector represents a row of feature measurements. The Scala code to give us Array[(, String)] is as follows: //Each line in the RDD is a row in the Dataset represented by a String, which we can ‘split’ along the new //line characterval result2: RDD[String] = result1.flatMap { partition => partition.split(“\n”).toList } //the second transformation operation involves a split inside of each line in the dataset where there is a //comma separating each element of that line val result3: RDD[Array[String]] =“,”)) Next, drop the header column, but not before doing a collection that returns an Array[Array[String]]: val result4: Array[Array[String]] = result3.collect.drop(1) The header column is gone; now import the Vectors class: import Now, transform Array[Array[String]] into Array[(Vector, String)]: val result5 = => (Vectors.dense(row(1).toDouble, row(2).toDouble, row(3).toDouble, row(4).toDouble),row(5))) Step 6# Creating, training, and testing data Now, let’s split our dataset in two by providing a random seed: val splitDataSet: Array[org.apache.spark.sql.Dataset[org.apache.spark.sql.Row]] = dataSet.randomSplit(Array(0.85, 0.15), 98765L) Now our new splitDataset contains two datasets: Train dataset: A dataset containing Array[(Vector, iris-species-label-column: String)] Test dataset: A dataset containing Array[(Vector, iris-species-label-column: String)] Confirm that the new dataset is of size 2: splitDataset.sizeres48: Int = 2 Assign the training dataset to a variable, trainSet: val trainDataSet = splitDataSet(0)trainSet: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [iris-features-column: vector, iris-species-label-column: string] Assign the testing dataset to a variable, testSet: val testDataSet = splitDataSet(1)testSet: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [iris-features-column: vector, iris-species-label-column: string] Count the number of rows in the training dataset: trainSet.countres12: Long = 14 Count the number of rows in the testing dataset: testSet.countres9: Long = 136 There are 150 rows in all. Step 7# Creating a Random Forest classifier In reference to Step 5 – DataFrame Creation. This DataFrame ‘dataFrame’ contains column names that corresponds to the columns present in the DataFrame produced in that step The first step to create a classifier is to  pass into it (hyper) parameters. A fairly comprehensive list of parameters look like this: From ‘dataFrame’ we need the Features column name – iris-features-column From ‘dataFrame’ we also need the Indexed label column name – iris-species-label-column The sqrt setting for featureSubsetStrategy Number of features to be considered per split (we have 150 observations and four features that will make our max_features value 2) Impurity settings—values can be gini and entropy Number of trees to train (since the number of trees is greater than one, we set a tree maximum depth), which is a number equal to the number of nodes The required minimum number of feature measurements (sampled observations), also known as the minimum instances per node Look at the IrisPipeline.scala file for values of each of these parameters. But this time, we will employ an exhaustive grid search-based model selection process based on combinations of parameters, where parameter value ranges are specified. Create a randomForestClassifier instance. Set the features and featureSubsetStrategy: val randomForestClassifier = new RandomForestClassifier() .setFeaturesCol(irisFeatures_CategoryOrSpecies_IndexedLabel._1) .setFeatureSubsetStrategy(“sqrt”) Start building Pipeline, which has two stages, Indexer and Classifier: val irisPipeline = new Pipeline().setStages(Array[PipelineStage](indexer) ++ Array[PipelineStage](randomForestClassifier)) Next, set the hyperparameter num_trees (number of trees) on the classifier to 15, a Max_Depth parameter, and an impurity with two possible values of gini and entropy. Build a parameter grid with all three hyperparameters: val finalParamGrid: Array[ParamMap] = Step 8# Training the Random Forest classifier Next, we want to split our training set into a validation set and a training set: val validatedTestResults: DataFrame = new TrainValidationSplit() On this variable, set Seed, set EstimatorParamMaps, set Estimator with irisPipeline, and set a training ratio to 0.8: val validatedTestResults: DataFrame = new TrainValidationSplit().setSeed(1234567L).setEstimator(irisPipeline) Finally, do a fit and a transform with our training dataset and testing dataset. Great! Now the classifier is trained. In the next step, we will apply this classifier to testing the data. Step 9# Applying the Random Forest classifier to test data The purpose of our validation set is to be able to make a choice between models. We want an evaluation metric and hyperparameter tuning. We will now create an instance of a validation estimator called TrainValidationSplit, which will split the training set into a validation set and a training set: val validatedTestResults.setEvaluator(new MulticlassClassificationEvaluator()) Next, we fit this estimator over the training dataset to produce a model and a transformer that we will use to transform our testing dataset. Finally, we perform a validation for hyperparameter tuning by applying an evaluator for a metric. The new ValidatedTestResults DataFrame should look something like this: ——–+ |iris-features-column|iris-species-column|label| rawPrediction| probability|prediction| +——————–+——————-+—–+——————–+ | [4.4,3.2,1.3,0.2]| Iris-setosa| 0.0| [40.0,0.0,0.0]| [1.0,0.0,0.0]| 0.0| | [5.4,3.9,1.3,0.4]| Iris-setosa| 0.0| [40.0,0.0,0.0]| [1.0,0.0,0.0]| 0.0| | [5.4,3.9,1.7,0.4]| Iris-setosa| 0.0| [40.0,0.0,0.0]| [1.0,0.0,0.0]| 0.0| Let’s return a new dataset by passing in column expressions for prediction and label: val validatedTestResultsDataset:DataFrame =“prediction”, “label”) In the line of code, we produced a new DataFrame with two columns: An input label A predicted label, which is compared with its corresponding value in the input label column That brings us to the next step, an evaluation step. We want to know how well our model performed. That is the goal of the next step. Step 10# Evaluate Random Forest classifier In this section, we will test the accuracy of the model. We want to know how well our model performed. Any ML process is incomplete without an evaluation of the classifier. That said, we perform an evaluation as a two-step process: Evaluate the model output Pass in three hyperparameters: val modelOutputAccuracy: Double = new MulticlassClassificationEvaluator() Set the label column, a metric name, the prediction column label, and invoke evaluation with the validatedTestResults dataset. Note the accuracy of the model output results on the testing dataset from the modelOutputAccuracy variable. The other metrics to evaluate are how close the predicted label value in the ‘predicted’ column is to the actual label value in the (indexed) label column. Next, we want to extract the metrics: val multiClassMetrics = new MulticlassMetrics(validatedRDD2) Our pipeline produced predictions. As with any prediction, we need to have a healthy degree of skepticism. Naturally, we want a sense of how our engineered prediction process performed. The algorithm did all the heavy lifting for us in this regard. That said, everything we did in this step was done for the purpose of evaluation. Who is being evaluated here or what evaluation is worth reiterating? That said, we wanted to know how close the predicted values were compared to the actual label value. To obtain that knowledge, we decided to use the MulticlassMetrics class to evaluate metrics that will give us a measure of the performance of the model via two methods: Accuracy Weighted precision val accuracyMetrics = (multiClassMetrics.accuracy, multiClassMetrics.weightedPrecision) val accuracy = accuracyMetrics._1 val weightedPrecsion = accuracyMetrics._2 These metrics represent evaluation results for our classifier or classification model. In the next step, we will run the application as a packaged SBT application. Step 11# Running the pipeline as an SBT application At the root of your project folder, issue the sbt console command, and in the Scala shell, import the IrisPipeline object and then invoke the main method of IrisPipeline with the argument iris: sbt consolescala>import com.packt.modern.chapter1.IrisPipelineIrisPipeline.main(Array(“iris”)Accuracy (precision) is 0.9285714285714286 Weighted Precision is: 0.9428571428571428 Step 12# Packaging the application In the root folder of your SBT application, run: sbt package When SBT is done packaging, the Uber JAR can be deployed into our cluster, using spark-submit, but since we are in standalone deploy mode, it will be deployed into [local]: The application JAR file The package command created a JAR file that is available under the target folder. In the next section, we will deploy the application into Spark. Step 13# Submitting the pipeline application to Spark local At the root of the application folder, issue the spark-submit command with the class and JAR file path arguments, respectively. If everything went well, the application does the following: Loads up the data. Performs EDA. Creates training, testing, and validation datasets. Creates a Random Forest classifier model. Trains the model. Tests the accuracy of the model. This is the most important part—the ML classification task. To accomplish this, we apply our trained Random Forest classifier model to the test dataset. This dataset consists of Iris flower data of so far not seen by the model. Unseen data is nothing but Iris flowers picked in the wild. Applying the model to the test dataset results in a prediction about the species of an unseen (new) flower. The last part is where the pipeline runs an evaluation process, which essentially is about checking if the model reports the correct species. Lastly, pipeline reports back on how important a certain feature of the Iris flower turned out to be. As a matter of fact, the petal width turns out to be more important than the sepal width in carrying out the classification task. Thus we implemented an ML workflow or an ML pipeline. The pipeline combined several stages of data analysis into one workflow. We started by loading the data and from there on, we created training and test data, preprocessed the dataset, trained the RandomForestClassifier model, applied the Random Forest classifier to test data, evaluated the classifier, and computed a process that demonstrated the importance of each feature in the classification. If you’ve enjoyed reading this post visit the book, Modern Scala Projects to build efficient data science projects that fulfill your software requirements. Read Next Deep Learning Algorithms: How to classify Irises using multi-layer perceptrons Introducing Android 9 Pie, filled with machine learning and baked-in UI features Paper in Two minutes: A novel method for resource efficient image classificationlast_img read more

first_imgThe move follows several weeks of high-level meetings in the Pentagon among military chiefs, secretaries and Defense Department leaders, including one Monday involving Carter and the chiefs of the various services.Military leaders have pointed to the gradual — and ultimately successful — transition after the ban on gays serving openly in the military was lifted in 2011. Although legislation repealing that ban passed Congress in late 2010, the military services spent months conducting training and reviews before the decision actually took effect the following September.The latest Pentagon move comes just weeks after the Supreme Court upheld the right of same-sex couples to marry.Officials familiar with the Pentagon meetings said the chiefs of the Army, Navy, Marine Corps and Air Force did not express opposition to lifting the ban. Instead, they said the military leaders asked for time to figure out health care, housing and other questions and also to provide information and training to the troops to ensure a smooth transition.Although guidelines require that transgender individuals be dismissed from the military, the services in recent months have required more senior leaders to make the final decisions on those cases, effectively slowing the dismissal process. Arizona families, Arizona farms: working to produce high-quality milk Sponsored Stories FILE – In this June 5, 2013, file photo Army Pvt. Chelsea Manning, then-Army Pfc. Bradley Manning, is escorted out of a courthouse in Fort Meade, Md., after the third day of his court martial. The Associated Press has learned that Pentagon leaders are finalizing plans aimed at lifting the ban on transgender individuals serving in the military. Senior U.S. officials say an announcement is expected this week. They say the military would have six months to determine the impact and work out details, with the presumption that they would end one of the last gender- or sexuality-based barriers to military service. (AP Photo/Patrick Semansky, File) 5 greatest Kentucky Derby finishes “Obviously this isn’t finished, but Secretary Carter’s clear statement of intent means that transgender service members should and will be treated with the same dignity as other service members,” said Allyson Robinson, Army veteran and policy director for an association of lesbian, gay, bisexual and transgender military personnel called Service Members, Partners and Allies for Respect and Tolerance for All, or SPARTA.Brynn Tannehill, who was a Navy pilot before leaving the force and transitioning to a woman, recalled the difficulties when serving.“It was stressful and it was something that I couldn’t talk with anyone about, because if you even breathed a word of it you didn’t know what was going to happen,” said Tannehill, who still serves in Individual Ready Reserve. “You could lose your career, that I’d worked so hard for.”Several Congress members, including Rep. Adam Smith, ranking Democrat on the House Armed Services Committee, expressed support for Carter’s decision. But the more conservative Family Research Council questioned the change.“Considering the abysmal condition of our military and a decline in readiness, why is this a top priority for the Obama administration?” said retired Lt. Gen. Jerry Boykin, the council’s executive vice president. “The Pentagon must answer whether this proposed policy makes our military more capable of performing its mission. The answer is a very clear and resounding no.” Ex-FBI agent details raid on Phoenix body donation facility How men can have a healthy 2019 Comments   Share   Top Stories The transgender issue came to the fore as the military struggled with how to deal with convicted national security leaker Chelsea Manning’s request for hormone therapy and other treatment while she’s in prison. Manning, arrested as Bradley Manning, is the first transgender military prisoner to request such treatment, and the Army approved the hormone therapy, under pressure from a lawsuit.___AP Broadcast writer Sagar Meghani contributed to this report.Copyright © The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed. New Valley school lets students pick career-path academies Mesa family survives lightning strike to home Here’s how to repair and patch damaged drywall WASHINGTON (AP) — The Pentagon’s current regulations banning transgender individuals from serving in the military are outdated, Defense Secretary Ash Carter said Monday, ordering a six-month study aimed at formally ending one of the last gender- or sexuality-based barriers to military service.Carter said he is creating a working group that will review the policies and determine if lifting the ban would have any impact on the military’s ability to be ready for battle. But he said the group will begin with the presumption that transgender people should be able to serve openly “without adverse impact on military effectiveness and readiness, unless and except where objective, practical impediments are identified.” The plan, which was first reported by The Associated Press, gives the services time to methodically work through the legal, medical and administrative issues and develop training to ease any transition, and senior leaders believed six months would be sufficient.“The Defense Department’s current regulations regarding transgender service members are outdated and are causing uncertainty that distracts commanders from our core missions,” Carter said in a statement released Monday. “At a time when our troops have learned from experience that the most important qualification for service members should be whether they’re able and willing to do their job, our officers and enlisted personnel are faced with certain rules that tell them the opposite.”Carter asked his personnel undersecretary, Brad Carson, to lead the working group of senior military and civilian leaders to take an objective look at the issue, including the costs, and determine whether it would create any insurmountable problems that could derail the plan. The group would also develop uniform guidelines.During the six months, transgender individuals would still not be able to join the military, but any decisions to force out those already serving would be referred to Carson. One senior official said the goal was to avoid forcing any transgender service members to leave during that time. That official was not authorized to discuss the matter publicly and spoke on condition of anonymity. Some of the key concerns involved in the repeal of the ban include whether the military would conduct or pay for the medical costs of surgeries and other treatment associated with any gender transition, as well as which physical training or testing standards transgender individuals would be required to meet during different stages of their transition.Officials said the military also wants time to tackle questions about where transgender troops would be housed, what uniforms they would wear, what berthing they would have on ships, which bathrooms they would use and whether their presence would affect the ability of small units to work well together. The military has dealt with many similar questions as it integrated the ranks by race, gender and sexual orientation.Transgender people — those who identify with a different gender than they were born with and sometimes take hormone treatments or have surgery to develop the physical characteristics of their preferred gender — are banned from military service. But studies and other surveys have estimated that as many as 15,000 transgender people serve in the active-duty military and the reserves, often in secret but in many cases with the knowledge of their unit commander or peers.last_img read more

first_img Times haven’t been too swell for the “”Federal Housing Administration””: That was apparent, by some accounts, “”when the agency raised insurance premiums for lenders of single-family mortgages in February””:, a choice it made to shore up its crisis-weary Mutual Mortgage Insurance Fund.Now, according to “”Fitch Ratings””:, a new tide of mortgage delinquencies and price declines may tip the fund back toward troubled waters ├â┬ó├óÔÇÜ┬¼├óÔé¼┼ô and possibly insolvency.[IMAGE]The ratings agency said Friday that it sees problems arising from a difference between 90-day past due delinquency patterns for home loans backed by the agency and those without government guarantees.””This may eventually force the FHA to look for opportunities to put back some defaulted loans to the banks, particularly if the agency’s funding status worsens and U.S. home prices fail to rebound quickly,”” it said in a statement.According to Fitch, the FHA’s fiscal position benefited from the raise in upfront premiums but stays “”very weak”” in lieu of its inability to meet a congressionally required 2 percent capital buffer. [COLUMN_BREAK]The FHA capital ratio buffer currently stands at just 0.24 percent.The ratings agency found that government-backed mortgages constitute 83 percent, or about $66 billion, of 90-day past due delinquencies currently out there on the market.””This highlights the dimension of the growing delinquency problem for the FHA, given the predominant position of FHA-guaranteed loans in the troubled asset categories of major banks,”” Fitch said. “”While delinquency rates for nonguaranteed loans have been improving steadily at these institutions, the trend for FHA-guaranteed loans is starkly different.””A down-payment requirement increase on its way will likely worsen matters for the FHA, according to Fitch, which said that it expects the agency to resort to “”unconventional”” practices in order to prevent a bailout scenario and shore up the beleaguered fund.The scenario isn’t far-off from a crisis several experts predicted last year. “”Joseph Gyourko””:, a real estate and finance professor at the “”University of Pennsylvania””:, reported last fall that the $2.6 billion capital deficit vis-├âãÆ├é┬á-vis $1 trillion in insurance-in-force could mean a bailout.Just by how much? Anywhere from $50 billion to $100 billion, according to Gyourko. If a bailout took place, it would be the first for the FHA in its nearly 80-year history.Speaking with _MReport_ for a past interview, FHA Acting Commissioner “”Carol Galante””: defended the role that premium raises play in keeping the agency afloat. “”We think this is appropriate, but we have to do it carefully and gradually,”” she told us.*What about you? Do you think the FHA could tilt toward insolvency?* Sound off in an email to for a chance to appear in our monthly magazine. Share August 17, 2012 476 Views Agency Debt Agents & Brokers Attorneys & Title Companies Bailouts Carol Galante Defaults FHA Home Prices Investors Lenders & Servicers Mortgage Insurance Processing Service Providers 2012-08-17 Ryan Schuettecenter_img Delinquency Tide May Tip the FHA Toward Insolvency: Fitch in Data, Government, Origination, Servicinglast_img read more